From 9a014d19958abadd686fd41c99db877cfa4f937c Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Fri, 3 Jan 2020 18:18:13 +0800 Subject: [PATCH 1/3] build --- public/node_modules/.recently_updates.txt | 5 + .../index.d.ts | 51 + .../index.js | 47 + .../license | 9 + .../node_modules/clean-stack | 1 + .../node_modules/indent-string | 1 + .../package.json | 44 + .../readme.md | 61 + .../_ajv-keywords@3.4.1@ajv-keywords/LICENSE | 21 + .../README.md | 820 ++ .../_ajv-keywords@3.4.1@ajv-keywords/index.js | 35 + .../keywords/_formatLimit.js | 101 + .../keywords/_util.js | 15 + .../keywords/allRequired.js | 18 + .../keywords/anyRequired.js | 24 + .../keywords/deepProperties.js | 54 + .../keywords/deepRequired.js | 57 + .../keywords/dot/_formatLimit.jst | 116 + .../keywords/dot/patternRequired.jst | 33 + .../keywords/dot/switch.jst | 73 + .../keywords/dotjs/README.md | 3 + .../keywords/dotjs/_formatLimit.js | 178 + .../keywords/dotjs/patternRequired.js | 58 + .../keywords/dotjs/switch.js | 130 + .../keywords/dynamicDefaults.js | 72 + .../keywords/formatMaximum.js | 3 + .../keywords/formatMinimum.js | 3 + .../keywords/index.js | 22 + .../keywords/instanceof.js | 58 + .../keywords/oneRequired.js | 24 + .../keywords/patternRequired.js | 21 + .../keywords/prohibited.js | 24 + .../keywords/range.js | 36 + .../keywords/regexp.js | 36 + .../keywords/select.js | 79 + .../keywords/switch.js | 38 + .../keywords/transform.js | 80 + .../keywords/typeof.js | 32 + .../keywords/uniqueItemProperties.js | 59 + .../package.json | 54 + .../_ajv@6.10.2@ajv/.tonic_example.js | 20 + public/node_modules/_ajv@6.10.2@ajv/LICENSE | 22 + public/node_modules/_ajv@6.10.2@ajv/README.md | 1359 ++++ .../_ajv@6.10.2@ajv/dist/ajv.bundle.js | 7172 +++++++++++++++++ .../_ajv@6.10.2@ajv/dist/ajv.min.js | 3 + .../_ajv@6.10.2@ajv/dist/ajv.min.js.map | 1 + .../node_modules/_ajv@6.10.2@ajv/lib/ajv.d.ts | 390 + .../node_modules/_ajv@6.10.2@ajv/lib/ajv.js | 497 ++ .../node_modules/_ajv@6.10.2@ajv/lib/cache.js | 26 + .../_ajv@6.10.2@ajv/lib/compile/async.js | 90 + .../_ajv@6.10.2@ajv/lib/compile/equal.js | 5 + .../lib/compile/error_classes.js | 34 + .../_ajv@6.10.2@ajv/lib/compile/formats.js | 149 + .../_ajv@6.10.2@ajv/lib/compile/index.js | 387 + .../_ajv@6.10.2@ajv/lib/compile/resolve.js | 270 + .../_ajv@6.10.2@ajv/lib/compile/rules.js | 66 + .../_ajv@6.10.2@ajv/lib/compile/schema_obj.js | 9 + .../_ajv@6.10.2@ajv/lib/compile/ucs2length.js | 20 + .../_ajv@6.10.2@ajv/lib/compile/util.js | 274 + .../node_modules/_ajv@6.10.2@ajv/lib/data.js | 49 + .../_ajv@6.10.2@ajv/lib/definition_schema.js | 37 + .../_ajv@6.10.2@ajv/lib/dot/_limit.jst | 104 + .../_ajv@6.10.2@ajv/lib/dot/_limitItems.jst | 10 + .../_ajv@6.10.2@ajv/lib/dot/_limitLength.jst | 10 + .../lib/dot/_limitProperties.jst | 10 + .../_ajv@6.10.2@ajv/lib/dot/allOf.jst | 34 + .../_ajv@6.10.2@ajv/lib/dot/anyOf.jst | 48 + .../_ajv@6.10.2@ajv/lib/dot/coerce.def | 61 + .../_ajv@6.10.2@ajv/lib/dot/comment.jst | 9 + .../_ajv@6.10.2@ajv/lib/dot/const.jst | 11 + .../_ajv@6.10.2@ajv/lib/dot/contains.jst | 57 + .../_ajv@6.10.2@ajv/lib/dot/custom.jst | 191 + .../_ajv@6.10.2@ajv/lib/dot/defaults.def | 47 + .../_ajv@6.10.2@ajv/lib/dot/definitions.def | 201 + .../_ajv@6.10.2@ajv/lib/dot/dependencies.jst | 80 + .../_ajv@6.10.2@ajv/lib/dot/enum.jst | 30 + .../_ajv@6.10.2@ajv/lib/dot/errors.def | 194 + .../_ajv@6.10.2@ajv/lib/dot/format.jst | 106 + .../_ajv@6.10.2@ajv/lib/dot/if.jst | 75 + .../_ajv@6.10.2@ajv/lib/dot/items.jst | 100 + .../_ajv@6.10.2@ajv/lib/dot/missing.def | 39 + .../_ajv@6.10.2@ajv/lib/dot/multipleOf.jst | 20 + .../_ajv@6.10.2@ajv/lib/dot/not.jst | 43 + .../_ajv@6.10.2@ajv/lib/dot/oneOf.jst | 54 + .../_ajv@6.10.2@ajv/lib/dot/pattern.jst | 14 + .../_ajv@6.10.2@ajv/lib/dot/properties.jst | 244 + .../_ajv@6.10.2@ajv/lib/dot/propertyNames.jst | 54 + .../_ajv@6.10.2@ajv/lib/dot/ref.jst | 85 + .../_ajv@6.10.2@ajv/lib/dot/required.jst | 108 + .../_ajv@6.10.2@ajv/lib/dot/uniqueItems.jst | 62 + .../_ajv@6.10.2@ajv/lib/dot/validate.jst | 282 + .../_ajv@6.10.2@ajv/lib/dotjs/README.md | 3 + .../_ajv@6.10.2@ajv/lib/dotjs/_limit.js | 157 + .../_ajv@6.10.2@ajv/lib/dotjs/_limitItems.js | 77 + .../_ajv@6.10.2@ajv/lib/dotjs/_limitLength.js | 82 + .../lib/dotjs/_limitProperties.js | 77 + .../_ajv@6.10.2@ajv/lib/dotjs/allOf.js | 43 + .../_ajv@6.10.2@ajv/lib/dotjs/anyOf.js | 74 + .../_ajv@6.10.2@ajv/lib/dotjs/comment.js | 14 + .../_ajv@6.10.2@ajv/lib/dotjs/const.js | 56 + .../_ajv@6.10.2@ajv/lib/dotjs/contains.js | 82 + .../_ajv@6.10.2@ajv/lib/dotjs/custom.js | 228 + .../_ajv@6.10.2@ajv/lib/dotjs/dependencies.js | 168 + .../_ajv@6.10.2@ajv/lib/dotjs/enum.js | 66 + .../_ajv@6.10.2@ajv/lib/dotjs/format.js | 150 + .../_ajv@6.10.2@ajv/lib/dotjs/if.js | 104 + .../_ajv@6.10.2@ajv/lib/dotjs/index.js | 33 + .../_ajv@6.10.2@ajv/lib/dotjs/items.js | 141 + .../_ajv@6.10.2@ajv/lib/dotjs/multipleOf.js | 77 + .../_ajv@6.10.2@ajv/lib/dotjs/not.js | 84 + .../_ajv@6.10.2@ajv/lib/dotjs/oneOf.js | 73 + .../_ajv@6.10.2@ajv/lib/dotjs/pattern.js | 75 + .../_ajv@6.10.2@ajv/lib/dotjs/properties.js | 330 + .../lib/dotjs/propertyNames.js | 82 + .../_ajv@6.10.2@ajv/lib/dotjs/ref.js | 124 + .../_ajv@6.10.2@ajv/lib/dotjs/required.js | 270 + .../_ajv@6.10.2@ajv/lib/dotjs/uniqueItems.js | 86 + .../_ajv@6.10.2@ajv/lib/dotjs/validate.js | 494 ++ .../_ajv@6.10.2@ajv/lib/keyword.js | 146 + .../_ajv@6.10.2@ajv/lib/refs/data.json | 17 + .../lib/refs/json-schema-draft-04.json | 149 + .../lib/refs/json-schema-draft-06.json | 154 + .../lib/refs/json-schema-draft-07.json | 168 + .../lib/refs/json-schema-secure.json | 94 + .../node_modules/fast-deep-equal | 1 + .../node_modules/fast-json-stable-stringify | 1 + .../node_modules/json-schema-traverse | 1 + .../_ajv@6.10.2@ajv/node_modules/uri-js | 1 + .../node_modules/_ajv@6.10.2@ajv/package.json | 101 + .../_ajv@6.10.2@ajv/scripts/.eslintrc.yml | 3 + .../_ajv@6.10.2@ajv/scripts/bundle.js | 61 + .../_ajv@6.10.2@ajv/scripts/compile-dots.js | 73 + .../node_modules/_ajv@6.10.2@ajv/scripts/info | 10 + .../_ajv@6.10.2@ajv/scripts/prepare-tests | 12 + .../scripts/publish-built-version | 32 + .../_ajv@6.10.2@ajv/scripts/travis-gh-pages | 23 + .../node_modules/_aproba@1.2.0@aproba/LICENSE | 14 + .../_aproba@1.2.0@aproba/README.md | 94 + .../_aproba@1.2.0@aproba/index.js | 105 + .../_aproba@1.2.0@aproba/package.json | 37 + .../.npmignore | 5 + .../LICENSE.md | 21 + .../README.md | 91 + .../index.js | 59 + .../package.json | 52 + .../LICENSE | 21 + .../README.md | 129 + .../index.js | 201 + .../node_modules/balanced-match | 1 + .../node_modules/concat-map | 1 + .../package.json | 50 + .../_buffer-from@1.1.1@buffer-from/LICENSE | 21 + .../_buffer-from@1.1.1@buffer-from/index.js | 69 + .../package.json | 22 + .../_buffer-from@1.1.1@buffer-from/readme.md | 69 + .../_cacache@13.0.1@cacache/CHANGELOG.md | 747 ++ .../_cacache@13.0.1@cacache/LICENSE.md | 16 + .../_cacache@13.0.1@cacache/README.md | 617 ++ .../_cacache@13.0.1@cacache/get.js | 266 + .../_cacache@13.0.1@cacache/index.js | 41 + .../lib/content/path.js | 28 + .../lib/content/read.js | 261 + .../_cacache@13.0.1@cacache/lib/content/rm.js | 22 + .../lib/content/write.js | 187 + .../lib/entry-index.js | 311 + .../lib/memoization.js | 74 + .../lib/util/disposer.js | 30 + .../lib/util/fix-owner.js | 145 + .../lib/util/hash-to-segments.js | 7 + .../lib/util/move-file.js | 56 + .../_cacache@13.0.1@cacache/lib/util/tmp.js | 42 + .../_cacache@13.0.1@cacache/lib/verify.js | 291 + .../_cacache@13.0.1@cacache/ls.js | 6 + .../node_modules/.bin/mkdirp | 1 + .../node_modules/.bin/rimraf | 1 + .../node_modules/chownr | 1 + .../node_modules/figgy-pudding | 1 + .../node_modules/fs-minipass | 1 + .../_cacache@13.0.1@cacache/node_modules/glob | 1 + .../node_modules/graceful-fs | 1 + .../node_modules/infer-owner | 1 + .../node_modules/lru-cache | 1 + .../node_modules/minipass | 1 + .../node_modules/minipass-collect | 1 + .../node_modules/minipass-flush | 1 + .../node_modules/minipass-pipeline | 1 + .../node_modules/mkdirp | 1 + .../node_modules/move-concurrently | 1 + .../node_modules/p-map | 1 + .../node_modules/promise-inflight | 1 + .../node_modules/rimraf | 1 + .../_cacache@13.0.1@cacache/node_modules/ssri | 1 + .../node_modules/unique-filename | 1 + .../_cacache@13.0.1@cacache/package.json | 98 + .../_cacache@13.0.1@cacache/put.js | 94 + .../_cacache@13.0.1@cacache/rm.js | 31 + .../_cacache@13.0.1@cacache/verify.js | 3 + .../node_modules/_chownr@1.1.3@chownr/LICENSE | 15 + .../_chownr@1.1.3@chownr/README.md | 3 + .../_chownr@1.1.3@chownr/chownr.js | 125 + .../_chownr@1.1.3@chownr/package.json | 29 + .../_clean-stack@2.2.0@clean-stack/index.d.ts | 47 + .../_clean-stack@2.2.0@clean-stack/index.js | 40 + .../_clean-stack@2.2.0@clean-stack/license | 9 + .../package.json | 42 + .../_clean-stack@2.2.0@clean-stack/readme.md | 76 + .../_commander@2.20.3@commander/CHANGELOG.md | 419 + .../_commander@2.20.3@commander/LICENSE | 22 + .../_commander@2.20.3@commander/Readme.md | 428 + .../_commander@2.20.3@commander/index.js | 1224 +++ .../_commander@2.20.3@commander/package.json | 41 + .../typings/index.d.ts | 310 + .../_commondir@1.0.1@commondir/LICENSE | 24 + .../_commondir@1.0.1@commondir/example/dir.js | 3 + .../_commondir@1.0.1@commondir/index.js | 29 + .../_commondir@1.0.1@commondir/package.json | 37 + .../readme.markdown | 48 + .../_commondir@1.0.1@commondir/test/dirs.js | 55 + .../_concat-map@0.0.1@concat-map/.travis.yml | 4 + .../_concat-map@0.0.1@concat-map/LICENSE | 18 + .../README.markdown | 62 + .../example/map.js | 6 + .../_concat-map@0.0.1@concat-map/index.js | 13 + .../_concat-map@0.0.1@concat-map/package.json | 62 + .../_concat-map@0.0.1@concat-map/test/map.js | 39 + .../LICENSE | 14 + .../README.md | 128 + .../copy.js | 225 + .../is-windows.js | 2 + .../node_modules/.bin/mkdirp | 1 + .../node_modules/.bin/rimraf | 1 + .../node_modules/aproba | 1 + .../node_modules/fs-write-stream-atomic | 1 + .../node_modules/iferr | 1 + .../node_modules/mkdirp | 1 + .../node_modules/rimraf | 1 + .../node_modules/run-queue | 1 + .../package.json | 46 + .../_core-util-is@1.0.2@core-util-is/LICENSE | 19 + .../README.md | 3 + .../float.patch | 604 ++ .../lib/util.js | 107 + .../package.json | 35 + .../_core-util-is@1.0.2@core-util-is/test.js | 68 + .../LICENSE | 21 + .../README.md | 58 + .../index.d.ts | 4 + .../index.js | 55 + .../package.json | 62 + .../.eslintrc.yml | 26 + .../.github/FUNDING.yml | 1 + .../.travis.yml | 8 + .../LICENSE | 21 + .../README.md | 131 + .../benchmark/index.js | 31 + .../benchmark/test.json | 137 + .../example/key_cmp.js | 7 + .../example/nested.js | 3 + .../example/str.js | 3 + .../example/value_cmp.js | 7 + .../index.d.ts | 4 + .../index.js | 59 + .../package.json | 55 + .../test/cmp.js | 13 + .../test/nested.js | 44 + .../test/str.js | 46 + .../test/to-json.js | 22 + .../CHANGELOG.md | 151 + .../LICENSE.md | 16 + .../README.md | 260 + .../index.js | 197 + .../package.json | 38 + .../index.js | 50 + .../license | 9 + .../node_modules/commondir | 1 + .../node_modules/make-dir | 1 + .../node_modules/pkg-dir | 1 + .../package.json | 46 + .../readme.md | 120 + .../_find-up@4.1.0@find-up/index.d.ts | 137 + .../_find-up@4.1.0@find-up/index.js | 89 + .../_find-up@4.1.0@find-up/license | 9 + .../node_modules/locate-path | 1 + .../node_modules/path-exists | 1 + .../_find-up@4.1.0@find-up/package.json | 56 + .../_find-up@4.1.0@find-up/readme.md | 156 + .../_fs-minipass@2.0.0@fs-minipass/LICENSE | 15 + .../_fs-minipass@2.0.0@fs-minipass/README.md | 70 + .../_fs-minipass@2.0.0@fs-minipass/index.js | 387 + .../node_modules/minipass | 1 + .../package.json | 42 + .../.npmignore | 3 + .../.travis.yml | 11 + .../LICENSE | 15 + .../README.md | 35 + .../index.js | 176 + .../node_modules/graceful-fs | 1 + .../node_modules/iferr | 1 + .../node_modules/imurmurhash | 1 + .../node_modules/readable-stream | 1 + .../package.json | 36 + .../test/basic.js | 97 + .../test/chown.js | 44 + .../test/rename-eperm.js | 154 + .../test/rename-fail.js | 30 + .../test/slow-close.js | 40 + .../test/toolong.js | 29 + .../_fs.realpath@1.0.0@fs.realpath/LICENSE | 43 + .../_fs.realpath@1.0.0@fs.realpath/README.md | 33 + .../_fs.realpath@1.0.0@fs.realpath/index.js | 66 + .../_fs.realpath@1.0.0@fs.realpath/old.js | 303 + .../package.json | 29 + public/node_modules/_glob@7.1.6@glob/LICENSE | 21 + .../node_modules/_glob@7.1.6@glob/README.md | 375 + .../_glob@7.1.6@glob/changelog.md | 67 + .../node_modules/_glob@7.1.6@glob/common.js | 240 + public/node_modules/_glob@7.1.6@glob/glob.js | 790 ++ .../_glob@7.1.6@glob/node_modules/fs.realpath | 1 + .../_glob@7.1.6@glob/node_modules/inflight | 1 + .../_glob@7.1.6@glob/node_modules/inherits | 1 + .../_glob@7.1.6@glob/node_modules/minimatch | 1 + .../_glob@7.1.6@glob/node_modules/once | 1 + .../node_modules/path-is-absolute | 1 + .../_glob@7.1.6@glob/package.json | 49 + public/node_modules/_glob@7.1.6@glob/sync.js | 486 ++ .../_graceful-fs@4.2.3@graceful-fs/LICENSE | 15 + .../_graceful-fs@4.2.3@graceful-fs/README.md | 133 + .../_graceful-fs@4.2.3@graceful-fs/clone.js | 19 + .../graceful-fs.js | 346 + .../legacy-streams.js | 118 + .../package.json | 53 + .../polyfills.js | 342 + .../_has-flag@3.0.0@has-flag/index.js | 8 + .../_has-flag@3.0.0@has-flag/license | 9 + .../_has-flag@3.0.0@has-flag/package.json | 47 + .../_has-flag@3.0.0@has-flag/readme.md | 70 + .../_iferr@0.1.5@iferr/.npmignore | 1 + .../node_modules/_iferr@0.1.5@iferr/LICENSE | 21 + .../node_modules/_iferr@0.1.5@iferr/README.md | 40 + .../_iferr@0.1.5@iferr/index.coffee | 24 + .../node_modules/_iferr@0.1.5@iferr/index.js | 49 + .../_iferr@0.1.5@iferr/package.json | 31 + .../_iferr@0.1.5@iferr/test/index.coffee | 42 + .../_iferr@0.1.5@iferr/test/mocha.opts | 2 + .../_imurmurhash@0.1.4@imurmurhash/README.md | 122 + .../imurmurhash.js | 138 + .../imurmurhash.min.js | 12 + .../package.json | 41 + .../index.d.ts | 42 + .../index.js | 35 + .../license | 9 + .../package.json | 40 + .../readme.md | 70 + .../_infer-owner@1.0.4@infer-owner/LICENSE | 15 + .../_infer-owner@1.0.4@infer-owner/README.md | 41 + .../_infer-owner@1.0.4@infer-owner/index.js | 71 + .../package.json | 29 + .../_inflight@1.0.6@inflight/LICENSE | 15 + .../_inflight@1.0.6@inflight/README.md | 37 + .../_inflight@1.0.6@inflight/inflight.js | 54 + .../node_modules/once | 1 + .../node_modules/wrappy | 1 + .../_inflight@1.0.6@inflight/package.json | 32 + .../_inherits@2.0.4@inherits/LICENSE | 16 + .../_inherits@2.0.4@inherits/README.md | 42 + .../_inherits@2.0.4@inherits/inherits.js | 9 + .../inherits_browser.js | 27 + .../_inherits@2.0.4@inherits/package.json | 32 + .../_isarray@1.0.0@isarray/.npmignore | 1 + .../_isarray@1.0.0@isarray/.travis.yml | 4 + .../_isarray@1.0.0@isarray/Makefile | 6 + .../_isarray@1.0.0@isarray/README.md | 60 + .../_isarray@1.0.0@isarray/component.json | 19 + .../_isarray@1.0.0@isarray/index.js | 5 + .../_isarray@1.0.0@isarray/package.json | 48 + .../_isarray@1.0.0@isarray/test.js | 20 + .../_jest-worker@24.9.0@jest-worker/LICENSE | 21 + .../_jest-worker@24.9.0@jest-worker/README.md | 215 + .../build/Farm.d.ts | 27 + .../build/Farm.d.ts.map | 1 + .../build/Farm.js | 179 + .../build/WorkerPool.d.ts | 14 + .../build/WorkerPool.d.ts.map | 1 + .../build/WorkerPool.js | 49 + .../build/base/BaseWorkerPool.d.ts | 22 + .../build/base/BaseWorkerPool.d.ts.map | 1 + .../build/base/BaseWorkerPool.js | 134 + .../build/index.d.ts | 46 + .../build/index.d.ts.map | 1 + .../build/index.js | 184 + .../build/types.d.ts | 98 + .../build/types.d.ts.map | 1 + .../build/types.js | 43 + .../build/workers/ChildProcessWorker.d.ts | 47 + .../build/workers/ChildProcessWorker.d.ts.map | 1 + .../build/workers/ChildProcessWorker.js | 310 + .../build/workers/NodeThreadsWorker.d.ts | 29 + .../build/workers/NodeThreadsWorker.d.ts.map | 1 + .../build/workers/NodeThreadsWorker.js | 289 + .../build/workers/processChild.d.ts | 8 + .../build/workers/processChild.d.ts.map | 1 + .../build/workers/processChild.js | 166 + .../build/workers/threadChild.d.ts | 8 + .../build/workers/threadChild.d.ts.map | 1 + .../build/workers/threadChild.js | 176 + .../node_modules/merge-stream | 1 + .../node_modules/supports-color | 1 + .../package.json | 32 + .../.eslintrc.yml | 27 + .../.travis.yml | 8 + .../LICENSE | 21 + .../README.md | 83 + .../index.js | 89 + .../package.json | 46 + .../spec/.eslintrc.yml | 6 + .../spec/fixtures/schema.js | 125 + .../spec/index.spec.js | 171 + .../_locate-path@5.0.0@locate-path/index.d.ts | 83 + .../_locate-path@5.0.0@locate-path/index.js | 65 + .../_locate-path@5.0.0@locate-path/license | 9 + .../node_modules/p-locate | 1 + .../package.json | 48 + .../_locate-path@5.0.0@locate-path/readme.md | 122 + .../_lru-cache@5.1.1@lru-cache/LICENSE | 15 + .../_lru-cache@5.1.1@lru-cache/README.md | 166 + .../_lru-cache@5.1.1@lru-cache/index.js | 334 + .../node_modules/yallist | 1 + .../_lru-cache@5.1.1@lru-cache/package.json | 35 + .../_make-dir@3.0.0@make-dir/index.d.ts | 66 + .../_make-dir@3.0.0@make-dir/index.js | 150 + .../_make-dir@3.0.0@make-dir/license | 9 + .../node_modules/.bin/semver | 1 + .../node_modules/semver | 1 + .../_make-dir@3.0.0@make-dir/package.json | 61 + .../_make-dir@3.0.0@make-dir/readme.md | 123 + .../_merge-stream@2.0.0@merge-stream/LICENSE | 21 + .../README.md | 78 + .../_merge-stream@2.0.0@merge-stream/index.js | 41 + .../package.json | 22 + .../_minimatch@3.0.4@minimatch/LICENSE | 15 + .../_minimatch@3.0.4@minimatch/README.md | 209 + .../_minimatch@3.0.4@minimatch/minimatch.js | 923 +++ .../node_modules/brace-expansion | 1 + .../_minimatch@3.0.4@minimatch/package.json | 33 + .../_minimist@0.0.8@minimist/.travis.yml | 4 + .../_minimist@0.0.8@minimist/LICENSE | 18 + .../_minimist@0.0.8@minimist/example/parse.js | 2 + .../_minimist@0.0.8@minimist/index.js | 187 + .../_minimist@0.0.8@minimist/package.json | 46 + .../_minimist@0.0.8@minimist/readme.markdown | 73 + .../_minimist@0.0.8@minimist/test/dash.js | 24 + .../test/default_bool.js | 20 + .../_minimist@0.0.8@minimist/test/dotted.js | 16 + .../_minimist@0.0.8@minimist/test/long.js | 31 + .../_minimist@0.0.8@minimist/test/parse.js | 318 + .../test/parse_modified.js | 9 + .../_minimist@0.0.8@minimist/test/short.js | 67 + .../test/whitespace.js | 8 + .../LICENSE | 15 + .../README.md | 48 + .../index.js | 71 + .../node_modules/minipass | 1 + .../package.json | 32 + .../LICENSE | 15 + .../README.md | 47 + .../index.js | 39 + .../node_modules/minipass | 1 + .../package.json | 42 + .../LICENSE | 15 + .../README.md | 69 + .../index.js | 127 + .../node_modules/minipass | 1 + .../package.json | 32 + .../_minipass@3.1.1@minipass/LICENSE | 15 + .../_minipass@3.1.1@minipass/README.md | 606 ++ .../_minipass@3.1.1@minipass/index.js | 538 ++ .../node_modules/yallist | 1 + .../_minipass@3.1.1@minipass/package.json | 42 + .../_mkdirp@0.5.1@mkdirp/.travis.yml | 8 + .../node_modules/_mkdirp@0.5.1@mkdirp/LICENSE | 21 + .../_mkdirp@0.5.1@mkdirp/bin/cmd.js | 33 + .../_mkdirp@0.5.1@mkdirp/bin/usage.txt | 12 + .../_mkdirp@0.5.1@mkdirp/examples/pow.js | 6 + .../_mkdirp@0.5.1@mkdirp/index.js | 98 + .../node_modules/minimist | 1 + .../_mkdirp@0.5.1@mkdirp/package.json | 30 + .../_mkdirp@0.5.1@mkdirp/readme.markdown | 100 + .../_mkdirp@0.5.1@mkdirp/test/chmod.js | 41 + .../_mkdirp@0.5.1@mkdirp/test/clobber.js | 38 + .../_mkdirp@0.5.1@mkdirp/test/mkdirp.js | 28 + .../_mkdirp@0.5.1@mkdirp/test/opts_fs.js | 29 + .../_mkdirp@0.5.1@mkdirp/test/opts_fs_sync.js | 27 + .../_mkdirp@0.5.1@mkdirp/test/perm.js | 32 + .../_mkdirp@0.5.1@mkdirp/test/perm_sync.js | 36 + .../_mkdirp@0.5.1@mkdirp/test/race.js | 37 + .../_mkdirp@0.5.1@mkdirp/test/rel.js | 32 + .../_mkdirp@0.5.1@mkdirp/test/return.js | 25 + .../_mkdirp@0.5.1@mkdirp/test/return_sync.js | 24 + .../_mkdirp@0.5.1@mkdirp/test/root.js | 19 + .../_mkdirp@0.5.1@mkdirp/test/sync.js | 32 + .../_mkdirp@0.5.1@mkdirp/test/umask.js | 28 + .../_mkdirp@0.5.1@mkdirp/test/umask_sync.js | 32 + .../LICENSE | 14 + .../README.md | 53 + .../move.js | 84 + .../node_modules/.bin/mkdirp | 1 + .../node_modules/.bin/rimraf | 1 + .../node_modules/aproba | 1 + .../node_modules/copy-concurrently | 1 + .../node_modules/fs-write-stream-atomic | 1 + .../node_modules/mkdirp | 1 + .../node_modules/rimraf | 1 + .../node_modules/run-queue | 1 + .../package.json | 45 + public/node_modules/_once@1.4.0@once/LICENSE | 15 + .../node_modules/_once@1.4.0@once/README.md | 79 + .../_once@1.4.0@once/node_modules/wrappy | 1 + public/node_modules/_once@1.4.0@once/once.js | 42 + .../_once@1.4.0@once/package.json | 36 + .../_p-limit@2.2.2@p-limit/index.d.ts | 29 + .../_p-limit@2.2.2@p-limit/index.js | 52 + .../_p-limit@2.2.2@p-limit/license | 9 + .../_p-limit@2.2.2@p-limit/node_modules/p-try | 1 + .../_p-limit@2.2.2@p-limit/package.json | 55 + .../_p-limit@2.2.2@p-limit/readme.md | 93 + .../_p-locate@4.1.0@p-locate/index.d.ts | 64 + .../_p-locate@4.1.0@p-locate/index.js | 52 + .../_p-locate@4.1.0@p-locate/license | 9 + .../node_modules/p-limit | 1 + .../_p-locate@4.1.0@p-locate/package.json | 56 + .../_p-locate@4.1.0@p-locate/readme.md | 90 + .../_p-map@3.0.0@p-map/index.d.ts | 65 + .../node_modules/_p-map@3.0.0@p-map/index.js | 81 + .../node_modules/_p-map@3.0.0@p-map/license | 9 + .../node_modules/aggregate-error | 1 + .../_p-map@3.0.0@p-map/package.json | 55 + .../node_modules/_p-map@3.0.0@p-map/readme.md | 99 + .../_p-try@2.2.0@p-try/index.d.ts | 39 + .../node_modules/_p-try@2.2.0@p-try/index.js | 9 + .../node_modules/_p-try@2.2.0@p-try/license | 9 + .../_p-try@2.2.0@p-try/package.json | 45 + .../node_modules/_p-try@2.2.0@p-try/readme.md | 58 + .../_path-exists@4.0.0@path-exists/index.d.ts | 28 + .../_path-exists@4.0.0@path-exists/index.js | 23 + .../_path-exists@4.0.0@path-exists/license | 9 + .../package.json | 42 + .../_path-exists@4.0.0@path-exists/readme.md | 52 + .../index.js | 20 + .../license | 21 + .../package.json | 46 + .../readme.md | 59 + .../_pkg-dir@4.2.0@pkg-dir/index.d.ts | 44 + .../_pkg-dir@4.2.0@pkg-dir/index.js | 17 + .../_pkg-dir@4.2.0@pkg-dir/license | 9 + .../node_modules/find-up | 1 + .../_pkg-dir@4.2.0@pkg-dir/package.json | 59 + .../_pkg-dir@4.2.0@pkg-dir/readme.md | 66 + .../index.js | 45 + .../license.md | 19 + .../package.json | 28 + .../readme.md | 18 + .../LICENSE | 14 + .../README.md | 34 + .../inflight.js | 36 + .../package.json | 27 + .../_punycode@2.1.1@punycode/LICENSE-MIT.txt | 20 + .../_punycode@2.1.1@punycode/README.md | 122 + .../_punycode@2.1.1@punycode/package.json | 61 + .../_punycode@2.1.1@punycode/punycode.es6.js | 441 + .../_punycode@2.1.1@punycode/punycode.js | 440 + .../.travis.yml | 55 + .../CONTRIBUTING.md | 38 + .../GOVERNANCE.md | 136 + .../LICENSE | 47 + .../README.md | 58 + .../doc/wg-meetings/2015-01-30.md | 60 + .../duplex-browser.js | 1 + .../duplex.js | 1 + .../lib/_stream_duplex.js | 131 + .../lib/_stream_passthrough.js | 47 + .../lib/_stream_readable.js | 1019 +++ .../lib/_stream_transform.js | 214 + .../lib/_stream_writable.js | 687 ++ .../lib/internal/streams/BufferList.js | 79 + .../lib/internal/streams/destroy.js | 74 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + .../node_modules/core-util-is | 1 + .../node_modules/inherits | 1 + .../node_modules/isarray | 1 + .../node_modules/process-nextick-args | 1 + .../node_modules/safe-buffer | 1 + .../node_modules/string_decoder | 1 + .../node_modules/util-deprecate | 1 + .../package.json | 55 + .../passthrough.js | 1 + .../readable-browser.js | 7 + .../readable.js | 19 + .../transform.js | 1 + .../writable-browser.js | 1 + .../writable.js | 8 + .../node_modules/_rimraf@2.7.1@rimraf/LICENSE | 15 + .../_rimraf@2.7.1@rimraf/README.md | 101 + .../node_modules/_rimraf@2.7.1@rimraf/bin.js | 50 + .../_rimraf@2.7.1@rimraf/node_modules/glob | 1 + .../_rimraf@2.7.1@rimraf/package.json | 32 + .../_rimraf@2.7.1@rimraf/rimraf.js | 372 + .../_run-queue@1.0.3@run-queue/README.md | 86 + .../node_modules/aproba | 1 + .../_run-queue@1.0.3@run-queue/package.json | 36 + .../_run-queue@1.0.3@run-queue/queue.js | 95 + .../_safe-buffer@5.1.2@safe-buffer/LICENSE | 21 + .../_safe-buffer@5.1.2@safe-buffer/README.md | 584 ++ .../_safe-buffer@5.1.2@safe-buffer/index.d.ts | 187 + .../_safe-buffer@5.1.2@safe-buffer/index.js | 62 + .../package.json | 40 + .../CHANGELOG.md | 231 + .../_schema-utils@2.6.1@schema-utils/LICENSE | 20 + .../README.md | 276 + .../declarations/ValidationError.d.ts | 115 + .../declarations/index.d.ts | 2 + .../declarations/keywords/absolutePath.d.ts | 13 + .../declarations/util/Range.d.ts | 43 + .../declarations/validate.d.ts | 43 + .../dist/ValidationError.js | 1286 +++ .../dist/index.js | 5 + .../dist/keywords/absolutePath.js | 87 + .../dist/util/Range.js | 163 + .../dist/validate.js | 153 + .../node_modules/ajv | 1 + .../node_modules/ajv-keywords | 1 + .../package.json | 81 + .../_semver@6.3.0@semver/CHANGELOG.md | 70 + .../node_modules/_semver@6.3.0@semver/LICENSE | 15 + .../_semver@6.3.0@semver/README.md | 443 + .../_semver@6.3.0@semver/bin/semver.js | 174 + .../_semver@6.3.0@semver/package.json | 31 + .../_semver@6.3.0@semver/range.bnf | 16 + .../_semver@6.3.0@semver/semver.js | 1596 ++++ .../LICENSE | 27 + .../README.md | 143 + .../index.js | 210 + .../package.json | 36 + .../LICENSE | 7 + .../README.md | 91 + .../lib/CodeNode.js | 66 + .../lib/MappingsContext.js | 45 + .../lib/SingleLineNode.js | 93 + .../lib/SourceListMap.js | 117 + .../lib/SourceNode.js | 129 + .../lib/base64-vlq.js | 169 + .../lib/fromStringWithSourceMap.js | 102 + .../lib/helpers.js | 23 + .../lib/index.js | 6 + .../package.json | 32 + .../LICENSE.md | 21 + .../README.md | 284 + .../browser-source-map-support.js | 113 + .../node_modules/buffer-from | 1 + .../node_modules/source-map | 1 + .../package.json | 34 + .../register.js | 1 + .../source-map-support.js | 587 ++ .../_source-map@0.6.1@source-map/CHANGELOG.md | 301 + .../_source-map@0.6.1@source-map/LICENSE | 28 + .../_source-map@0.6.1@source-map/README.md | 742 ++ .../dist/source-map.debug.js | 3234 ++++++++ .../dist/source-map.js | 3233 ++++++++ .../dist/source-map.min.js | 2 + .../dist/source-map.min.js.map | 1 + .../lib/array-set.js | 121 + .../lib/base64-vlq.js | 140 + .../lib/base64.js | 67 + .../lib/binary-search.js | 111 + .../lib/mapping-list.js | 79 + .../lib/quick-sort.js | 114 + .../lib/source-map-consumer.js | 1145 +++ .../lib/source-map-generator.js | 425 + .../lib/source-node.js | 413 + .../_source-map@0.6.1@source-map/lib/util.js | 488 ++ .../_source-map@0.6.1@source-map/package.json | 76 + .../source-map.d.ts | 98 + .../source-map.js | 8 + .../_ssri@7.1.0@ssri/CHANGELOG.md | 323 + .../node_modules/_ssri@7.1.0@ssri/LICENSE.md | 16 + .../node_modules/_ssri@7.1.0@ssri/README.md | 528 ++ public/node_modules/_ssri@7.1.0@ssri/index.js | 454 ++ .../node_modules/figgy-pudding | 1 + .../_ssri@7.1.0@ssri/node_modules/minipass | 1 + .../_ssri@7.1.0@ssri/package.json | 59 + .../.travis.yml | 50 + .../LICENSE | 48 + .../README.md | 47 + .../lib/string_decoder.js | 296 + .../node_modules/safe-buffer | 1 + .../package.json | 34 + .../browser.js | 5 + .../index.js | 138 + .../license | 9 + .../node_modules/has-flag | 1 + .../package.json | 56 + .../readme.md | 85 + .../CHANGELOG.md | 246 + .../LICENSE | 20 + .../README.md | 770 ++ .../dist/TaskRunner.js | 87 + .../dist/Webpack4Cache.js | 48 + .../dist/Webpack5Cache.js | 65 + .../dist/cjs.js | 5 + .../dist/index.js | 452 ++ .../dist/minify.js | 178 + .../dist/options.json | 169 + .../dist/worker.js | 19 + .../node_modules/.bin/terser | 1 + .../node_modules/cacache | 1 + .../node_modules/find-cache-dir | 1 + .../node_modules/jest-worker | 1 + .../node_modules/schema-utils | 1 + .../node_modules/serialize-javascript | 1 + .../node_modules/source-map | 1 + .../node_modules/terser | 1 + .../node_modules/webpack-sources | 1 + .../package.json | 100 + .../_terser@4.5.1@terser/CHANGELOG.md | 199 + .../node_modules/_terser@4.5.1@terser/LICENSE | 29 + .../_terser@4.5.1@terser/PATRONS.md | 15 + .../_terser@4.5.1@terser/README.md | 1388 ++++ .../_terser@4.5.1@terser/bin/terser | 476 ++ .../_terser@4.5.1@terser/bin/uglifyjs | 10 + .../_terser@4.5.1@terser/dist/.gitkeep | 0 .../_terser@4.5.1@terser/dist/bundle.min.js | 2 + .../dist/bundle.min.js.map | 1 + .../node_modules/commander | 1 + .../node_modules/source-map | 1 + .../node_modules/source-map-support | 1 + .../_terser@4.5.1@terser/package.json | 125 + .../tools/colorless-console.js | 11 + .../_terser@4.5.1@terser/tools/domprops.js | 5619 +++++++++++++ .../_terser@4.5.1@terser/tools/exit.js | 15 + .../_terser@4.5.1@terser/tools/node.js | 19 + .../_terser@4.5.1@terser/tools/postinstall.js | 7 + .../_terser@4.5.1@terser/tools/props.html | 55 + .../_terser@4.5.1@terser/tools/terser.d.ts | 784 ++ .../.nyc_output/54942.json | 1 + .../.nyc_output/54944.json | 1 + .../LICENSE | 5 + .../README.md | 33 + .../coverage/__root__/index.html | 73 + .../coverage/__root__/index.js.html | 69 + .../coverage/base.css | 182 + .../coverage/index.html | 73 + .../coverage/prettify.css | 1 + .../coverage/prettify.js | 1 + .../coverage/sort-arrow-sprite.png | Bin 0 -> 209 bytes .../coverage/sorter.js | 156 + .../index.js | 8 + .../node_modules/unique-slug | 1 + .../package.json | 30 + .../test/index.js | 23 + .../.travis.yml | 10 + .../_unique-slug@2.0.2@unique-slug/LICENSE | 15 + .../_unique-slug@2.0.2@unique-slug/README.md | 19 + .../_unique-slug@2.0.2@unique-slug/index.js | 11 + .../node_modules/imurmurhash | 1 + .../package.json | 26 + .../test/index.js | 13 + .../_uri-js@4.2.2@uri-js/README.md | 199 + .../_uri-js@4.2.2@uri-js/bower.json | 47 + .../dist/es5/uri.all.d.ts | 59 + .../_uri-js@4.2.2@uri-js/dist/es5/uri.all.js | 1389 ++++ .../dist/es5/uri.all.js.map | 1 + .../dist/es5/uri.all.min.d.ts | 59 + .../dist/es5/uri.all.min.js | 3 + .../dist/es5/uri.all.min.js.map | 1 + .../dist/esnext/index.d.ts | 1 + .../_uri-js@4.2.2@uri-js/dist/esnext/index.js | 13 + .../dist/esnext/index.js.map | 1 + .../dist/esnext/regexps-iri.d.ts | 3 + .../dist/esnext/regexps-iri.js | 3 + .../dist/esnext/regexps-iri.js.map | 1 + .../dist/esnext/regexps-uri.d.ts | 4 + .../dist/esnext/regexps-uri.js | 42 + .../dist/esnext/regexps-uri.js.map | 1 + .../dist/esnext/schemes/http.d.ts | 3 + .../dist/esnext/schemes/http.js | 27 + .../dist/esnext/schemes/http.js.map | 1 + .../dist/esnext/schemes/https.d.ts | 3 + .../dist/esnext/schemes/https.js | 9 + .../dist/esnext/schemes/https.js.map | 1 + .../dist/esnext/schemes/mailto.d.ts | 12 + .../dist/esnext/schemes/mailto.js | 148 + .../dist/esnext/schemes/mailto.js.map | 1 + .../dist/esnext/schemes/urn-uuid.d.ts | 7 + .../dist/esnext/schemes/urn-uuid.js | 23 + .../dist/esnext/schemes/urn-uuid.js.map | 1 + .../dist/esnext/schemes/urn.d.ts | 10 + .../dist/esnext/schemes/urn.js | 49 + .../dist/esnext/schemes/urn.js.map | 1 + .../_uri-js@4.2.2@uri-js/dist/esnext/uri.d.ts | 59 + .../_uri-js@4.2.2@uri-js/dist/esnext/uri.js | 480 ++ .../dist/esnext/uri.js.map | 1 + .../dist/esnext/util.d.ts | 6 + .../_uri-js@4.2.2@uri-js/dist/esnext/util.js | 36 + .../dist/esnext/util.js.map | 1 + .../node_modules/punycode | 1 + .../_uri-js@4.2.2@uri-js/package.json | 68 + .../_uri-js@4.2.2@uri-js/rollup.config.js | 32 + .../_uri-js@4.2.2@uri-js/src/index.ts | 18 + .../_uri-js@4.2.2@uri-js/src/punycode.d.ts | 24 + .../_uri-js@4.2.2@uri-js/src/regexps-iri.ts | 4 + .../_uri-js@4.2.2@uri-js/src/regexps-uri.ts | 89 + .../_uri-js@4.2.2@uri-js/src/schemes/http.ts | 36 + .../_uri-js@4.2.2@uri-js/src/schemes/https.ts | 11 + .../src/schemes/mailto.ts | 182 + .../src/schemes/urn-uuid.ts | 36 + .../_uri-js@4.2.2@uri-js/src/schemes/urn.ts | 69 + .../_uri-js@4.2.2@uri-js/src/uri.ts | 556 ++ .../_uri-js@4.2.2@uri-js/src/util.ts | 40 + .../_uri-js@4.2.2@uri-js/tests/qunit.css | 118 + .../_uri-js@4.2.2@uri-js/tests/qunit.js | 1042 +++ .../tests/test-es5-min.html | 17 + .../_uri-js@4.2.2@uri-js/tests/test-es5.html | 17 + .../_uri-js@4.2.2@uri-js/tests/tests.js | 774 ++ .../_uri-js@4.2.2@uri-js/tsconfig.json | 20 + .../History.md | 16 + .../LICENSE | 24 + .../README.md | 53 + .../browser.js | 67 + .../node.js | 6 + .../package.json | 30 + .../LICENSE | 21 + .../README.md | 230 + .../lib/CachedSource.js | 80 + .../lib/ConcatSource.js | 91 + .../lib/LineToLineMappedSource.js | 49 + .../lib/OriginalSource.js | 70 + .../lib/PrefixSource.js | 95 + .../lib/RawSource.js | 38 + .../lib/ReplaceSource.js | 330 + .../lib/Source.js | 46 + .../lib/SourceAndMapMixin.js | 37 + .../lib/SourceMapSource.js | 57 + .../lib/applySourceMap.js | 185 + .../lib/index.js | 15 + .../node_modules/source-list-map | 1 + .../node_modules/source-map | 1 + .../package.json | 53 + .../node_modules/_wrappy@1.0.2@wrappy/LICENSE | 15 + .../_wrappy@1.0.2@wrappy/README.md | 36 + .../_wrappy@1.0.2@wrappy/package.json | 32 + .../_wrappy@1.0.2@wrappy/wrappy.js | 33 + .../_yallist@3.1.1@yallist/LICENSE | 15 + .../_yallist@3.1.1@yallist/README.md | 204 + .../_yallist@3.1.1@yallist/iterator.js | 8 + .../_yallist@3.1.1@yallist/package.json | 32 + .../_yallist@3.1.1@yallist/yallist.js | 426 + .../_yallist@4.0.0@yallist/LICENSE | 15 + .../_yallist@4.0.0@yallist/README.md | 204 + .../_yallist@4.0.0@yallist/iterator.js | 8 + .../_yallist@4.0.0@yallist/package.json | 32 + .../_yallist@4.0.0@yallist/yallist.js | 426 + public/node_modules/aggregate-error | 1 + public/node_modules/ajv | 1 + public/node_modules/ajv-keywords | 1 + public/node_modules/aproba | 1 + public/node_modules/balanced-match | 1 + public/node_modules/brace-expansion | 1 + public/node_modules/buffer-from | 1 + public/node_modules/cacache | 1 + public/node_modules/chownr | 1 + public/node_modules/clean-stack | 1 + public/node_modules/commander | 1 + public/node_modules/commondir | 1 + public/node_modules/concat-map | 1 + public/node_modules/copy-concurrently | 1 + public/node_modules/core-util-is | 1 + public/node_modules/fast-deep-equal | 1 + .../node_modules/fast-json-stable-stringify | 1 + public/node_modules/figgy-pudding | 1 + public/node_modules/find-cache-dir | 1 + public/node_modules/find-up | 1 + public/node_modules/fs-minipass | 1 + public/node_modules/fs-write-stream-atomic | 1 + public/node_modules/fs.realpath | 1 + public/node_modules/glob | 1 + public/node_modules/graceful-fs | 1 + public/node_modules/has-flag | 1 + public/node_modules/iferr | 1 + public/node_modules/imurmurhash | 1 + public/node_modules/indent-string | 1 + public/node_modules/infer-owner | 1 + public/node_modules/inflight | 1 + public/node_modules/inherits | 1 + public/node_modules/isarray | 1 + public/node_modules/jest-worker | 1 + public/node_modules/json-schema-traverse | 1 + public/node_modules/locate-path | 1 + public/node_modules/lru-cache | 1 + public/node_modules/make-dir | 1 + public/node_modules/merge-stream | 1 + public/node_modules/minimatch | 1 + public/node_modules/minimist | 1 + public/node_modules/minipass | 1 + public/node_modules/minipass-collect | 1 + public/node_modules/minipass-flush | 1 + public/node_modules/minipass-pipeline | 1 + public/node_modules/mkdirp | 1 + public/node_modules/move-concurrently | 1 + public/node_modules/once | 1 + public/node_modules/p-limit | 1 + public/node_modules/p-locate | 1 + public/node_modules/p-map | 1 + public/node_modules/p-try | 1 + public/node_modules/path-exists | 1 + public/node_modules/path-is-absolute | 1 + public/node_modules/pkg-dir | 1 + public/node_modules/process-nextick-args | 1 + public/node_modules/promise-inflight | 1 + public/node_modules/punycode | 1 + public/node_modules/readable-stream | 1 + public/node_modules/rimraf | 1 + public/node_modules/run-queue | 1 + public/node_modules/safe-buffer | 1 + public/node_modules/schema-utils | 1 + public/node_modules/semver | 1 + public/node_modules/serialize-javascript | 1 + public/node_modules/source-list-map | 1 + public/node_modules/source-map | 1 + public/node_modules/source-map-support | 1 + public/node_modules/ssri | 1 + public/node_modules/string_decoder | 1 + public/node_modules/supports-color | 1 + public/node_modules/terser | 1 + public/node_modules/terser-webpack-plugin | 1 + public/node_modules/unique-filename | 1 + public/node_modules/unique-slug | 1 + public/node_modules/uri-js | 1 + public/node_modules/util-deprecate | 1 + public/node_modules/webpack-sources | 1 + public/node_modules/wrappy | 1 + public/node_modules/yallist | 1 + public/react/config/webpack.config.prod.js | 24 +- public/react/src/forge/Main/Index.js | 66 +- 943 files changed, 94600 insertions(+), 44 deletions(-) create mode 100644 public/node_modules/.recently_updates.txt create mode 100644 public/node_modules/_aggregate-error@3.0.1@aggregate-error/index.d.ts create mode 100644 public/node_modules/_aggregate-error@3.0.1@aggregate-error/index.js create mode 100644 public/node_modules/_aggregate-error@3.0.1@aggregate-error/license create mode 120000 public/node_modules/_aggregate-error@3.0.1@aggregate-error/node_modules/clean-stack create mode 120000 public/node_modules/_aggregate-error@3.0.1@aggregate-error/node_modules/indent-string create mode 100644 public/node_modules/_aggregate-error@3.0.1@aggregate-error/package.json create mode 100644 public/node_modules/_aggregate-error@3.0.1@aggregate-error/readme.md create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/LICENSE create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/README.md create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/index.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/_formatLimit.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/_util.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/allRequired.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/anyRequired.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/deepProperties.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/deepRequired.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/_formatLimit.jst create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/patternRequired.jst create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/switch.jst create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/README.md create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/_formatLimit.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/patternRequired.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/switch.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dynamicDefaults.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/formatMaximum.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/formatMinimum.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/index.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/instanceof.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/oneRequired.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/patternRequired.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/prohibited.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/range.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/regexp.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/select.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/switch.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/transform.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/typeof.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/uniqueItemProperties.js create mode 100644 public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/package.json create mode 100644 public/node_modules/_ajv@6.10.2@ajv/.tonic_example.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/LICENSE create mode 100644 public/node_modules/_ajv@6.10.2@ajv/README.md create mode 100644 public/node_modules/_ajv@6.10.2@ajv/dist/ajv.bundle.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/dist/ajv.min.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/dist/ajv.min.js.map create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/ajv.d.ts create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/ajv.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/cache.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/async.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/equal.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/error_classes.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/formats.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/index.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/resolve.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/rules.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/schema_obj.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/ucs2length.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/compile/util.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/data.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/definition_schema.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limit.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitItems.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitLength.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitProperties.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/allOf.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/anyOf.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/coerce.def create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/comment.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/const.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/contains.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/custom.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/defaults.def create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/definitions.def create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/dependencies.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/enum.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/errors.def create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/format.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/if.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/items.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/missing.def create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/multipleOf.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/not.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/oneOf.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/pattern.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/properties.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/propertyNames.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/ref.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/required.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/uniqueItems.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dot/validate.jst create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/README.md create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limit.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitItems.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitLength.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitProperties.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/allOf.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/anyOf.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/comment.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/const.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/contains.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/custom.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/dependencies.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/enum.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/format.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/if.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/index.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/items.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/multipleOf.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/not.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/oneOf.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/pattern.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/properties.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/propertyNames.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/ref.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/required.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/uniqueItems.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/validate.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/keyword.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/refs/data.json create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/refs/json-schema-draft-04.json create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/refs/json-schema-draft-06.json create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/refs/json-schema-draft-07.json create mode 100644 public/node_modules/_ajv@6.10.2@ajv/lib/refs/json-schema-secure.json create mode 120000 public/node_modules/_ajv@6.10.2@ajv/node_modules/fast-deep-equal create mode 120000 public/node_modules/_ajv@6.10.2@ajv/node_modules/fast-json-stable-stringify create mode 120000 public/node_modules/_ajv@6.10.2@ajv/node_modules/json-schema-traverse create mode 120000 public/node_modules/_ajv@6.10.2@ajv/node_modules/uri-js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/package.json create mode 100644 public/node_modules/_ajv@6.10.2@ajv/scripts/.eslintrc.yml create mode 100644 public/node_modules/_ajv@6.10.2@ajv/scripts/bundle.js create mode 100644 public/node_modules/_ajv@6.10.2@ajv/scripts/compile-dots.js create mode 100755 public/node_modules/_ajv@6.10.2@ajv/scripts/info create mode 100755 public/node_modules/_ajv@6.10.2@ajv/scripts/prepare-tests create mode 100755 public/node_modules/_ajv@6.10.2@ajv/scripts/publish-built-version create mode 100755 public/node_modules/_ajv@6.10.2@ajv/scripts/travis-gh-pages create mode 100644 public/node_modules/_aproba@1.2.0@aproba/LICENSE create mode 100644 public/node_modules/_aproba@1.2.0@aproba/README.md create mode 100644 public/node_modules/_aproba@1.2.0@aproba/index.js create mode 100644 public/node_modules/_aproba@1.2.0@aproba/package.json create mode 100644 public/node_modules/_balanced-match@1.0.0@balanced-match/.npmignore create mode 100644 public/node_modules/_balanced-match@1.0.0@balanced-match/LICENSE.md create mode 100644 public/node_modules/_balanced-match@1.0.0@balanced-match/README.md create mode 100644 public/node_modules/_balanced-match@1.0.0@balanced-match/index.js create mode 100644 public/node_modules/_balanced-match@1.0.0@balanced-match/package.json create mode 100644 public/node_modules/_brace-expansion@1.1.11@brace-expansion/LICENSE create mode 100644 public/node_modules/_brace-expansion@1.1.11@brace-expansion/README.md create mode 100644 public/node_modules/_brace-expansion@1.1.11@brace-expansion/index.js create mode 120000 public/node_modules/_brace-expansion@1.1.11@brace-expansion/node_modules/balanced-match create mode 120000 public/node_modules/_brace-expansion@1.1.11@brace-expansion/node_modules/concat-map create mode 100644 public/node_modules/_brace-expansion@1.1.11@brace-expansion/package.json create mode 100644 public/node_modules/_buffer-from@1.1.1@buffer-from/LICENSE create mode 100644 public/node_modules/_buffer-from@1.1.1@buffer-from/index.js create mode 100644 public/node_modules/_buffer-from@1.1.1@buffer-from/package.json create mode 100644 public/node_modules/_buffer-from@1.1.1@buffer-from/readme.md create mode 100644 public/node_modules/_cacache@13.0.1@cacache/CHANGELOG.md create mode 100644 public/node_modules/_cacache@13.0.1@cacache/LICENSE.md create mode 100644 public/node_modules/_cacache@13.0.1@cacache/README.md create mode 100644 public/node_modules/_cacache@13.0.1@cacache/get.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/index.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/content/path.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/content/read.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/content/rm.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/content/write.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/entry-index.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/memoization.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/util/disposer.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/util/fix-owner.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/util/hash-to-segments.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/util/move-file.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/util/tmp.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/lib/verify.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/ls.js create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/.bin/mkdirp create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/.bin/rimraf create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/chownr create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/figgy-pudding create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/fs-minipass create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/glob create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/graceful-fs create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/infer-owner create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/lru-cache create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-collect create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-flush create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-pipeline create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/mkdirp create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/move-concurrently create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/p-map create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/promise-inflight create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/rimraf create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/ssri create mode 120000 public/node_modules/_cacache@13.0.1@cacache/node_modules/unique-filename create mode 100644 public/node_modules/_cacache@13.0.1@cacache/package.json create mode 100644 public/node_modules/_cacache@13.0.1@cacache/put.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/rm.js create mode 100644 public/node_modules/_cacache@13.0.1@cacache/verify.js create mode 100644 public/node_modules/_chownr@1.1.3@chownr/LICENSE create mode 100644 public/node_modules/_chownr@1.1.3@chownr/README.md create mode 100644 public/node_modules/_chownr@1.1.3@chownr/chownr.js create mode 100644 public/node_modules/_chownr@1.1.3@chownr/package.json create mode 100644 public/node_modules/_clean-stack@2.2.0@clean-stack/index.d.ts create mode 100644 public/node_modules/_clean-stack@2.2.0@clean-stack/index.js create mode 100644 public/node_modules/_clean-stack@2.2.0@clean-stack/license create mode 100644 public/node_modules/_clean-stack@2.2.0@clean-stack/package.json create mode 100644 public/node_modules/_clean-stack@2.2.0@clean-stack/readme.md create mode 100644 public/node_modules/_commander@2.20.3@commander/CHANGELOG.md create mode 100644 public/node_modules/_commander@2.20.3@commander/LICENSE create mode 100644 public/node_modules/_commander@2.20.3@commander/Readme.md create mode 100644 public/node_modules/_commander@2.20.3@commander/index.js create mode 100644 public/node_modules/_commander@2.20.3@commander/package.json create mode 100644 public/node_modules/_commander@2.20.3@commander/typings/index.d.ts create mode 100644 public/node_modules/_commondir@1.0.1@commondir/LICENSE create mode 100644 public/node_modules/_commondir@1.0.1@commondir/example/dir.js create mode 100644 public/node_modules/_commondir@1.0.1@commondir/index.js create mode 100644 public/node_modules/_commondir@1.0.1@commondir/package.json create mode 100644 public/node_modules/_commondir@1.0.1@commondir/readme.markdown create mode 100644 public/node_modules/_commondir@1.0.1@commondir/test/dirs.js create mode 100644 public/node_modules/_concat-map@0.0.1@concat-map/.travis.yml create mode 100644 public/node_modules/_concat-map@0.0.1@concat-map/LICENSE create mode 100644 public/node_modules/_concat-map@0.0.1@concat-map/README.markdown create mode 100644 public/node_modules/_concat-map@0.0.1@concat-map/example/map.js create mode 100644 public/node_modules/_concat-map@0.0.1@concat-map/index.js create mode 100644 public/node_modules/_concat-map@0.0.1@concat-map/package.json create mode 100644 public/node_modules/_concat-map@0.0.1@concat-map/test/map.js create mode 100644 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/LICENSE create mode 100644 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/README.md create mode 100644 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/copy.js create mode 100644 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/is-windows.js create mode 120000 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/.bin/mkdirp create mode 120000 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/.bin/rimraf create mode 120000 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/aproba create mode 120000 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/fs-write-stream-atomic create mode 120000 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/iferr create mode 120000 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/mkdirp create mode 120000 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/rimraf create mode 120000 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/run-queue create mode 100644 public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/package.json create mode 100644 public/node_modules/_core-util-is@1.0.2@core-util-is/LICENSE create mode 100644 public/node_modules/_core-util-is@1.0.2@core-util-is/README.md create mode 100644 public/node_modules/_core-util-is@1.0.2@core-util-is/float.patch create mode 100644 public/node_modules/_core-util-is@1.0.2@core-util-is/lib/util.js create mode 100644 public/node_modules/_core-util-is@1.0.2@core-util-is/package.json create mode 100644 public/node_modules/_core-util-is@1.0.2@core-util-is/test.js create mode 100644 public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/LICENSE create mode 100644 public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/README.md create mode 100644 public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/index.d.ts create mode 100644 public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/index.js create mode 100644 public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/package.json create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.eslintrc.yml create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.github/FUNDING.yml create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.travis.yml create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/LICENSE create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/README.md create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/benchmark/index.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/benchmark/test.json create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/key_cmp.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/nested.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/str.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/value_cmp.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/index.d.ts create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/index.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/package.json create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/cmp.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/nested.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/str.js create mode 100644 public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/to-json.js create mode 100644 public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/CHANGELOG.md create mode 100644 public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/LICENSE.md create mode 100644 public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/README.md create mode 100644 public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/index.js create mode 100644 public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/package.json create mode 100644 public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/index.js create mode 100644 public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/license create mode 120000 public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/commondir create mode 120000 public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/make-dir create mode 120000 public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/pkg-dir create mode 100644 public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/package.json create mode 100644 public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/readme.md create mode 100644 public/node_modules/_find-up@4.1.0@find-up/index.d.ts create mode 100644 public/node_modules/_find-up@4.1.0@find-up/index.js create mode 100644 public/node_modules/_find-up@4.1.0@find-up/license create mode 120000 public/node_modules/_find-up@4.1.0@find-up/node_modules/locate-path create mode 120000 public/node_modules/_find-up@4.1.0@find-up/node_modules/path-exists create mode 100644 public/node_modules/_find-up@4.1.0@find-up/package.json create mode 100644 public/node_modules/_find-up@4.1.0@find-up/readme.md create mode 100644 public/node_modules/_fs-minipass@2.0.0@fs-minipass/LICENSE create mode 100644 public/node_modules/_fs-minipass@2.0.0@fs-minipass/README.md create mode 100644 public/node_modules/_fs-minipass@2.0.0@fs-minipass/index.js create mode 120000 public/node_modules/_fs-minipass@2.0.0@fs-minipass/node_modules/minipass create mode 100644 public/node_modules/_fs-minipass@2.0.0@fs-minipass/package.json create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/.npmignore create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/.travis.yml create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/LICENSE create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/README.md create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/index.js create mode 120000 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/graceful-fs create mode 120000 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/iferr create mode 120000 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/imurmurhash create mode 120000 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/readable-stream create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/package.json create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/basic.js create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/chown.js create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/rename-eperm.js create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/rename-fail.js create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/slow-close.js create mode 100644 public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/toolong.js create mode 100644 public/node_modules/_fs.realpath@1.0.0@fs.realpath/LICENSE create mode 100644 public/node_modules/_fs.realpath@1.0.0@fs.realpath/README.md create mode 100644 public/node_modules/_fs.realpath@1.0.0@fs.realpath/index.js create mode 100644 public/node_modules/_fs.realpath@1.0.0@fs.realpath/old.js create mode 100644 public/node_modules/_fs.realpath@1.0.0@fs.realpath/package.json create mode 100644 public/node_modules/_glob@7.1.6@glob/LICENSE create mode 100644 public/node_modules/_glob@7.1.6@glob/README.md create mode 100644 public/node_modules/_glob@7.1.6@glob/changelog.md create mode 100644 public/node_modules/_glob@7.1.6@glob/common.js create mode 100644 public/node_modules/_glob@7.1.6@glob/glob.js create mode 120000 public/node_modules/_glob@7.1.6@glob/node_modules/fs.realpath create mode 120000 public/node_modules/_glob@7.1.6@glob/node_modules/inflight create mode 120000 public/node_modules/_glob@7.1.6@glob/node_modules/inherits create mode 120000 public/node_modules/_glob@7.1.6@glob/node_modules/minimatch create mode 120000 public/node_modules/_glob@7.1.6@glob/node_modules/once create mode 120000 public/node_modules/_glob@7.1.6@glob/node_modules/path-is-absolute create mode 100644 public/node_modules/_glob@7.1.6@glob/package.json create mode 100644 public/node_modules/_glob@7.1.6@glob/sync.js create mode 100644 public/node_modules/_graceful-fs@4.2.3@graceful-fs/LICENSE create mode 100644 public/node_modules/_graceful-fs@4.2.3@graceful-fs/README.md create mode 100644 public/node_modules/_graceful-fs@4.2.3@graceful-fs/clone.js create mode 100644 public/node_modules/_graceful-fs@4.2.3@graceful-fs/graceful-fs.js create mode 100644 public/node_modules/_graceful-fs@4.2.3@graceful-fs/legacy-streams.js create mode 100644 public/node_modules/_graceful-fs@4.2.3@graceful-fs/package.json create mode 100644 public/node_modules/_graceful-fs@4.2.3@graceful-fs/polyfills.js create mode 100644 public/node_modules/_has-flag@3.0.0@has-flag/index.js create mode 100644 public/node_modules/_has-flag@3.0.0@has-flag/license create mode 100644 public/node_modules/_has-flag@3.0.0@has-flag/package.json create mode 100644 public/node_modules/_has-flag@3.0.0@has-flag/readme.md create mode 100644 public/node_modules/_iferr@0.1.5@iferr/.npmignore create mode 100644 public/node_modules/_iferr@0.1.5@iferr/LICENSE create mode 100644 public/node_modules/_iferr@0.1.5@iferr/README.md create mode 100644 public/node_modules/_iferr@0.1.5@iferr/index.coffee create mode 100644 public/node_modules/_iferr@0.1.5@iferr/index.js create mode 100644 public/node_modules/_iferr@0.1.5@iferr/package.json create mode 100644 public/node_modules/_iferr@0.1.5@iferr/test/index.coffee create mode 100644 public/node_modules/_iferr@0.1.5@iferr/test/mocha.opts create mode 100644 public/node_modules/_imurmurhash@0.1.4@imurmurhash/README.md create mode 100644 public/node_modules/_imurmurhash@0.1.4@imurmurhash/imurmurhash.js create mode 100644 public/node_modules/_imurmurhash@0.1.4@imurmurhash/imurmurhash.min.js create mode 100644 public/node_modules/_imurmurhash@0.1.4@imurmurhash/package.json create mode 100644 public/node_modules/_indent-string@4.0.0@indent-string/index.d.ts create mode 100644 public/node_modules/_indent-string@4.0.0@indent-string/index.js create mode 100644 public/node_modules/_indent-string@4.0.0@indent-string/license create mode 100644 public/node_modules/_indent-string@4.0.0@indent-string/package.json create mode 100644 public/node_modules/_indent-string@4.0.0@indent-string/readme.md create mode 100644 public/node_modules/_infer-owner@1.0.4@infer-owner/LICENSE create mode 100644 public/node_modules/_infer-owner@1.0.4@infer-owner/README.md create mode 100644 public/node_modules/_infer-owner@1.0.4@infer-owner/index.js create mode 100644 public/node_modules/_infer-owner@1.0.4@infer-owner/package.json create mode 100644 public/node_modules/_inflight@1.0.6@inflight/LICENSE create mode 100644 public/node_modules/_inflight@1.0.6@inflight/README.md create mode 100644 public/node_modules/_inflight@1.0.6@inflight/inflight.js create mode 120000 public/node_modules/_inflight@1.0.6@inflight/node_modules/once create mode 120000 public/node_modules/_inflight@1.0.6@inflight/node_modules/wrappy create mode 100644 public/node_modules/_inflight@1.0.6@inflight/package.json create mode 100644 public/node_modules/_inherits@2.0.4@inherits/LICENSE create mode 100644 public/node_modules/_inherits@2.0.4@inherits/README.md create mode 100644 public/node_modules/_inherits@2.0.4@inherits/inherits.js create mode 100644 public/node_modules/_inherits@2.0.4@inherits/inherits_browser.js create mode 100644 public/node_modules/_inherits@2.0.4@inherits/package.json create mode 100644 public/node_modules/_isarray@1.0.0@isarray/.npmignore create mode 100644 public/node_modules/_isarray@1.0.0@isarray/.travis.yml create mode 100644 public/node_modules/_isarray@1.0.0@isarray/Makefile create mode 100644 public/node_modules/_isarray@1.0.0@isarray/README.md create mode 100644 public/node_modules/_isarray@1.0.0@isarray/component.json create mode 100644 public/node_modules/_isarray@1.0.0@isarray/index.js create mode 100644 public/node_modules/_isarray@1.0.0@isarray/package.json create mode 100644 public/node_modules/_isarray@1.0.0@isarray/test.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/LICENSE create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/README.md create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.js create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.d.ts create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.d.ts.map create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.js create mode 120000 public/node_modules/_jest-worker@24.9.0@jest-worker/node_modules/merge-stream create mode 120000 public/node_modules/_jest-worker@24.9.0@jest-worker/node_modules/supports-color create mode 100644 public/node_modules/_jest-worker@24.9.0@jest-worker/package.json create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/.eslintrc.yml create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/.travis.yml create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/LICENSE create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/README.md create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/index.js create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/package.json create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/spec/.eslintrc.yml create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/spec/fixtures/schema.js create mode 100644 public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/spec/index.spec.js create mode 100644 public/node_modules/_locate-path@5.0.0@locate-path/index.d.ts create mode 100644 public/node_modules/_locate-path@5.0.0@locate-path/index.js create mode 100644 public/node_modules/_locate-path@5.0.0@locate-path/license create mode 120000 public/node_modules/_locate-path@5.0.0@locate-path/node_modules/p-locate create mode 100644 public/node_modules/_locate-path@5.0.0@locate-path/package.json create mode 100644 public/node_modules/_locate-path@5.0.0@locate-path/readme.md create mode 100644 public/node_modules/_lru-cache@5.1.1@lru-cache/LICENSE create mode 100644 public/node_modules/_lru-cache@5.1.1@lru-cache/README.md create mode 100644 public/node_modules/_lru-cache@5.1.1@lru-cache/index.js create mode 120000 public/node_modules/_lru-cache@5.1.1@lru-cache/node_modules/yallist create mode 100644 public/node_modules/_lru-cache@5.1.1@lru-cache/package.json create mode 100644 public/node_modules/_make-dir@3.0.0@make-dir/index.d.ts create mode 100644 public/node_modules/_make-dir@3.0.0@make-dir/index.js create mode 100644 public/node_modules/_make-dir@3.0.0@make-dir/license create mode 120000 public/node_modules/_make-dir@3.0.0@make-dir/node_modules/.bin/semver create mode 120000 public/node_modules/_make-dir@3.0.0@make-dir/node_modules/semver create mode 100644 public/node_modules/_make-dir@3.0.0@make-dir/package.json create mode 100644 public/node_modules/_make-dir@3.0.0@make-dir/readme.md create mode 100644 public/node_modules/_merge-stream@2.0.0@merge-stream/LICENSE create mode 100644 public/node_modules/_merge-stream@2.0.0@merge-stream/README.md create mode 100644 public/node_modules/_merge-stream@2.0.0@merge-stream/index.js create mode 100644 public/node_modules/_merge-stream@2.0.0@merge-stream/package.json create mode 100644 public/node_modules/_minimatch@3.0.4@minimatch/LICENSE create mode 100644 public/node_modules/_minimatch@3.0.4@minimatch/README.md create mode 100644 public/node_modules/_minimatch@3.0.4@minimatch/minimatch.js create mode 120000 public/node_modules/_minimatch@3.0.4@minimatch/node_modules/brace-expansion create mode 100644 public/node_modules/_minimatch@3.0.4@minimatch/package.json create mode 100644 public/node_modules/_minimist@0.0.8@minimist/.travis.yml create mode 100644 public/node_modules/_minimist@0.0.8@minimist/LICENSE create mode 100644 public/node_modules/_minimist@0.0.8@minimist/example/parse.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/index.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/package.json create mode 100644 public/node_modules/_minimist@0.0.8@minimist/readme.markdown create mode 100644 public/node_modules/_minimist@0.0.8@minimist/test/dash.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/test/default_bool.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/test/dotted.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/test/long.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/test/parse.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/test/parse_modified.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/test/short.js create mode 100644 public/node_modules/_minimist@0.0.8@minimist/test/whitespace.js create mode 100644 public/node_modules/_minipass-collect@1.0.2@minipass-collect/LICENSE create mode 100644 public/node_modules/_minipass-collect@1.0.2@minipass-collect/README.md create mode 100644 public/node_modules/_minipass-collect@1.0.2@minipass-collect/index.js create mode 120000 public/node_modules/_minipass-collect@1.0.2@minipass-collect/node_modules/minipass create mode 100644 public/node_modules/_minipass-collect@1.0.2@minipass-collect/package.json create mode 100644 public/node_modules/_minipass-flush@1.0.5@minipass-flush/LICENSE create mode 100644 public/node_modules/_minipass-flush@1.0.5@minipass-flush/README.md create mode 100644 public/node_modules/_minipass-flush@1.0.5@minipass-flush/index.js create mode 120000 public/node_modules/_minipass-flush@1.0.5@minipass-flush/node_modules/minipass create mode 100644 public/node_modules/_minipass-flush@1.0.5@minipass-flush/package.json create mode 100644 public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/LICENSE create mode 100644 public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/README.md create mode 100644 public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/index.js create mode 120000 public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/node_modules/minipass create mode 100644 public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/package.json create mode 100644 public/node_modules/_minipass@3.1.1@minipass/LICENSE create mode 100644 public/node_modules/_minipass@3.1.1@minipass/README.md create mode 100644 public/node_modules/_minipass@3.1.1@minipass/index.js create mode 120000 public/node_modules/_minipass@3.1.1@minipass/node_modules/yallist create mode 100644 public/node_modules/_minipass@3.1.1@minipass/package.json create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/.travis.yml create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/LICENSE create mode 100755 public/node_modules/_mkdirp@0.5.1@mkdirp/bin/cmd.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/bin/usage.txt create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/examples/pow.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/index.js create mode 120000 public/node_modules/_mkdirp@0.5.1@mkdirp/node_modules/minimist create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/package.json create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/readme.markdown create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/chmod.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/clobber.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/mkdirp.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/opts_fs.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/opts_fs_sync.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/perm.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/perm_sync.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/race.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/rel.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/return.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/return_sync.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/root.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/sync.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/umask.js create mode 100644 public/node_modules/_mkdirp@0.5.1@mkdirp/test/umask_sync.js create mode 100644 public/node_modules/_move-concurrently@1.0.1@move-concurrently/LICENSE create mode 100644 public/node_modules/_move-concurrently@1.0.1@move-concurrently/README.md create mode 100644 public/node_modules/_move-concurrently@1.0.1@move-concurrently/move.js create mode 120000 public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/.bin/mkdirp create mode 120000 public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/.bin/rimraf create mode 120000 public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/aproba create mode 120000 public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/copy-concurrently create mode 120000 public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/fs-write-stream-atomic create mode 120000 public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/mkdirp create mode 120000 public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/rimraf create mode 120000 public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/run-queue create mode 100644 public/node_modules/_move-concurrently@1.0.1@move-concurrently/package.json create mode 100644 public/node_modules/_once@1.4.0@once/LICENSE create mode 100644 public/node_modules/_once@1.4.0@once/README.md create mode 120000 public/node_modules/_once@1.4.0@once/node_modules/wrappy create mode 100644 public/node_modules/_once@1.4.0@once/once.js create mode 100644 public/node_modules/_once@1.4.0@once/package.json create mode 100644 public/node_modules/_p-limit@2.2.2@p-limit/index.d.ts create mode 100644 public/node_modules/_p-limit@2.2.2@p-limit/index.js create mode 100644 public/node_modules/_p-limit@2.2.2@p-limit/license create mode 120000 public/node_modules/_p-limit@2.2.2@p-limit/node_modules/p-try create mode 100644 public/node_modules/_p-limit@2.2.2@p-limit/package.json create mode 100644 public/node_modules/_p-limit@2.2.2@p-limit/readme.md create mode 100644 public/node_modules/_p-locate@4.1.0@p-locate/index.d.ts create mode 100644 public/node_modules/_p-locate@4.1.0@p-locate/index.js create mode 100644 public/node_modules/_p-locate@4.1.0@p-locate/license create mode 120000 public/node_modules/_p-locate@4.1.0@p-locate/node_modules/p-limit create mode 100644 public/node_modules/_p-locate@4.1.0@p-locate/package.json create mode 100644 public/node_modules/_p-locate@4.1.0@p-locate/readme.md create mode 100644 public/node_modules/_p-map@3.0.0@p-map/index.d.ts create mode 100644 public/node_modules/_p-map@3.0.0@p-map/index.js create mode 100644 public/node_modules/_p-map@3.0.0@p-map/license create mode 120000 public/node_modules/_p-map@3.0.0@p-map/node_modules/aggregate-error create mode 100644 public/node_modules/_p-map@3.0.0@p-map/package.json create mode 100644 public/node_modules/_p-map@3.0.0@p-map/readme.md create mode 100644 public/node_modules/_p-try@2.2.0@p-try/index.d.ts create mode 100644 public/node_modules/_p-try@2.2.0@p-try/index.js create mode 100644 public/node_modules/_p-try@2.2.0@p-try/license create mode 100644 public/node_modules/_p-try@2.2.0@p-try/package.json create mode 100644 public/node_modules/_p-try@2.2.0@p-try/readme.md create mode 100644 public/node_modules/_path-exists@4.0.0@path-exists/index.d.ts create mode 100644 public/node_modules/_path-exists@4.0.0@path-exists/index.js create mode 100644 public/node_modules/_path-exists@4.0.0@path-exists/license create mode 100644 public/node_modules/_path-exists@4.0.0@path-exists/package.json create mode 100644 public/node_modules/_path-exists@4.0.0@path-exists/readme.md create mode 100644 public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/index.js create mode 100644 public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/license create mode 100644 public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/package.json create mode 100644 public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/readme.md create mode 100644 public/node_modules/_pkg-dir@4.2.0@pkg-dir/index.d.ts create mode 100644 public/node_modules/_pkg-dir@4.2.0@pkg-dir/index.js create mode 100644 public/node_modules/_pkg-dir@4.2.0@pkg-dir/license create mode 120000 public/node_modules/_pkg-dir@4.2.0@pkg-dir/node_modules/find-up create mode 100644 public/node_modules/_pkg-dir@4.2.0@pkg-dir/package.json create mode 100644 public/node_modules/_pkg-dir@4.2.0@pkg-dir/readme.md create mode 100644 public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/index.js create mode 100644 public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/license.md create mode 100644 public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/package.json create mode 100644 public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/readme.md create mode 100644 public/node_modules/_promise-inflight@1.0.1@promise-inflight/LICENSE create mode 100644 public/node_modules/_promise-inflight@1.0.1@promise-inflight/README.md create mode 100644 public/node_modules/_promise-inflight@1.0.1@promise-inflight/inflight.js create mode 100644 public/node_modules/_promise-inflight@1.0.1@promise-inflight/package.json create mode 100644 public/node_modules/_punycode@2.1.1@punycode/LICENSE-MIT.txt create mode 100644 public/node_modules/_punycode@2.1.1@punycode/README.md create mode 100644 public/node_modules/_punycode@2.1.1@punycode/package.json create mode 100644 public/node_modules/_punycode@2.1.1@punycode/punycode.es6.js create mode 100644 public/node_modules/_punycode@2.1.1@punycode/punycode.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/.travis.yml create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/CONTRIBUTING.md create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/GOVERNANCE.md create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/LICENSE create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/README.md create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/duplex-browser.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/duplex.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_duplex.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_passthrough.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_readable.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_transform.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/BufferList.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/destroy.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/stream-browser.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/stream.js create mode 120000 public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/core-util-is create mode 120000 public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/inherits create mode 120000 public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/isarray create mode 120000 public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/process-nextick-args create mode 120000 public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/safe-buffer create mode 120000 public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/string_decoder create mode 120000 public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/util-deprecate create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/package.json create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/passthrough.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/readable-browser.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/readable.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/transform.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/writable-browser.js create mode 100644 public/node_modules/_readable-stream@2.3.6@readable-stream/writable.js create mode 100644 public/node_modules/_rimraf@2.7.1@rimraf/LICENSE create mode 100644 public/node_modules/_rimraf@2.7.1@rimraf/README.md create mode 100755 public/node_modules/_rimraf@2.7.1@rimraf/bin.js create mode 120000 public/node_modules/_rimraf@2.7.1@rimraf/node_modules/glob create mode 100644 public/node_modules/_rimraf@2.7.1@rimraf/package.json create mode 100644 public/node_modules/_rimraf@2.7.1@rimraf/rimraf.js create mode 100644 public/node_modules/_run-queue@1.0.3@run-queue/README.md create mode 120000 public/node_modules/_run-queue@1.0.3@run-queue/node_modules/aproba create mode 100644 public/node_modules/_run-queue@1.0.3@run-queue/package.json create mode 100644 public/node_modules/_run-queue@1.0.3@run-queue/queue.js create mode 100644 public/node_modules/_safe-buffer@5.1.2@safe-buffer/LICENSE create mode 100644 public/node_modules/_safe-buffer@5.1.2@safe-buffer/README.md create mode 100644 public/node_modules/_safe-buffer@5.1.2@safe-buffer/index.d.ts create mode 100644 public/node_modules/_safe-buffer@5.1.2@safe-buffer/index.js create mode 100644 public/node_modules/_safe-buffer@5.1.2@safe-buffer/package.json create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/CHANGELOG.md create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/LICENSE create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/README.md create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/ValidationError.d.ts create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/index.d.ts create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/keywords/absolutePath.d.ts create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/util/Range.d.ts create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/validate.d.ts create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/dist/ValidationError.js create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/dist/index.js create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/dist/keywords/absolutePath.js create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/dist/util/Range.js create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/dist/validate.js create mode 120000 public/node_modules/_schema-utils@2.6.1@schema-utils/node_modules/ajv create mode 120000 public/node_modules/_schema-utils@2.6.1@schema-utils/node_modules/ajv-keywords create mode 100644 public/node_modules/_schema-utils@2.6.1@schema-utils/package.json create mode 100644 public/node_modules/_semver@6.3.0@semver/CHANGELOG.md create mode 100644 public/node_modules/_semver@6.3.0@semver/LICENSE create mode 100644 public/node_modules/_semver@6.3.0@semver/README.md create mode 100755 public/node_modules/_semver@6.3.0@semver/bin/semver.js create mode 100644 public/node_modules/_semver@6.3.0@semver/package.json create mode 100644 public/node_modules/_semver@6.3.0@semver/range.bnf create mode 100644 public/node_modules/_semver@6.3.0@semver/semver.js create mode 100644 public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/LICENSE create mode 100644 public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/README.md create mode 100644 public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/index.js create mode 100644 public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/package.json create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/LICENSE create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/README.md create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/CodeNode.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/MappingsContext.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SingleLineNode.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SourceListMap.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SourceNode.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/base64-vlq.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/fromStringWithSourceMap.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/helpers.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/lib/index.js create mode 100644 public/node_modules/_source-list-map@2.0.1@source-list-map/package.json create mode 100644 public/node_modules/_source-map-support@0.5.16@source-map-support/LICENSE.md create mode 100644 public/node_modules/_source-map-support@0.5.16@source-map-support/README.md create mode 100644 public/node_modules/_source-map-support@0.5.16@source-map-support/browser-source-map-support.js create mode 120000 public/node_modules/_source-map-support@0.5.16@source-map-support/node_modules/buffer-from create mode 120000 public/node_modules/_source-map-support@0.5.16@source-map-support/node_modules/source-map create mode 100644 public/node_modules/_source-map-support@0.5.16@source-map-support/package.json create mode 100644 public/node_modules/_source-map-support@0.5.16@source-map-support/register.js create mode 100644 public/node_modules/_source-map-support@0.5.16@source-map-support/source-map-support.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/CHANGELOG.md create mode 100644 public/node_modules/_source-map@0.6.1@source-map/LICENSE create mode 100644 public/node_modules/_source-map@0.6.1@source-map/README.md create mode 100644 public/node_modules/_source-map@0.6.1@source-map/dist/source-map.debug.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/dist/source-map.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/dist/source-map.min.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/dist/source-map.min.js.map create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/array-set.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/base64-vlq.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/base64.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/binary-search.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/mapping-list.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/quick-sort.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/source-map-consumer.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/source-map-generator.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/source-node.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/lib/util.js create mode 100644 public/node_modules/_source-map@0.6.1@source-map/package.json create mode 100644 public/node_modules/_source-map@0.6.1@source-map/source-map.d.ts create mode 100644 public/node_modules/_source-map@0.6.1@source-map/source-map.js create mode 100644 public/node_modules/_ssri@7.1.0@ssri/CHANGELOG.md create mode 100644 public/node_modules/_ssri@7.1.0@ssri/LICENSE.md create mode 100644 public/node_modules/_ssri@7.1.0@ssri/README.md create mode 100644 public/node_modules/_ssri@7.1.0@ssri/index.js create mode 120000 public/node_modules/_ssri@7.1.0@ssri/node_modules/figgy-pudding create mode 120000 public/node_modules/_ssri@7.1.0@ssri/node_modules/minipass create mode 100644 public/node_modules/_ssri@7.1.0@ssri/package.json create mode 100644 public/node_modules/_string_decoder@1.1.1@string_decoder/.travis.yml create mode 100644 public/node_modules/_string_decoder@1.1.1@string_decoder/LICENSE create mode 100644 public/node_modules/_string_decoder@1.1.1@string_decoder/README.md create mode 100644 public/node_modules/_string_decoder@1.1.1@string_decoder/lib/string_decoder.js create mode 120000 public/node_modules/_string_decoder@1.1.1@string_decoder/node_modules/safe-buffer create mode 100644 public/node_modules/_string_decoder@1.1.1@string_decoder/package.json create mode 100644 public/node_modules/_supports-color@6.1.0@supports-color/browser.js create mode 100644 public/node_modules/_supports-color@6.1.0@supports-color/index.js create mode 100644 public/node_modules/_supports-color@6.1.0@supports-color/license create mode 120000 public/node_modules/_supports-color@6.1.0@supports-color/node_modules/has-flag create mode 100644 public/node_modules/_supports-color@6.1.0@supports-color/package.json create mode 100644 public/node_modules/_supports-color@6.1.0@supports-color/readme.md create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/CHANGELOG.md create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/LICENSE create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/README.md create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/dist/TaskRunner.js create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/dist/Webpack4Cache.js create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/dist/Webpack5Cache.js create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/dist/cjs.js create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/dist/index.js create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/dist/minify.js create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/dist/options.json create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/dist/worker.js create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/.bin/terser create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/cacache create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/find-cache-dir create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/jest-worker create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/schema-utils create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/serialize-javascript create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/source-map create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/terser create mode 120000 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/node_modules/webpack-sources create mode 100644 public/node_modules/_terser-webpack-plugin@2.3.1@terser-webpack-plugin/package.json create mode 100644 public/node_modules/_terser@4.5.1@terser/CHANGELOG.md create mode 100644 public/node_modules/_terser@4.5.1@terser/LICENSE create mode 100644 public/node_modules/_terser@4.5.1@terser/PATRONS.md create mode 100644 public/node_modules/_terser@4.5.1@terser/README.md create mode 100755 public/node_modules/_terser@4.5.1@terser/bin/terser create mode 100755 public/node_modules/_terser@4.5.1@terser/bin/uglifyjs create mode 100644 public/node_modules/_terser@4.5.1@terser/dist/.gitkeep create mode 100644 public/node_modules/_terser@4.5.1@terser/dist/bundle.min.js create mode 100644 public/node_modules/_terser@4.5.1@terser/dist/bundle.min.js.map create mode 120000 public/node_modules/_terser@4.5.1@terser/node_modules/commander create mode 120000 public/node_modules/_terser@4.5.1@terser/node_modules/source-map create mode 120000 public/node_modules/_terser@4.5.1@terser/node_modules/source-map-support create mode 100644 public/node_modules/_terser@4.5.1@terser/package.json create mode 100644 public/node_modules/_terser@4.5.1@terser/tools/colorless-console.js create mode 100644 public/node_modules/_terser@4.5.1@terser/tools/domprops.js create mode 100644 public/node_modules/_terser@4.5.1@terser/tools/exit.js create mode 100644 public/node_modules/_terser@4.5.1@terser/tools/node.js create mode 100644 public/node_modules/_terser@4.5.1@terser/tools/postinstall.js create mode 100644 public/node_modules/_terser@4.5.1@terser/tools/props.html create mode 100644 public/node_modules/_terser@4.5.1@terser/tools/terser.d.ts create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/.nyc_output/54942.json create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/.nyc_output/54944.json create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/LICENSE create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/README.md create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/__root__/index.html create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/__root__/index.js.html create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/base.css create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/index.html create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/prettify.css create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/prettify.js create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/sort-arrow-sprite.png create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/sorter.js create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/index.js create mode 120000 public/node_modules/_unique-filename@1.1.1@unique-filename/node_modules/unique-slug create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/package.json create mode 100644 public/node_modules/_unique-filename@1.1.1@unique-filename/test/index.js create mode 100644 public/node_modules/_unique-slug@2.0.2@unique-slug/.travis.yml create mode 100644 public/node_modules/_unique-slug@2.0.2@unique-slug/LICENSE create mode 100644 public/node_modules/_unique-slug@2.0.2@unique-slug/README.md create mode 100644 public/node_modules/_unique-slug@2.0.2@unique-slug/index.js create mode 120000 public/node_modules/_unique-slug@2.0.2@unique-slug/node_modules/imurmurhash create mode 100644 public/node_modules/_unique-slug@2.0.2@unique-slug/package.json create mode 100644 public/node_modules/_unique-slug@2.0.2@unique-slug/test/index.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/README.md create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/bower.json create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.js.map create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.js.map create mode 120000 public/node_modules/_uri-js@4.2.2@uri-js/node_modules/punycode create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/package.json create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/rollup.config.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/index.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/punycode.d.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/regexps-iri.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/regexps-uri.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/http.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/https.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/mailto.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/urn-uuid.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/urn.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/uri.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/src/util.ts create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/tests/qunit.css create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/tests/qunit.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/tests/test-es5-min.html create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/tests/test-es5.html create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/tests/tests.js create mode 100644 public/node_modules/_uri-js@4.2.2@uri-js/tsconfig.json create mode 100644 public/node_modules/_util-deprecate@1.0.2@util-deprecate/History.md create mode 100644 public/node_modules/_util-deprecate@1.0.2@util-deprecate/LICENSE create mode 100644 public/node_modules/_util-deprecate@1.0.2@util-deprecate/README.md create mode 100644 public/node_modules/_util-deprecate@1.0.2@util-deprecate/browser.js create mode 100644 public/node_modules/_util-deprecate@1.0.2@util-deprecate/node.js create mode 100644 public/node_modules/_util-deprecate@1.0.2@util-deprecate/package.json create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/LICENSE create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/README.md create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/CachedSource.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/ConcatSource.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/LineToLineMappedSource.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/OriginalSource.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/PrefixSource.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/RawSource.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/ReplaceSource.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/Source.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/SourceAndMapMixin.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/SourceMapSource.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/applySourceMap.js create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/index.js create mode 120000 public/node_modules/_webpack-sources@1.4.3@webpack-sources/node_modules/source-list-map create mode 120000 public/node_modules/_webpack-sources@1.4.3@webpack-sources/node_modules/source-map create mode 100644 public/node_modules/_webpack-sources@1.4.3@webpack-sources/package.json create mode 100644 public/node_modules/_wrappy@1.0.2@wrappy/LICENSE create mode 100644 public/node_modules/_wrappy@1.0.2@wrappy/README.md create mode 100644 public/node_modules/_wrappy@1.0.2@wrappy/package.json create mode 100644 public/node_modules/_wrappy@1.0.2@wrappy/wrappy.js create mode 100644 public/node_modules/_yallist@3.1.1@yallist/LICENSE create mode 100644 public/node_modules/_yallist@3.1.1@yallist/README.md create mode 100644 public/node_modules/_yallist@3.1.1@yallist/iterator.js create mode 100644 public/node_modules/_yallist@3.1.1@yallist/package.json create mode 100644 public/node_modules/_yallist@3.1.1@yallist/yallist.js create mode 100644 public/node_modules/_yallist@4.0.0@yallist/LICENSE create mode 100644 public/node_modules/_yallist@4.0.0@yallist/README.md create mode 100644 public/node_modules/_yallist@4.0.0@yallist/iterator.js create mode 100644 public/node_modules/_yallist@4.0.0@yallist/package.json create mode 100644 public/node_modules/_yallist@4.0.0@yallist/yallist.js create mode 120000 public/node_modules/aggregate-error create mode 120000 public/node_modules/ajv create mode 120000 public/node_modules/ajv-keywords create mode 120000 public/node_modules/aproba create mode 120000 public/node_modules/balanced-match create mode 120000 public/node_modules/brace-expansion create mode 120000 public/node_modules/buffer-from create mode 120000 public/node_modules/cacache create mode 120000 public/node_modules/chownr create mode 120000 public/node_modules/clean-stack create mode 120000 public/node_modules/commander create mode 120000 public/node_modules/commondir create mode 120000 public/node_modules/concat-map create mode 120000 public/node_modules/copy-concurrently create mode 120000 public/node_modules/core-util-is create mode 120000 public/node_modules/fast-deep-equal create mode 120000 public/node_modules/fast-json-stable-stringify create mode 120000 public/node_modules/figgy-pudding create mode 120000 public/node_modules/find-cache-dir create mode 120000 public/node_modules/find-up create mode 120000 public/node_modules/fs-minipass create mode 120000 public/node_modules/fs-write-stream-atomic create mode 120000 public/node_modules/fs.realpath create mode 120000 public/node_modules/glob create mode 120000 public/node_modules/graceful-fs create mode 120000 public/node_modules/has-flag create mode 120000 public/node_modules/iferr create mode 120000 public/node_modules/imurmurhash create mode 120000 public/node_modules/indent-string create mode 120000 public/node_modules/infer-owner create mode 120000 public/node_modules/inflight create mode 120000 public/node_modules/inherits create mode 120000 public/node_modules/isarray create mode 120000 public/node_modules/jest-worker create mode 120000 public/node_modules/json-schema-traverse create mode 120000 public/node_modules/locate-path create mode 120000 public/node_modules/lru-cache create mode 120000 public/node_modules/make-dir create mode 120000 public/node_modules/merge-stream create mode 120000 public/node_modules/minimatch create mode 120000 public/node_modules/minimist create mode 120000 public/node_modules/minipass create mode 120000 public/node_modules/minipass-collect create mode 120000 public/node_modules/minipass-flush create mode 120000 public/node_modules/minipass-pipeline create mode 120000 public/node_modules/mkdirp create mode 120000 public/node_modules/move-concurrently create mode 120000 public/node_modules/once create mode 120000 public/node_modules/p-limit create mode 120000 public/node_modules/p-locate create mode 120000 public/node_modules/p-map create mode 120000 public/node_modules/p-try create mode 120000 public/node_modules/path-exists create mode 120000 public/node_modules/path-is-absolute create mode 120000 public/node_modules/pkg-dir create mode 120000 public/node_modules/process-nextick-args create mode 120000 public/node_modules/promise-inflight create mode 120000 public/node_modules/punycode create mode 120000 public/node_modules/readable-stream create mode 120000 public/node_modules/rimraf create mode 120000 public/node_modules/run-queue create mode 120000 public/node_modules/safe-buffer create mode 120000 public/node_modules/schema-utils create mode 120000 public/node_modules/semver create mode 120000 public/node_modules/serialize-javascript create mode 120000 public/node_modules/source-list-map create mode 120000 public/node_modules/source-map create mode 120000 public/node_modules/source-map-support create mode 120000 public/node_modules/ssri create mode 120000 public/node_modules/string_decoder create mode 120000 public/node_modules/supports-color create mode 120000 public/node_modules/terser create mode 120000 public/node_modules/terser-webpack-plugin create mode 120000 public/node_modules/unique-filename create mode 120000 public/node_modules/unique-slug create mode 120000 public/node_modules/uri-js create mode 120000 public/node_modules/util-deprecate create mode 120000 public/node_modules/webpack-sources create mode 120000 public/node_modules/wrappy create mode 120000 public/node_modules/yallist diff --git a/public/node_modules/.recently_updates.txt b/public/node_modules/.recently_updates.txt new file mode 100644 index 000000000..4a0685de3 --- /dev/null +++ b/public/node_modules/.recently_updates.txt @@ -0,0 +1,5 @@ +Recently updated (since 2019-12-27) + Today: + → terser-webpack-plugin@2.3.1 › terser@^4.4.3(4.5.1) (03:21:54) + 2020-01-02 + → terser-webpack-plugin@2.3.1 › find-cache-dir@3.2.0 › pkg-dir@4.2.0 › find-up@4.1.0 › locate-path@5.0.0 › p-locate@4.1.0 › p-limit@^2.2.0(2.2.2) (02:42:31) diff --git a/public/node_modules/_aggregate-error@3.0.1@aggregate-error/index.d.ts b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/index.d.ts new file mode 100644 index 000000000..2cec44a00 --- /dev/null +++ b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/index.d.ts @@ -0,0 +1,51 @@ +/** +Create an error from multiple errors. +*/ +declare class AggregateError extends Error implements Iterable { + readonly name: 'AggregateError'; + + /** + @param errors - If a string, a new `Error` is created with the string as the error message. If a non-Error object, a new `Error` is created with all properties from the object copied over. + @returns An Error that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors. + + @example + ``` + import AggregateError = require('aggregate-error'); + + const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]); + + throw error; + + // AggregateError: + // Error: foo + // at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:33) + // Error: bar + // at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) + // Error: baz + // at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) + // at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3) + // at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) + // at Module._compile (module.js:556:32) + // at Object.Module._extensions..js (module.js:565:10) + // at Module.load (module.js:473:32) + // at tryModuleLoad (module.js:432:12) + // at Function.Module._load (module.js:424:3) + // at Module.runMain (module.js:590:10) + // at run (bootstrap_node.js:394:7) + // at startup (bootstrap_node.js:149:9) + + + for (const individualError of error) { + console.log(individualError); + } + //=> [Error: foo] + //=> [Error: bar] + //=> [Error: baz] + ``` + */ + constructor(errors: ReadonlyArray); + + [Symbol.iterator](): IterableIterator; +} + +export = AggregateError; diff --git a/public/node_modules/_aggregate-error@3.0.1@aggregate-error/index.js b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/index.js new file mode 100644 index 000000000..ba5bf0221 --- /dev/null +++ b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/index.js @@ -0,0 +1,47 @@ +'use strict'; +const indentString = require('indent-string'); +const cleanStack = require('clean-stack'); + +const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); + +class AggregateError extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); + } + + errors = [...errors].map(error => { + if (error instanceof Error) { + return error; + } + + if (error !== null && typeof error === 'object') { + // Handle plain error objects with message property and/or possibly other metadata + return Object.assign(new Error(error.message), error); + } + + return new Error(error); + }); + + let message = errors + .map(error => { + // The `stack` property is not standardized, so we can't assume it exists + return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error); + }) + .join('\n'); + message = '\n' + indentString(message, 4); + super(message); + + this.name = 'AggregateError'; + + Object.defineProperty(this, '_errors', {value: errors}); + } + + * [Symbol.iterator]() { + for (const error of this._errors) { + yield error; + } + } +} + +module.exports = AggregateError; diff --git a/public/node_modules/_aggregate-error@3.0.1@aggregate-error/license b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_aggregate-error@3.0.1@aggregate-error/node_modules/clean-stack b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/node_modules/clean-stack new file mode 120000 index 000000000..b2a0359e1 --- /dev/null +++ b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/node_modules/clean-stack @@ -0,0 +1 @@ +../../_clean-stack@2.2.0@clean-stack \ No newline at end of file diff --git a/public/node_modules/_aggregate-error@3.0.1@aggregate-error/node_modules/indent-string b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/node_modules/indent-string new file mode 120000 index 000000000..52f7b4bc8 --- /dev/null +++ b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/node_modules/indent-string @@ -0,0 +1 @@ +../../_indent-string@4.0.0@indent-string \ No newline at end of file diff --git a/public/node_modules/_aggregate-error@3.0.1@aggregate-error/package.json b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/package.json new file mode 100644 index 000000000..22dde99c0 --- /dev/null +++ b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/package.json @@ -0,0 +1,44 @@ +{ + "name": "aggregate-error", + "version": "3.0.1", + "description": "Create an error from multiple errors", + "license": "MIT", + "repository": "sindresorhus/aggregate-error", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "aggregate", + "error", + "combine", + "multiple", + "many", + "collection", + "iterable", + "iterator" + ], + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.7.1", + "xo": "^0.25.3" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "aggregate-error@3.0.1", + "_resolved": "https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_aggregate-error@3.0.1@aggregate-error/readme.md b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/readme.md new file mode 100644 index 000000000..850de98a8 --- /dev/null +++ b/public/node_modules/_aggregate-error@3.0.1@aggregate-error/readme.md @@ -0,0 +1,61 @@ +# aggregate-error [![Build Status](https://travis-ci.org/sindresorhus/aggregate-error.svg?branch=master)](https://travis-ci.org/sindresorhus/aggregate-error) + +> Create an error from multiple errors + + +## Install + +``` +$ npm install aggregate-error +``` + + +## Usage + +```js +const AggregateError = require('aggregate-error'); + +const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]); + +throw error; +/* +AggregateError: + Error: foo + at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:33) + Error: bar + at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) + Error: baz + at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) + at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3) + at Object. (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) + at Module._compile (module.js:556:32) + at Object.Module._extensions..js (module.js:565:10) + at Module.load (module.js:473:32) + at tryModuleLoad (module.js:432:12) + at Function.Module._load (module.js:424:3) + at Module.runMain (module.js:590:10) + at run (bootstrap_node.js:394:7) + at startup (bootstrap_node.js:149:9) +*/ + +for (const individualError of error) { + console.log(individualError); +} +//=> [Error: foo] +//=> [Error: bar] +//=> [Error: baz] +``` + + +## API + +### AggregateError(errors) + +Returns an `Error` that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors. + +#### errors + +Type: `Array` + +If a string, a new `Error` is created with the string as the error message.
+If a non-Error object, a new `Error` is created with all properties from the object copied over. diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/LICENSE b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/LICENSE new file mode 100644 index 000000000..90139aa74 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/README.md b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/README.md new file mode 100644 index 000000000..2221bfb95 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/README.md @@ -0,0 +1,820 @@ +# ajv-keywords + +Custom JSON-Schema keywords for [Ajv](https://github.com/epoberezkin/ajv) validator + +[![Build Status](https://travis-ci.org/epoberezkin/ajv-keywords.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv-keywords) +[![npm](https://img.shields.io/npm/v/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords) +[![npm downloads](https://img.shields.io/npm/dm/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords) +[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/ajv-keywords/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/ajv-keywords?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv-keywords.svg)](https://greenkeeper.io/) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) + + +## Contents + +- [Install](#install) +- [Usage](#usage) +- [Keywords](#keywords) + - [Types](#types) + - [typeof](#typeof) + - [instanceof](#instanceof) + - [Keywords for numbers](#keywords-for-numbers) + - [range and exclusiveRange](#range-and-exclusiverange) + - [Keywords for strings](#keywords-for-strings) + - [regexp](#regexp) + - [formatMaximum / formatMinimum and formatExclusiveMaximum / formatExclusiveMinimum](#formatmaximum--formatminimum-and-formatexclusivemaximum--formatexclusiveminimum) + - [transform](#transform)\* + - [Keywords for arrays](#keywords-for-arrays) + - [uniqueItemProperties](#uniqueitemproperties) + - [Keywords for objects](#keywords-for-objects) + - [allRequired](#allrequired) + - [anyRequired](#anyrequired) + - [oneRequired](#onerequired) + - [patternRequired](#patternrequired) + - [prohibited](#prohibited) + - [deepProperties](#deepproperties) + - [deepRequired](#deeprequired) + - [Compound keywords](#compound-keywords) + - [switch](#switch) (deprecated) + - [select/selectCases/selectDefault](#selectselectcasesselectdefault) (BETA) + - [Keywords for all types](#keywords-for-all-types) + - [dynamicDefaults](#dynamicdefaults)\* +- [License](#license) + +\* - keywords that modify data + + +## Install + +``` +npm install ajv-keywords +``` + + +## Usage + +To add all available keywords: + +```javascript +var Ajv = require('ajv'); +var ajv = new Ajv; +require('ajv-keywords')(ajv); + +ajv.validate({ instanceof: 'RegExp' }, /.*/); // true +ajv.validate({ instanceof: 'RegExp' }, '.*'); // false +``` + +To add a single keyword: + +```javascript +require('ajv-keywords')(ajv, 'instanceof'); +``` + +To add multiple keywords: + +```javascript +require('ajv-keywords')(ajv, ['typeof', 'instanceof']); +``` + +To add a single keyword in browser (to avoid adding unused code): + +```javascript +require('ajv-keywords/keywords/instanceof')(ajv); +``` + + +## Keywords + +### Types + +#### `typeof` + +Based on JavaScript `typeof` operation. + +The value of the keyword should be a string (`"undefined"`, `"string"`, `"number"`, `"object"`, `"function"`, `"boolean"` or `"symbol"`) or array of strings. + +To pass validation the result of `typeof` operation on the value should be equal to the string (or one of the strings in the array). + +``` +ajv.validate({ typeof: 'undefined' }, undefined); // true +ajv.validate({ typeof: 'undefined' }, null); // false +ajv.validate({ typeof: ['undefined', 'object'] }, null); // true +``` + + +#### `instanceof` + +Based on JavaScript `instanceof` operation. + +The value of the keyword should be a string (`"Object"`, `"Array"`, `"Function"`, `"Number"`, `"String"`, `"Date"`, `"RegExp"`, `"Promise"` or `"Buffer"`) or array of strings. + +To pass validation the result of `data instanceof ...` operation on the value should be true: + +``` +ajv.validate({ instanceof: 'Array' }, []); // true +ajv.validate({ instanceof: 'Array' }, {}); // false +ajv.validate({ instanceof: ['Array', 'Function'] }, function(){}); // true +``` + +You can add your own constructor function to be recognised by this keyword: + +```javascript +function MyClass() {} +var instanceofDefinition = require('ajv-keywords').get('instanceof').definition; +// or require('ajv-keywords/keywords/instanceof').definition; +instanceofDefinition.CONSTRUCTORS.MyClass = MyClass; + +ajv.validate({ instanceof: 'MyClass' }, new MyClass); // true +``` + + +### Keywords for numbers + +#### `range` and `exclusiveRange` + +Syntax sugar for the combination of minimum and maximum keywords, also fails schema compilation if there are no numbers in the range. + +The value of this keyword must be the array consisting of two numbers, the second must be greater or equal than the first one. + +If the validated value is not a number the validation passes, otherwise to pass validation the value should be greater (or equal) than the first number and smaller (or equal) than the second number in the array. If `exclusiveRange` keyword is present in the same schema and its value is true, the validated value must not be equal to the range boundaries. + +```javascript +var schema = { range: [1, 3] }; +ajv.validate(schema, 1); // true +ajv.validate(schema, 2); // true +ajv.validate(schema, 3); // true +ajv.validate(schema, 0.99); // false +ajv.validate(schema, 3.01); // false + +var schema = { range: [1, 3], exclusiveRange: true }; +ajv.validate(schema, 1.01); // true +ajv.validate(schema, 2); // true +ajv.validate(schema, 2.99); // true +ajv.validate(schema, 1); // false +ajv.validate(schema, 3); // false +``` + + +### Keywords for strings + +#### `regexp` + +This keyword allows to use regular expressions with flags in schemas (the standard `pattern` keyword does not support flags). + +This keyword applies only to strings. If the data is not a string, the validation succeeds. + +The value of this keyword can be either a string (the result of `regexp.toString()`) or an object with the properties `pattern` and `flags` (the same strings that should be passed to RegExp constructor). + +```javascript +var schema = { + type: 'object', + properties: { + foo: { regexp: '/foo/i' }, + bar: { regexp: { pattern: 'bar', flags: 'i' } } + } +}; + +var validData = { + foo: 'Food', + bar: 'Barmen' +}; + +var invalidData = { + foo: 'fog', + bar: 'bad' +}; +``` + + +#### `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` + +These keywords allow to define minimum/maximum constraints when the format keyword defines ordering. + +These keywords apply only to strings. If the data is not a string, the validation succeeds. + +The value of keyword `formatMaximum` (`formatMinimum`) should be a string. This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword. If `format` is not present schema compilation will throw exception. + +When this keyword is added, it defines comparison rules for formats `"date"`, `"time"` and `"date-time"`. Custom formats also can have comparison rules. See [addFormat](https://github.com/epoberezkin/ajv#api-addformat) method. + +The value of keyword `formatExclusiveMaximum` (`formatExclusiveMinimum`) should be a boolean value. These keyword cannot be used without `formatMaximum` (`formatMinimum`). If this keyword value is equal to `true`, the data to be valid should not be equal to the value in `formatMaximum` (`formatMinimum`) keyword. + +```javascript +require('ajv-keywords')(ajv, ['formatMinimum', 'formatMaximum']); + +var schema = { + format: 'date', + formatMinimum: '2016-02-06', + formatMaximum: '2016-12-27', + formatExclusiveMaximum: true +} + +var validDataList = ['2016-02-06', '2016-12-26', 1]; + +var invalidDataList = ['2016-02-05', '2016-12-27', 'abc']; +``` + + +#### `transform` + +This keyword allows a string to be modified before validation. + +These keywords apply only to strings. If the data is not a string, the transform is skipped. + +There are limitation due to how ajv is written: +- a stand alone string cannot be transformed. ie `data = 'a'; ajv.validate(schema, data);` +- currently cannot work with `ajv-pack` + +**Supported options:** +- `trim`: remove whitespace from start and end +- `trimLeft`: remove whitespace from start +- `trimRight`: remove whitespace from end +- `toLowerCase`: case string to all lower case +- `toUpperCase`: case string to all upper case +- `toEnumCase`: case string to match case in schema + +Options are applied in the order they are listed. + +Note: `toEnumCase` requires that all allowed values are unique when case insensitive. + +**Example: multiple options** +```javascript +require('ajv-keywords')(ajv, ['transform']); + +var schema = { + type: 'array', + items: { + type:'string', + transform:['trim','toLowerCase'] + } +}; + +var data = [' MixCase ']; +ajv.validate(schema, data); +console.log(data); // ['mixcase'] + +``` + +**Example: `enumcase`** +```javascript +require('ajv-keywords')(ajv, ['transform']); + +var schema = { + type: 'array', + items: { + type:'string', + transform:['trim','toEnumCase'], + enum:['pH'] + } +}; + +var data = ['ph',' Ph','PH','pH ']; +ajv.validate(schema, data); +console.log(data); // ['pH','pH','pH','pH'] +``` + + +### Keywords for arrays + +#### `uniqueItemProperties` + +The keyword allows to check that some properties in array items are unique. + +This keyword applies only to arrays. If the data is not an array, the validation succeeds. + +The value of this keyword must be an array of strings - property names that should have unique values across all items. + +```javascript +var schema = { uniqueItemProperties: [ "id", "name" ] }; + +var validData = [ + { id: 1 }, + { id: 2 }, + { id: 3 } +]; + +var invalidData1 = [ + { id: 1 }, + { id: 1 }, // duplicate "id" + { id: 3 } +]; + +var invalidData2 = [ + { id: 1, name: "taco" }, + { id: 2, name: "taco" }, // duplicate "name" + { id: 3, name: "salsa" } +]; +``` + +This keyword is contributed by [@blainesch](https://github.com/blainesch). + + +### Keywords for objects + +#### `allRequired` + +This keyword allows to require the presence of all properties used in `properties` keyword in the same schema object. + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value of this keyword must be boolean. + +If the value of the keyword is `false`, the validation succeeds. + +If the value of the keyword is `true`, the validation succeeds if the data contains all properties defined in `properties` keyword (in the same schema object). + +If the `properties` keyword is not present in the same schema object, schema compilation will throw exception. + +```javascript +var schema = { + properties: { + foo: {type: 'number'}, + bar: {type: 'number'} + } + allRequired: true +}; + +var validData = { foo: 1, bar: 2 }; +var alsoValidData = { foo: 1, bar: 2, baz: 3 }; + +var invalidDataList = [ {}, { foo: 1 }, { bar: 2 } ]; +``` + + +#### `anyRequired` + +This keyword allows to require the presence of any (at least one) property from the list. + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value of this keyword must be an array of strings, each string being a property name. For data object to be valid at least one of the properties in this array should be present in the object. + +```javascript +var schema = { + anyRequired: ['foo', 'bar'] +}; + +var validData = { foo: 1 }; +var alsoValidData = { foo: 1, bar: 2 }; + +var invalidDataList = [ {}, { baz: 3 } ]; +``` + + +#### `oneRequired` + +This keyword allows to require the presence of only one property from the list. + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value of this keyword must be an array of strings, each string being a property name. For data object to be valid exactly one of the properties in this array should be present in the object. + +```javascript +var schema = { + oneRequired: ['foo', 'bar'] +}; + +var validData = { foo: 1 }; +var alsoValidData = { bar: 2, baz: 3 }; + +var invalidDataList = [ {}, { baz: 3 }, { foo: 1, bar: 2 } ]; +``` + + +#### `patternRequired` + +This keyword allows to require the presence of properties that match some pattern(s). + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value of this keyword should be an array of strings, each string being a regular expression. For data object to be valid each regular expression in this array should match at least one property name in the data object. + +If the array contains multiple regular expressions, more than one expression can match the same property name. + +```javascript +var schema = { patternRequired: [ 'f.*o', 'b.*r' ] }; + +var validData = { foo: 1, bar: 2 }; +var alsoValidData = { foobar: 3 }; + +var invalidDataList = [ {}, { foo: 1 }, { bar: 2 } ]; +``` + + +#### `prohibited` + +This keyword allows to prohibit that any of the properties in the list is present in the object. + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value of this keyword should be an array of strings, each string being a property name. For data object to be valid none of the properties in this array should be present in the object. + +``` +var schema = { prohibited: ['foo', 'bar']}; + +var validData = { baz: 1 }; +var alsoValidData = {}; + +var invalidDataList = [ + { foo: 1 }, + { bar: 2 }, + { foo: 1, bar: 2} +]; +``` + +__Please note__: `{prohibited: ['foo', 'bar']}` is equivalent to `{not: {anyRequired: ['foo', 'bar']}}` (i.e. it has the same validation result for any data). + + +#### `deepProperties` + +This keyword allows to validate deep properties (identified by JSON pointers). + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value should be an object, where keys are JSON pointers to the data, starting from the current position in data, and the values are JSON schemas. For data object to be valid the value of each JSON pointer should be valid according to the corresponding schema. + +```javascript +var schema = { + type: 'object', + deepProperties: { + "/users/1/role": { "enum": ["admin"] } + } +}; + +var validData = { + users: [ + {}, + { + id: 123, + role: 'admin' + } + ] +}; + +var alsoValidData = { + users: { + "1": { + id: 123, + role: 'admin' + } + } +}; + +var invalidData = { + users: [ + {}, + { + id: 123, + role: 'user' + } + ] +}; + +var alsoInvalidData = { + users: { + "1": { + id: 123, + role: 'user' + } + } +}; +``` + + +#### `deepRequired` + +This keyword allows to check that some deep properties (identified by JSON pointers) are available. + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value should be an array of JSON pointers to the data, starting from the current position in data. For data object to be valid each JSON pointer should be some existing part of the data. + +```javascript +var schema = { + type: 'object', + deepRequired: ["/users/1/role"] +}; + +var validData = { + users: [ + {}, + { + id: 123, + role: 'admin' + } + ] +}; + +var invalidData = { + users: [ + {}, + { + id: 123 + } + ] +}; +``` + +See [json-schema-org/json-schema-spec#203](https://github.com/json-schema-org/json-schema-spec/issues/203#issue-197211916) for an example of the equivalent schema without `deepRequired` keyword. + + +### Compound keywords + +#### `switch` (deprecated) + +__Please note__: this keyword is provided to preserve backward compatibility with previous versions of Ajv. It is strongly recommended to use `if`/`then`/`else` keywords instead, as they have been added to the draft-07 of JSON Schema specification. + +This keyword allows to perform advanced conditional validation. + +The value of the keyword is the array of if/then clauses. Each clause is the object with the following properties: + +- `if` (optional) - the value is JSON-schema +- `then` (required) - the value is JSON-schema or boolean +- `continue` (optional) - the value is boolean + +The validation process is dynamic; all clauses are executed sequentially in the following way: + +1. `if`: + 1. `if` property is JSON-schema according to which the data is: + 1. valid => go to step 2. + 2. invalid => go to the NEXT clause, if this was the last clause the validation of `switch` SUCCEEDS. + 2. `if` property is absent => go to step 2. +2. `then`: + 1. `then` property is `true` or it is JSON-schema according to which the data is valid => go to step 3. + 2. `then` property is `false` or it is JSON-schema according to which the data is invalid => the validation of `switch` FAILS. +3. `continue`: + 1. `continue` property is `true` => go to the NEXT clause, if this was the last clause the validation of `switch` SUCCEEDS. + 2. `continue` property is `false` or absent => validation of `switch` SUCCEEDS. + +```javascript +require('ajv-keywords')(ajv, 'switch'); + +var schema = { + type: 'array', + items: { + type: 'integer', + 'switch': [ + { if: { not: { minimum: 1 } }, then: false }, + { if: { maximum: 10 }, then: true }, + { if: { maximum: 100 }, then: { multipleOf: 10 } }, + { if: { maximum: 1000 }, then: { multipleOf: 100 } }, + { then: false } + ] + } +}; + +var validItems = [1, 5, 10, 20, 50, 100, 200, 500, 1000]; + +var invalidItems = [1, 0, 2000, 11, 57, 123, 'foo']; +``` + +The above schema is equivalent to (for example): + +```javascript +{ + type: 'array', + items: { + type: 'integer', + if: { minimum: 1, maximum: 10 }, + then: true, + else: { + if: { maximum: 100 }, + then: { multipleOf: 10 }, + else: { + if: { maximum: 1000 }, + then: { multipleOf: 100 }, + else: false + } + } + } +} +``` + + +#### `select`/`selectCases`/`selectDefault` + +These keywords allow to choose the schema to validate the data based on the value of some property in the validated data. + +These keywords must be present in the same schema object (`selectDefault` is optional). + +The value of `select` keyword should be a [$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference) that points to any primitive JSON type (string, number, boolean or null) in the data that is validated. You can also use a constant of primitive type as the value of this keyword (e.g., for debugging purposes). + +The value of `selectCases` keyword must be an object where each property name is a possible string representation of the value of `select` keyword and each property value is a corresponding schema (from draft-06 it can be boolean) that must be used to validate the data. + +The value of `selectDefault` keyword is a schema (from draft-06 it can be boolean) that must be used to validate the data in case `selectCases` has no key equal to the stringified value of `select` keyword. + +The validation succeeds in one of the following cases: +- the validation of data using selected schema succeeds, +- none of the schemas is selected for validation, +- the value of select is undefined (no property in the data that the data reference points to). + +If `select` value (in data) is not a primitive type the validation fails. + +__Please note__: these keywords require Ajv `$data` option to support [$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference). + + +```javascript +require('ajv-keywords')(ajv, 'select'); + +var schema = { + type: object, + required: ['kind'], + properties: { + kind: { type: 'string' } + }, + select: { $data: '0/kind' }, + selectCases: { + foo: { + required: ['foo'], + properties: { + kind: {}, + foo: { type: 'string' } + }, + additionalProperties: false + }, + bar: { + required: ['bar'], + properties: { + kind: {}, + bar: { type: 'number' } + }, + additionalProperties: false + } + }, + selectDefault: { + propertyNames: { + not: { enum: ['foo', 'bar'] } + } + } +}; + +var validDataList = [ + { kind: 'foo', foo: 'any' }, + { kind: 'bar', bar: 1 }, + { kind: 'anything_else', not_bar_or_foo: 'any value' } +]; + +var invalidDataList = [ + { kind: 'foo' }, // no propery foo + { kind: 'bar' }, // no propery bar + { kind: 'foo', foo: 'any', another: 'any value' }, // additional property + { kind: 'bar', bar: 1, another: 'any value' }, // additional property + { kind: 'anything_else', foo: 'any' } // property foo not allowed + { kind: 'anything_else', bar: 1 } // property bar not allowed +]; +``` + +__Please note__: the current implementation is BETA. It does not allow using relative URIs in $ref keywords in schemas in `selectCases` and `selectDefault` that point outside of these schemas. The workaround is to use absolute URIs (that can point to any (sub-)schema added to Ajv, including those inside the current root schema where `select` is used). See [tests](https://github.com/epoberezkin/ajv-keywords/blob/v2.0.0/spec/tests/select.json#L314). + + +### Keywords for all types + +#### `dynamicDefaults` + +This keyword allows to assign dynamic defaults to properties, such as timestamps, unique IDs etc. + +This keyword only works if `useDefaults` options is used and not inside `anyOf` keywords etc., in the same way as [default keyword treated by Ajv](https://github.com/epoberezkin/ajv#assigning-defaults). + +The keyword should be added on the object level. Its value should be an object with each property corresponding to a property name, in the same way as in standard `properties` keyword. The value of each property can be: + +- an identifier of default function (a string) +- an object with properties `func` (an identifier) and `args` (an object with parameters that will be passed to this function during schema compilation - see examples). + +The properties used in `dynamicDefaults` should not be added to `required` keyword (or validation will fail), because unlike `default` this keyword is processed after validation. + +There are several predefined dynamic default functions: + +- `"timestamp"` - current timestamp in milliseconds +- `"datetime"` - current date and time as string (ISO, valid according to `date-time` format) +- `"date"` - current date as string (ISO, valid according to `date` format) +- `"time"` - current time as string (ISO, valid according to `time` format) +- `"random"` - pseudo-random number in [0, 1) interval +- `"randomint"` - pseudo-random integer number. If string is used as a property value, the function will randomly return 0 or 1. If object `{ func: 'randomint', args: { max: N } }` is used then the default will be an integer number in [0, N) interval. +- `"seq"` - sequential integer number starting from 0. If string is used as a property value, the default sequence will be used. If object `{ func: 'seq', args: { name: 'foo'} }` is used then the sequence with name `"foo"` will be used. Sequences are global, even if different ajv instances are used. + +```javascript +var schema = { + type: 'object', + dynamicDefaults: { + ts: 'datetime', + r: { func: 'randomint', args: { max: 100 } }, + id: { func: 'seq', args: { name: 'id' } } + }, + properties: { + ts: { + type: 'string', + format: 'date-time' + }, + r: { + type: 'integer', + minimum: 0, + exclusiveMaximum: 100 + }, + id: { + type: 'integer', + minimum: 0 + } + } +}; + +var data = {}; +ajv.validate(data); // true +data; // { ts: '2016-12-01T22:07:28.829Z', r: 25, id: 0 } + +var data1 = {}; +ajv.validate(data1); // true +data1; // { ts: '2016-12-01T22:07:29.832Z', r: 68, id: 1 } + +ajv.validate(data1); // true +data1; // didn't change, as all properties were defined +``` + +When using the `useDefaults` option value `"empty"`, properties and items equal to `null` or `""` (empty string) will be considered missing and assigned defaults. Use the `allOf` [compound keyword](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) to execute `dynamicDefaults` before validation. + +```javascript +var schema = { + allOf: [ + { + dynamicDefaults: { + ts: 'datetime', + r: { func: 'randomint', args: { min: 5, max: 100 } }, + id: { func: 'seq', args: { name: 'id' } } + } + }, + { + type: 'object', + properties: { + ts: { + type: 'string' + }, + r: { + type: 'number', + minimum: 5, + exclusiveMaximum: 100 + }, + id: { + type: 'integer', + minimum: 0 + } + } + } + ] +}; + +var data = { ts: '', r: null }; +ajv.validate(data); // true +data; // { ts: '2016-12-01T22:07:28.829Z', r: 25, id: 0 } +``` + +You can add your own dynamic default function to be recognised by this keyword: + +```javascript +var uuid = require('uuid'); + +function uuidV4() { return uuid.v4(); } + +var definition = require('ajv-keywords').get('dynamicDefaults').definition; +// or require('ajv-keywords/keywords/dynamicDefaults').definition; +definition.DEFAULTS.uuid = uuidV4; + +var schema = { + dynamicDefaults: { id: 'uuid' }, + properties: { id: { type: 'string', format: 'uuid' } } +}; + +var data = {}; +ajv.validate(schema, data); // true +data; // { id: 'a1183fbe-697b-4030-9bcc-cfeb282a9150' }; + +var data1 = {}; +ajv.validate(schema, data1); // true +data1; // { id: '5b008de7-1669-467a-a5c6-70fa244d7209' } +``` + +You also can define dynamic default that accepts parameters, e.g. version of uuid: + +```javascript +var uuid = require('uuid'); + +function getUuid(args) { + var version = 'v' + (arvs && args.v || 4); + return function() { + return uuid[version](); + }; +} + +var definition = require('ajv-keywords').get('dynamicDefaults').definition; +definition.DEFAULTS.uuid = getUuid; + +var schema = { + dynamicDefaults: { + id1: 'uuid', // v4 + id2: { func: 'uuid', v: 4 }, // v4 + id3: { func: 'uuid', v: 1 } // v1 + } +}; +``` + + +## License + +[MIT](https://github.com/epoberezkin/ajv-keywords/blob/master/LICENSE) diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/index.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/index.js new file mode 100644 index 000000000..07a8edabc --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var KEYWORDS = require('./keywords'); + +module.exports = defineKeywords; + + +/** + * Defines one or several keywords in ajv instance + * @param {Ajv} ajv validator instance + * @param {String|Array|undefined} keyword keyword(s) to define + * @return {Ajv} ajv instance (for chaining) + */ +function defineKeywords(ajv, keyword) { + if (Array.isArray(keyword)) { + for (var i=0; i 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/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/_util.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/_util.js new file mode 100644 index 000000000..dd52df720 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/_util.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = { + metaSchemaRef: metaSchemaRef +}; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +function metaSchemaRef(ajv) { + var defaultMeta = ajv._opts.defaultMeta; + if (typeof defaultMeta == 'string') return { $ref: defaultMeta }; + if (ajv.getSchema(META_SCHEMA_ID)) return { $ref: META_SCHEMA_ID }; + console.warn('meta schema not defined'); + return {}; +} diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/allRequired.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/allRequired.js new file mode 100644 index 000000000..afc73ebf9 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/allRequired.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'object', + macro: function (schema, parentSchema) { + if (!schema) return true; + var properties = Object.keys(parentSchema.properties); + if (properties.length == 0) return true; + return {required: properties}; + }, + metaSchema: {type: 'boolean'}, + dependencies: ['properties'] + }; + + ajv.addKeyword('allRequired', defFunc.definition); + return ajv; +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/anyRequired.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/anyRequired.js new file mode 100644 index 000000000..acc55a921 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/anyRequired.js @@ -0,0 +1,24 @@ +'use strict'; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'object', + macro: function (schema) { + if (schema.length == 0) return true; + if (schema.length == 1) return {required: schema}; + var schemas = schema.map(function (prop) { + return {required: [prop]}; + }); + return {anyOf: schemas}; + }, + metaSchema: { + type: 'array', + items: { + type: 'string' + } + } + }; + + ajv.addKeyword('anyRequired', defFunc.definition); + return ajv; +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/deepProperties.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/deepProperties.js new file mode 100644 index 000000000..e5aff6055 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/deepProperties.js @@ -0,0 +1,54 @@ +'use strict'; + +var util = require('./_util'); + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'object', + macro: function (schema) { + var schemas = []; + for (var pointer in schema) + schemas.push(getSchema(pointer, schema[pointer])); + return {'allOf': schemas}; + }, + metaSchema: { + type: 'object', + propertyNames: { + type: 'string', + format: 'json-pointer' + }, + additionalProperties: util.metaSchemaRef(ajv) + } + }; + + ajv.addKeyword('deepProperties', defFunc.definition); + return ajv; +}; + + +function getSchema(jsonPointer, schema) { + var segments = jsonPointer.split('/'); + var rootSchema = {}; + var pointerSchema = rootSchema; + for (var i=1; i' + , $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/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/patternRequired.jst b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/patternRequired.jst new file mode 100644 index 000000000..6f82f6265 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/patternRequired.jst @@ -0,0 +1,33 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} + +{{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $matched = 'patternMatched' + $lvl + , $dataProperties = 'dataProperties' + $lvl + , $closingBraces = '' + , $ownProperties = it.opts.ownProperties; +}} + +var {{=$valid}} = true; +{{? $ownProperties }} + var {{=$dataProperties}} = undefined; +{{?}} + +{{~ $schema:$pProperty }} + var {{=$matched}} = false; + {{# def.iterateProperties }} + {{=$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/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/switch.jst b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/switch.jst new file mode 100644 index 000000000..389678e34 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dot/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/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/README.md b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/README.md new file mode 100644 index 000000000..e2846c86b --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/README.md @@ -0,0 +1,3 @@ +These files are compiled dot templates from dot folder. + +Do NOT edit them directly, edit the templates and run `npm run build` from main ajv-keywords folder. diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/_formatLimit.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/_formatLimit.js new file mode 100644 index 000000000..d2af63889 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/_formatLimit.js @@ -0,0 +1,178 @@ +'use strict'; +module.exports = function generate__formatLimit(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 $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.$data && $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.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $result = 'result' + $lvl; + var $isData = it.opts.$data && $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/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/patternRequired.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/patternRequired.js new file mode 100644 index 000000000..31bd0b683 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/patternRequired.js @@ -0,0 +1,58 @@ +'use strict'; +module.exports = function generate_patternRequired(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 $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $matched = 'patternMatched' + $lvl, + $dataProperties = 'dataProperties' + $lvl, + $closingBraces = '', + $ownProperties = it.opts.ownProperties; + out += 'var ' + ($valid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + var arr1 = $schema; + if (arr1) { + var $pProperty, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $pProperty = arr1[i1 += 1]; + out += ' var ' + ($matched) + ' = false; '; + 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 += ' ' + ($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/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/switch.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/switch.js new file mode 100644 index 000000000..4a90d8b3e --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dotjs/switch.js @@ -0,0 +1,130 @@ +'use strict'; +module.exports = function generate_switch(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 $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/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dynamicDefaults.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dynamicDefaults.js new file mode 100644 index 000000000..5323bb8c6 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/dynamicDefaults.js @@ -0,0 +1,72 @@ +'use strict'; + +var sequences = {}; + +var DEFAULTS = { + timestamp: function() { return Date.now(); }, + datetime: function() { return (new Date).toISOString(); }, + date: function() { return (new Date).toISOString().slice(0, 10); }, + time: function() { return (new Date).toISOString().slice(11); }, + random: function() { return Math.random(); }, + randomint: function (args) { + var limit = args && args.max || 2; + return function() { return Math.floor(Math.random() * limit); }; + }, + seq: function (args) { + var name = args && args.name || ''; + sequences[name] = sequences[name] || 0; + return function() { return sequences[name]++; }; + } +}; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + compile: function (schema, parentSchema, it) { + var funcs = {}; + + for (var key in schema) { + var d = schema[key]; + var func = getDefault(typeof d == 'string' ? d : d.func); + funcs[key] = func.length ? func(d.args) : func; + } + + return it.opts.useDefaults && !it.compositeRule + ? assignDefaults + : noop; + + function assignDefaults(data) { + for (var prop in schema){ + if (data[prop] === undefined + || (it.opts.useDefaults == 'empty' + && (data[prop] === null || data[prop] === ''))) + data[prop] = funcs[prop](); + } + return true; + } + + function noop() { return true; } + }, + DEFAULTS: DEFAULTS, + metaSchema: { + type: 'object', + additionalProperties: { + type: ['string', 'object'], + additionalProperties: false, + required: ['func', 'args'], + properties: { + func: { type: 'string' }, + args: { type: 'object' } + } + } + } + }; + + ajv.addKeyword('dynamicDefaults', defFunc.definition); + return ajv; + + function getDefault(d) { + var def = DEFAULTS[d]; + if (def) return def; + throw new Error('invalid "dynamicDefaults" keyword property value: ' + d); + } +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/formatMaximum.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/formatMaximum.js new file mode 100644 index 000000000..e7daabf85 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/formatMaximum.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./_formatLimit')('Maximum'); diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/formatMinimum.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/formatMinimum.js new file mode 100644 index 000000000..eddd6e404 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/formatMinimum.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./_formatLimit')('Minimum'); diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/index.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/index.js new file mode 100644 index 000000000..99534ec23 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/index.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = { + 'instanceof': require('./instanceof'), + range: require('./range'), + regexp: require('./regexp'), + 'typeof': require('./typeof'), + dynamicDefaults: require('./dynamicDefaults'), + allRequired: require('./allRequired'), + anyRequired: require('./anyRequired'), + oneRequired: require('./oneRequired'), + prohibited: require('./prohibited'), + uniqueItemProperties: require('./uniqueItemProperties'), + deepProperties: require('./deepProperties'), + deepRequired: require('./deepRequired'), + formatMinimum: require('./formatMinimum'), + formatMaximum: require('./formatMaximum'), + patternRequired: require('./patternRequired'), + 'switch': require('./switch'), + select: require('./select'), + transform: require('./transform') +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/instanceof.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/instanceof.js new file mode 100644 index 000000000..ea88f5ca3 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/instanceof.js @@ -0,0 +1,58 @@ +'use strict'; + +var CONSTRUCTORS = { + Object: Object, + Array: Array, + Function: Function, + Number: Number, + String: String, + Date: Date, + RegExp: RegExp +}; + +module.exports = function defFunc(ajv) { + /* istanbul ignore else */ + if (typeof Buffer != 'undefined') + CONSTRUCTORS.Buffer = Buffer; + + /* istanbul ignore else */ + if (typeof Promise != 'undefined') + CONSTRUCTORS.Promise = Promise; + + defFunc.definition = { + compile: function (schema) { + if (typeof schema == 'string') { + var Constructor = getConstructor(schema); + return function (data) { + return data instanceof Constructor; + }; + } + + var constructors = schema.map(getConstructor); + return function (data) { + for (var i=0; i max || (exclusive && min == max)) + throw new Error('There are no numbers in range'); + } +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/regexp.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/regexp.js new file mode 100644 index 000000000..973628c3b --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/regexp.js @@ -0,0 +1,36 @@ +'use strict'; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'string', + inline: function (it, keyword, schema) { + return getRegExp() + '.test(data' + (it.dataLevel || '') + ')'; + + function getRegExp() { + try { + if (typeof schema == 'object') + return new RegExp(schema.pattern, schema.flags); + + var rx = schema.match(/^\/(.*)\/([gimuy]*)$/); + if (rx) return new RegExp(rx[1], rx[2]); + throw new Error('cannot parse string into RegExp'); + } catch(e) { + console.error('regular expression', schema, 'is invalid'); + throw e; + } + } + }, + metaSchema: { + type: ['string', 'object'], + properties: { + pattern: { type: 'string' }, + flags: { type: 'string' } + }, + required: ['pattern'], + additionalProperties: false + } + }; + + ajv.addKeyword('regexp', defFunc.definition); + return ajv; +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/select.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/select.js new file mode 100644 index 000000000..f79c6c7a0 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/select.js @@ -0,0 +1,79 @@ +'use strict'; + +var util = require('./_util'); + +module.exports = function defFunc(ajv) { + if (!ajv._opts.$data) { + console.warn('keyword select requires $data option'); + return ajv; + } + var metaSchemaRef = util.metaSchemaRef(ajv); + var compiledCaseSchemas = []; + + defFunc.definition = { + validate: function v(schema, data, parentSchema) { + if (parentSchema.selectCases === undefined) + throw new Error('keyword "selectCases" is absent'); + var compiled = getCompiledSchemas(parentSchema, false); + var validate = compiled.cases[schema]; + if (validate === undefined) validate = compiled.default; + if (typeof validate == 'boolean') return validate; + var valid = validate(data); + if (!valid) v.errors = validate.errors; + return valid; + }, + $data: true, + metaSchema: { type: ['string', 'number', 'boolean', 'null'] } + }; + + ajv.addKeyword('select', defFunc.definition); + ajv.addKeyword('selectCases', { + compile: function (schemas, parentSchema) { + var compiled = getCompiledSchemas(parentSchema); + for (var value in schemas) + compiled.cases[value] = compileOrBoolean(schemas[value]); + return function() { return true; }; + }, + valid: true, + metaSchema: { + type: 'object', + additionalProperties: metaSchemaRef + } + }); + ajv.addKeyword('selectDefault', { + compile: function (schema, parentSchema) { + var compiled = getCompiledSchemas(parentSchema); + compiled.default = compileOrBoolean(schema); + return function() { return true; }; + }, + valid: true, + metaSchema: metaSchemaRef + }); + return ajv; + + + function getCompiledSchemas(parentSchema, create) { + var compiled; + compiledCaseSchemas.some(function (c) { + if (c.parentSchema === parentSchema) { + compiled = c; + return true; + } + }); + if (!compiled && create !== false) { + compiled = { + parentSchema: parentSchema, + cases: {}, + default: true + }; + compiledCaseSchemas.push(compiled); + } + return compiled; + } + + function compileOrBoolean(schema) { + return typeof schema == 'boolean' + ? schema + : ajv.compile(schema); + } +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/switch.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/switch.js new file mode 100644 index 000000000..5b0f3f830 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/switch.js @@ -0,0 +1,38 @@ +'use strict'; + +var util = require('./_util'); + +module.exports = function defFunc(ajv) { + if (ajv.RULES.keywords.switch && ajv.RULES.keywords.if) return; + + var metaSchemaRef = util.metaSchemaRef(ajv); + + defFunc.definition = { + inline: require('./dotjs/switch'), + statements: true, + errors: 'full', + metaSchema: { + type: 'array', + items: { + required: [ 'then' ], + properties: { + 'if': metaSchemaRef, + 'then': { + anyOf: [ + { type: 'boolean' }, + metaSchemaRef + ] + }, + 'continue': { type: 'boolean' } + }, + additionalProperties: false, + dependencies: { + 'continue': [ 'if' ] + } + } + } + }; + + ajv.addKeyword('switch', defFunc.definition); + return ajv; +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/transform.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/transform.js new file mode 100644 index 000000000..d715452b3 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/transform.js @@ -0,0 +1,80 @@ +'use strict'; + +module.exports = function defFunc (ajv) { + var transform = { + trimLeft: function (value) { + return value.replace(/^[\s]+/, ''); + }, + trimRight: function (value) { + return value.replace(/[\s]+$/, ''); + }, + trim: function (value) { + return value.trim(); + }, + toLowerCase: function (value) { + return value.toLowerCase(); + }, + toUpperCase: function (value) { + return value.toUpperCase(); + }, + toEnumCase: function (value, cfg) { + return cfg.hash[makeHashTableKey(value)] || value; + } + }; + + defFunc.definition = { + type: 'string', + errors: false, + modifying: true, + valid: true, + compile: function (schema, parentSchema) { + var cfg; + + if (schema.indexOf('toEnumCase') !== -1) { + // build hash table to enum values + cfg = {hash: {}}; + + // requires `enum` in schema + if (!parentSchema.enum) + throw new Error('Missing enum. To use `transform:["toEnumCase"]`, `enum:[...]` is required.'); + for (var i = parentSchema.enum.length; i--; i) { + var v = parentSchema.enum[i]; + if (typeof v !== 'string') continue; + var k = makeHashTableKey(v); + // requires all `enum` values have unique keys + if (cfg.hash[k]) + throw new Error('Invalid enum uniqueness. To use `transform:["toEnumCase"]`, all values must be unique when case insensitive.'); + cfg.hash[k] = v; + } + } + + return function (data, dataPath, object, key) { + // skip if value only + if (!object) return; + + // apply transform in order provided + for (var j = 0, l = schema.length; j < l; j++) + data = transform[schema[j]](data, cfg); + + object[key] = data; + }; + }, + metaSchema: { + type: 'array', + items: { + type: 'string', + enum: [ + 'trimLeft', 'trimRight', 'trim', + 'toLowerCase', 'toUpperCase', 'toEnumCase' + ] + } + } + }; + + ajv.addKeyword('transform', defFunc.definition); + return ajv; + + function makeHashTableKey (value) { + return value.toLowerCase(); + } +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/typeof.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/typeof.js new file mode 100644 index 000000000..3a3574d83 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/typeof.js @@ -0,0 +1,32 @@ +'use strict'; + +var KNOWN_TYPES = ['undefined', 'string', 'number', 'object', 'function', 'boolean', 'symbol']; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + inline: function (it, keyword, schema) { + var data = 'data' + (it.dataLevel || ''); + if (typeof schema == 'string') return 'typeof ' + data + ' == "' + schema + '"'; + schema = 'validate.schema' + it.schemaPath + '.' + keyword; + return schema + '.indexOf(typeof ' + data + ') >= 0'; + }, + metaSchema: { + anyOf: [ + { + type: 'string', + enum: KNOWN_TYPES + }, + { + type: 'array', + items: { + type: 'string', + enum: KNOWN_TYPES + } + } + ] + } + }; + + ajv.addKeyword('typeof', defFunc.definition); + return ajv; +}; diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/uniqueItemProperties.js b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/uniqueItemProperties.js new file mode 100644 index 000000000..cd670dac6 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/keywords/uniqueItemProperties.js @@ -0,0 +1,59 @@ +'use strict'; + +var SCALAR_TYPES = ['number', 'integer', 'string', 'boolean', 'null']; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'array', + compile: function(keys, parentSchema, it) { + var equal = it.util.equal; + var scalar = getScalarKeys(keys, parentSchema); + + return function(data) { + if (data.length > 1) { + for (var k=0; k < keys.length; k++) { + var i, key = keys[k]; + if (scalar[k]) { + var hash = {}; + for (i = data.length; i--;) { + if (!data[i] || typeof data[i] != 'object') continue; + var prop = data[i][key]; + if (prop && typeof prop == 'object') continue; + if (typeof prop == 'string') prop = '"' + prop; + if (hash[prop]) return false; + hash[prop] = true; + } + } else { + for (i = data.length; i--;) { + if (!data[i] || typeof data[i] != 'object') continue; + for (var j = i; j--;) { + if (data[j] && typeof data[j] == 'object' && equal(data[i][key], data[j][key])) + return false; + } + } + } + } + } + return true; + }; + }, + metaSchema: { + type: 'array', + items: {type: 'string'} + } + }; + + ajv.addKeyword('uniqueItemProperties', defFunc.definition); + return ajv; +}; + + +function getScalarKeys(keys, schema) { + return keys.map(function(key) { + var properties = schema.items && schema.items.properties; + var propType = properties && properties[key] && properties[key].type; + return Array.isArray(propType) + ? propType.indexOf('object') < 0 && propType.indexOf('array') < 0 + : SCALAR_TYPES.indexOf(propType) >= 0; + }); +} diff --git a/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/package.json b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/package.json new file mode 100644 index 000000000..4e45275f5 --- /dev/null +++ b/public/node_modules/_ajv-keywords@3.4.1@ajv-keywords/package.json @@ -0,0 +1,54 @@ +{ + "name": "ajv-keywords", + "version": "3.4.1", + "description": "Custom JSON-Schema keywords for Ajv validator", + "main": "index.js", + "scripts": { + "build": "node node_modules/ajv/scripts/compile-dots.js node_modules/ajv/lib keywords", + "prepublish": "npm run build", + "test": "npm run build && npm run eslint && npm run test-cov", + "eslint": "eslint index.js keywords/*.js spec", + "test-spec": "mocha spec/*.spec.js -R spec", + "test-cov": "istanbul cover -x 'spec/**' node_modules/mocha/bin/_mocha -- spec/*.spec.js -R spec" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/ajv-keywords.git" + }, + "keywords": [ + "JSON-Schema", + "ajv", + "keywords" + ], + "files": [ + "index.js", + "keywords" + ], + "author": "Evgeny Poberezkin", + "license": "MIT", + "bugs": { + "url": "https://github.com/epoberezkin/ajv-keywords/issues" + }, + "homepage": "https://github.com/epoberezkin/ajv-keywords#readme", + "peerDependencies": { + "ajv": "^6.9.1" + }, + "devDependencies": { + "ajv": "^6.9.1", + "ajv-pack": "^0.3.0", + "chai": "^4.2.0", + "coveralls": "^3.0.2", + "dot": "^1.1.1", + "eslint": "^6.0.0", + "glob": "^7.1.3", + "istanbul": "^0.4.3", + "js-beautify": "^1.8.9", + "json-schema-test": "^2.0.0", + "mocha": "^6.0.0", + "pre-commit": "^1.1.3", + "uuid": "^3.3.2" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "ajv-keywords@3.4.1", + "_resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.4.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_ajv@6.10.2@ajv/.tonic_example.js b/public/node_modules/_ajv@6.10.2@ajv/.tonic_example.js new file mode 100644 index 000000000..aa11812d8 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/.tonic_example.js @@ -0,0 +1,20 @@ +var Ajv = require('ajv'); +var ajv = new Ajv({allErrors: true}); + +var schema = { + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "number", "maximum": 3 } + } +}; + +var validate = ajv.compile(schema); + +test({"foo": "abc", "bar": 2}); +test({"foo": 2, "bar": 4}); + +function test(data) { + var valid = validate(data); + if (valid) console.log('Valid!'); + else console.log('Invalid: ' + ajv.errorsText(validate.errors)); +} \ No newline at end of file diff --git a/public/node_modules/_ajv@6.10.2@ajv/LICENSE b/public/node_modules/_ajv@6.10.2@ajv/LICENSE new file mode 100644 index 000000000..96ee71998 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015-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/public/node_modules/_ajv@6.10.2@ajv/README.md b/public/node_modules/_ajv@6.10.2@ajv/README.md new file mode 100644 index 000000000..cafbd71c9 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/README.md @@ -0,0 +1,1359 @@ +Ajv logo + +# Ajv: Another JSON Schema Validator + +The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07. + +[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv) +[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/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) + + +## Using version 6 + +[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published. + +[Ajv version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes). + +__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance: + +```javascript +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); +``` + +To use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId: + +```javascript +var ajv = new Ajv({schemaId: 'id'}); +// If you want to use both draft-04 and draft-06/07 schemas: +// var ajv = new Ajv({schemaId: 'auto'}); +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); +``` + + +## Contents + +- [Performance](#performance) +- [Features](#features) +- [Getting started](#getting-started) +- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md) +- [Using in browser](#using-in-browser) +- [Command line interface](#command-line-interface) +- Validation + - [Keywords](#validation-keywords) + - [Annotation keywords](#annotation-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 validation](#asynchronous-validation) +- [Security considerations](#security-considerations) + - [Security contact](#security-contact) + - [Untrusted schemas](#untrusted-schemas) + - [Circular references in objects](#circular-references-in-javascript-objects) + - [Trusted schemas](#security-risks-of-trusted-schemas) +- Modifying data during validation + - [Filtering data](#filtering-data) + - [Assigning defaults](#assigning-defaults) + - [Coercing data types](#coercing-data-types) +- API + - [Methods](#api) + - [Options](#options) + - [Validation errors](#validation-errors) +- [Plugins](#plugins) +- [Related packages](#related-packages) +- [Some packages using Ajv](#some-packages-using-ajv) +- [Tests, Contributing, History, Support, License](#tests) + + +## Performance + +Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization. + +Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: + +- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place +- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster +- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) +- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) + + +Performance 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) + + +## Features + +- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards: + - 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-07 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 +- "All errors" validation mode with [option allErrors](#options) +- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages +- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package +- [filtering data](#filtering-data) from additional properties +- [assigning defaults](#assigning-defaults) to missing properties and items +- [coercing data](#coercing-data-types) to the types specified in `type` keywords +- [custom keywords](#defining-custom-keywords) +- draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else` +- draft-06 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 +- [asynchronous validation](#asynchronous-validation) of custom formats and keywords + +Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript). + + +## Install + +``` +npm install ajv +``` + + +## Getting started + +Try it in the Node.js REPL: https://tonicdev.com/npm/ajv + + +The fastest validation call: + +```javascript +var Ajv = require('ajv'); +var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} +var validate = ajv.compile(schema); +var valid = validate(data); +if (!valid) console.log(validate.errors); +``` + +or with less code + +```javascript +// ... +var valid = ajv.validate(schema, data); +if (!valid) console.log(ajv.errors); +// ... +``` + +or + +```javascript +// ... +var valid = ajv.addSchema(schema, 'mySchema') + .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. + +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) + + +## Using in browser + +You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. + +If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). + +Then you need to load Ajv in the browser: +```html + +``` + +This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. + +The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). + +Ajv is tested with these browsers: + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) + +__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)). + + +## Command line interface + +CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports: + +- compiling JSON Schemas to test their validity +- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack)) +- migrate schemas to draft-07 (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 +- custom meta-schemas +- files in JSON and JavaScript format +- all Ajv options +- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format + + +## Validation keywords + +Ajv supports all validation keywords from draft-07 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, [if/then/else](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#ifthenelse) + +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: + +- [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. + +See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. + + +## Annotation keywords + +JSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation. + +- `title` and `description`: information about the data represented by that schema +- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options). +- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults). +- `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema. +- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.). +- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64". +- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png". + +__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance. + + +## Formats + +The following formats are supported for string validation with "format" keyword: + +- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). +- _time_: time with optional time-zone. +- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). +- _uri_: full URI. +- _uri-reference_: URI reference, including full and relative URIs. +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) +- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url). +- _email_: email address. +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _ipv4_: IP address v4. +- _ipv6_: IP address v6. +- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. +- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). +- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). +- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). + +__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here. + +There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, `email`, and `hostname`. See [Options](#options) for details. + +You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. + +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. + +You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js). + + +## 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. + +`$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. + +The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). + +Examples. + +This schema requires that the value in property `smaller` is less or equal than the value in the property larger: + +```javascript +var ajv = new Ajv({$data: true}); + +var schema = { + "properties": { + "smaller": { + "type": "number", + "maximum": { "$data": "1/larger" } + }, + "larger": { "type": "number" } + } +}; + +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: + +```javascript +var schema = { + "additionalProperties": { + "type": "string", + "format": { "$data": "0#" } + } +}; + +var validData = { + 'date-time': '1963-06-19T08:30:06.283185Z', + email: 'joe.bloggs@example.com' +} +``` + +`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` 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). + +To add keywords `$merge` and `$patch` to Ajv instance use this code: + +```javascript +require('ajv-merge-patch')(ajv); +``` + +Examples. + +Using `$merge`: + +```json +{ + "$merge": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": { + "properties": { "q": { "type": "number" } } + } + } +} +``` + +Using `$patch`: + +```json +{ + "$patch": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": [ + { "op": "add", "path": "/properties/q", "value": { "type": "number" } } + ] + } +} +``` + +The schemas above are equivalent to this schema: + +```json +{ + "type": "object", + "properties": { + "p": { "type": "string" }, + "q": { "type": "number" } + }, + "additionalProperties": false +} +``` + +The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. + +See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information. + + +## Defining custom keywords + +The advantages of using custom keywords are: + +- allow creating validation scenarios that cannot be expressed using JSON Schema +- simplify your schemas +- help bringing a bigger part of the validation logic to your schemas +- make your schemas more expressive, less verbose and closer to your application domain +- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated + +If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). + +The concerns you have to be aware of when extending JSON Schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. + +You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. + +Ajv allows defining keywords with: +- validation function +- compilation function +- macro function +- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. + +Example. `range` and `exclusiveRange` keywords using compiled schema: + +```javascript +ajv.addKeyword('range', { + type: 'number', + compile: function (sch, parentSchema) { + var min = sch[0]; + var max = sch[1]; + + return parentSchema.exclusiveRange === true + ? function (data) { return data > min && data < max; } + : function (data) { return data >= min && data <= max; } + } +}); + +var schema = { "range": [2, 4], "exclusiveRange": true }; +var validate = ajv.compile(schema); +console.log(validate(2.01)); // true +console.log(validate(3.99)); // true +console.log(validate(2)); // false +console.log(validate(4)); // false +``` + +Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. + +See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details. + + +## Asynchronous schema compilation + +During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). + +Example: + +```javascript +var ajv = new Ajv({ loadSchema: loadSchema }); + +ajv.compileAsync(schema).then(function (validate) { + 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; + }); +} +``` + +__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. + + +## Asynchronous validation + +Example in Node.js 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)). + +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 [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. 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. + +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. + + +Example: + +```javascript +var ajv = new Ajv; +// require('ajv-async')(ajv); + +ajv.addKeyword('idExists', { + async: true, + type: 'number', + validate: checkIdExists +}); + + +function checkIdExists(schema, data) { + return knex(schema.table) + .select('id') + .where('id', data) + .then(function (rows) { + return !!rows.length; // true if record is found + }); +} + +var schema = { + "$async": true, + "properties": { + "userId": { + "type": "integer", + "idExists": { "table": "users" } + }, + "postId": { + "type": "integer", + "idExists": { "table": "posts" } + } + } +}; + +var validate = ajv.compile(schema); + +validate({ userId: 1, postId: 19 }) +.then(function (data) { + console.log('Data is valid', data); // { userId: 1, postId: 19 } +}) +.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. + +[ajv-async](https://github.com/epoberezkin/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser). + + +#### Using nodent + +```javascript +var ajv = new Ajv; +require('ajv-async')(ajv); +// in the browser if you want to load ajv-async bundle separately you can: +// window.ajvAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + + +#### Using other transpilers + +```javascript +var ajv = new Ajv({ processCode: transpileFunc }); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +See [Options](#options). + + +## Security considerations + +JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider. + + +##### Security contact + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues. + + +##### Untrusted schemas + +Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application. + +If your schemas are received from untrusted sources (or generated from untrusted data) there are several scenarios you need to prevent: +- compiling schemas can cause stack overflow (if they are too deep) +- compiling schemas can be slow (e.g. [#557](https://github.com/epoberezkin/ajv/issues/557)) +- validating certain data can be slow + +It is difficult to predict all the scenarios, but at the very least it may help to limit the size of untrusted schemas (e.g. limit JSON string length) and also the maximum schema object depth (that can be high for relatively small JSON strings). You also may want to mitigate slow regular expressions in `pattern` and `patternProperties` keywords. + +Regardless the measures you take, using untrusted schemas increases security risks. + + +##### Circular references in JavaScript objects + +Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/epoberezkin/ajv/issues/802). + +An attempt to compile such schemas or validate such data would cause stack overflow (or will not complete in case of asynchronous validation). Depending on the parser you use, untrusted data can lead to circular references. + + +##### Security risks of trusted schemas + +Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to): + +- `pattern` and `format` for large strings - use `maxLength` to mitigate +- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate +- `patternProperties` for large property names - use `propertyNames` to mitigate + +__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors). + +You can validate your JSON schemas against [this meta-schema](https://github.com/epoberezkin/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed: + +```javascript +const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json')); + +const schema1 = {format: 'email'}; +isSchemaSecure(schema1); // false + +const schema2 = {format: 'email', maxLength: 256}; +isSchemaSecure(schema2); // true +``` + +__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results. + + +## Filtering data + +With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. + +This option modifies original data. + +Example: + +```javascript +var ajv = new Ajv({ removeAdditional: true }); +var schema = { + "additionalProperties": false, + "properties": { + "foo": { "type": "number" }, + "bar": { + "additionalProperties": { "type": "number" }, + "properties": { + "baz": { "type": "string" } + } + } + } +} + +var data = { + "foo": 0, + "additional1": 1, // will be removed; `additionalProperties` == false + "bar": { + "baz": "abc", + "additional2": 2 // will NOT be removed; `additionalProperties` != false + }, +} + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } +``` + +If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. + +If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). + +__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: + +```json +{ + "type": "object", + "oneOf": [ + { + "properties": { + "foo": { "type": "string" } + }, + "required": [ "foo" ], + "additionalProperties": false + }, + { + "properties": { + "bar": { "type": "integer" } + }, + "required": [ "bar" ], + "additionalProperties": false + } + ] +} +``` + +The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. + +With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). + +While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: + +```json +{ + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "integer" } + }, + "additionalProperties": false, + "oneOf": [ + { "required": [ "foo" ] }, + { "required": [ "bar" ] } + ] +} +``` + +The schema above is also more efficient - it will compile into a faster function. + + +## Assigning defaults + +With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. + +With the option value `"empty"` properties and items equal to `null` or `""` (empty string) will be considered missing and assigned defaults. + +This option modifies original data. + +__Please note__: the default value is inserted in the generated validation code as a literal, so the value inserted in the data will be the deep clone of the default in the schema. + + +Example 1 (`default` in `properties`): + +```javascript +var ajv = new Ajv({ useDefaults: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "string", "default": "baz" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": 1 }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": "baz" } +``` + +Example 2 (`default` in `items`): + +```javascript +var schema = { + "type": "array", + "items": [ + { "type": "number" }, + { "type": "string", "default": "foo" } + ] +} + +var data = [ 1 ]; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // [ 1, "foo" ] +``` + +`default` keywords in other cases are ignored: + +- not in `properties` or `items` subschemas +- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42)) +- in `if` subschema of `switch` keyword +- in schemas generated by custom macro keywords + +The [`strictDefaults` option](#options) customizes Ajv's behavior for the defaults that Ajv ignores (`true` raises an error, and `"log"` outputs a warning). + + +## Coercing data types + +When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. + +This option modifies original data. + +__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. + + +Example 1: + +```javascript +var ajv = new Ajv({ coerceTypes: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "boolean" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": "1", "bar": "false" }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": false } +``` + +Example 2 (array coercions): + +```javascript +var ajv = new Ajv({ coerceTypes: 'array' }); +var schema = { + "properties": { + "foo": { "type": "array", "items": { "type": "number" } }, + "bar": { "type": "boolean" } + } +}; + +var data = { "foo": "1", "bar": ["false"] }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": [1], "bar": false } +``` + +The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). + +See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details. + + +## API + +##### new Ajv(Object options) -> Object + +Create Ajv instance. + + +##### .compile(Object schema) -> Function<Object data> + +Generate validating function and cache the compiled schema for future use. + +Validating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema. + +The schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options). + + +##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> 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: + +- 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. + +The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. + +You can asynchronously compile meta-schema by passing `true` as the second parameter. + +See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### .validate(Object schema|String key|String ref, data) -> Boolean + +Validate data using passed schema (it will be compiled and cached). + +Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. + +Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). + +__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. + +If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). + + +##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. + +Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. + +Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. + + +Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. + +Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. + +By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. + +__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<Object>|Object schema [, String key]) -> Ajv + +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-07 meta schema (http://json-schema.org/draft-07/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`. + + +##### .validateSchema(Object schema) -> Boolean + +Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. + +By default this method is called automatically when the schema is added, so you rarely need to use it directly. + +If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). + +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) -> Function<Object data> + +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. + + +##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv + +Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. + +Schema can be removed using: +- key passed to `addSchema` +- it's full reference (id) +- RegExp that should match schema id or key (meta-schemas won't be removed) +- actual schema object that will be stable-stringified to remove schema from cache + +If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. + + +##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv + +Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. + +Strings are converted to RegExp. + +Function should return validation result as `true` or `false`. + +If object is passed it should have properties `validate`, `compare` and `async`: + +- _validate_: a string, RegExp or a function as described above. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (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. +- _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. + + +##### .addKeyword(String keyword, Object definition) -> Ajv + +Add custom validation keyword to Ajv instance. + +Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. + +Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. +It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. + +Example Keywords: +- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. +- `"example"`: valid, but not recommended as it could collide with future versions of JSON Schema etc. +- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword + +Keyword definition is an object with the following properties: + +- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. +- _validate_: validating function +- _compile_: compiling function +- _macro_: macro function +- _inline_: compiling function that returns code (as string) +- _schema_: an optional `false` value used with "validate" keyword to not pass schema +- _metaSchema_: an optional meta-schema for keyword schema +- _dependencies_: an optional list of properties that must be present in the parent schema - it will be checked during schema compilation +- _modifying_: `true` MUST be passed if keyword modifies data +- _statements_: `true` can be passed in case inline keyword generates statements (as opposed to expression) +- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. +- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). +- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. +- _errors_: an optional boolean or string `"full"` indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. + +_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. + +__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. + +See [Defining custom keywords](#defining-custom-keywords) for more details. + + +##### .getKeyword(String keyword) -> Object|Boolean + +Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. + + +##### .removeKeyword(String keyword) -> Ajv + +Removes custom or pre-defined keyword so you can redefine them. + +While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. + +__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. + + +##### .errorsText([Array<Object> errors [, Object options]]) -> String + +Returns the text with all errors in a String. + +Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). + + +## Options + +Defaults: + +```javascript +{ + // validation and reporting options: + $data: false, + allErrors: false, + verbose: false, + $comment: false, // NEW in Ajv version 6.0 + jsonPointers: false, + uniqueItems: true, + unicode: true, + nullable: false, + format: 'fast', + formats: {}, + unknownFormats: true, + schemas: {}, + logger: undefined, + // referenced schema options: + schemaId: '$id', + missingRefs: true, + extendRefs: 'ignore', // recommended 'fail' + loadSchema: undefined, // function(uri: string): Promise {} + // options to modify validated data: + removeAdditional: false, + useDefaults: false, + coerceTypes: false, + // strict mode options + strictDefaults: false, + strictKeywords: false, + // asynchronous validation options: + transpile: undefined, // requires ajv-async package + // advanced options: + meta: true, + validateSchema: true, + addUsedSchema: true, + inlineRefs: true, + passContext: false, + loopRequired: Infinity, + ownProperties: false, + multipleOfPrecision: false, + errorDataPath: 'object', // deprecated + messages: true, + sourceCode: false, + processCode: undefined, // function (str: string): string {} + cache: new Cache, + serialize: undefined +} +``` + +##### 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). +- _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). +- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values: + - `false` (default): ignore $comment keyword. + - `true`: log the keyword value to console. + - function: pass the keyword value, its schema path and root schema to the specified function +- _jsonPointers_: set `dataPath` property 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. +- _nullable_: support keyword "nullable" from [Open API 3 specification](https://swagger.io/docs/specification/data-models/data-types/). +- _format_: formats validation mode. Option values: + - `"fast"` (default) - simplified and fast validation (see [Formats](#formats) for details of which formats are available and affected by this option). + - `"full"` - more restrictive and slow validation. 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. + - `false` - ignore all format keywords. +- _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. + + +##### Referenced schema options + +- _schemaId_: this option defines which keywords are used as schema URI. Option value: + - `"$id"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), 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). + - `"auto"` - 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). + + +##### Options to modify validated data + +- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: + - `false` (default) - not to remove additional properties + - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). + - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. + - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). +- _useDefaults_: replace missing or undefined properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: + - `false` (default) - do not use defaults + - `true` - insert defaults by value (object literal is used). + - `"empty"` - in addition to missing or undefined, use defaults for properties and items that are equal to `null` or `""` (an empty string). + - `"shared"` (deprecated) - insert defaults by reference. If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. +- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values: + - `false` (default) - no type coercion. + - `true` - coerce scalar data types. + - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). + + +##### Strict mode options + +- _strictDefaults_: report ignored `default` keywords in schemas. Option values: + - `false` (default) - ignored defaults are not reported + - `true` - if an ignored default is present, throw an error + - `"log"` - if an ignored default is present, log warning +- _strictKeywords_: report unknown keywords in schemas. Option values: + - `false` (default) - unknown keywords are not reported + - `true` - if an unknown keyword is present, throw an error + - `"log"` - if an unknown keyword is present, log warning + + +##### Asynchronous validation options + +- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: + - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported. + - `true` - always transpile with nodent. + - `false` - do not transpile; if async functions are not supported an exception will be thrown. + + +##### 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. +- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can be http://json-schema.org/draft-07/schema or absent (draft-07 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. +- _inlineRefs_: Affects compilation of referenced schemas. Option values: + - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. + - `false` - to not inline referenced schemas (they will be compiled as separate functions). + - integer number - to limit the maximum number of keywords of the schema that will be inlined. +- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. +- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. +- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. +- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). +- _errorDataPath_ (deprecated): 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. +- _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. + + +### Error objects + +Each error is an object with the following properties: + +- _keyword_: validation keyword. +- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). +- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. +- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords. +- _message_: the standard error message (can be excluded with option `messages` set to false). +- _schema_: the schema of the keyword (added with `verbose` option). +- _parentSchema_: the schema containing the keyword (added with `verbose` option) +- _data_: the data validated by the keyword (added with `verbose` option). + +__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 + +Properties of `params` object in errors depend on the keyword that failed validation. + +- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). +- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). +- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). +- `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). +- `format` - property `format` (the schema of the keyword). +- `maximum`, `minimum` - properties: + - `limit` (number, the schema of the keyword), + - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), + - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") +- `multipleOf` - property `multipleOf` (the schema of the keyword) +- `pattern` - property `pattern` (the schema of the keyword) +- `required` - property `missingProperty` (required property that is missing). +- `propertyNames` - property `propertyName` (an invalid property name). +- `patternRequired` (in ajv-keywords) - 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). +- `const` - property `allowedValue` pointing to the value (the schema of the keyword). +- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). +- `$ref` - property `ref` with the referenced schema URI. +- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes). +- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). + + +## Plugins + +Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions: + +- it exports a function +- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining +- this function can accept an optional configuration as the second parameter + +If you have published a useful plugin please submit a PR to add it to the next section. + + +## Related packages + +- [ajv-async](https://github.com/epoberezkin/ajv-async) - plugin to configure async validation mode +- [ajv-bsontype](https://github.com/BoLaMN/ajv-bsontype) - plugin to validate mongodb's bsonType formats +- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface +- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - plugin for custom error messages +- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages +- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas +- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.) +- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - plugin with keywords $merge and $patch +- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions + + +## Some packages using Ajv + +- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser +- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services +- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition +- [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 +- [table](https://github.com/gajus/table) - formats data into a string table +- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser +- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content +- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation +- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation +- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages +- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema +- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON Schema with expect in mocha tests +- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema +- [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 +- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages +- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX + + +## Tests + +``` +npm install +git submodule update --init +npm test +``` + +## Contributing + +All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. + +`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder. + +`npm run watch` - automatically compiles templates when files in dot folder change + +Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md) + + +## Changes history + +See https://github.com/epoberezkin/ajv/releases + +__Please note__: [Changes in version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0). + +[Version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0). + +[Version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0). + +[Version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0). + +[Version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0). + + +## Open-source software support + +Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers. + + +## License + +[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE) diff --git a/public/node_modules/_ajv@6.10.2@ajv/dist/ajv.bundle.js b/public/node_modules/_ajv@6.10.2@ajv/dist/ajv.bundle.js new file mode 100644 index 000000000..a6afe9935 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/dist/ajv.bundle.js @@ -0,0 +1,7172 @@ +(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(){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%\\^`{|}]|%[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)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[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|23:59:60)(?:\.\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|23:59:60)(?:\.\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#][^\s#]*)?(?:#[^\\\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, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // 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, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +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 year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : 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) || + (hour == 23 && minute == 59 && second == 60)) && + (!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; + } +} + +},{"./util":10}],5:[function(require,module,exports){ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + 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; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function 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' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + 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); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + +},{}],10:[function(require,module,exports){ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + 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\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($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) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $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) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],14:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitItems(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],15:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitLength(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],16:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitProperties(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],17:[function(require,module,exports){ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],18:[function(require,module,exports){ +'use strict'; +module.exports = function generate_anyOf(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 $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + 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) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + 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; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],19:[function(require,module,exports){ +'use strict'; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + +},{}],20:[function(require,module,exports){ +'use strict'; +module.exports = function generate_const(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],21:[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.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : 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; +} + +},{}],22:[function(require,module,exports){ +'use strict'; +module.exports = function generate_custom(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0 : 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; +} + +},{}],24:[function(require,module,exports){ +'use strict'; +module.exports = function generate_enum(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],25:[function(require,module,exports){ +'use strict'; +module.exports = function generate_format(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 || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $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) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } 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) { '; + } + 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'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],26:[function(require,module,exports){ +'use strict'; +module.exports = function generate_if(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); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + 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; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],27:[function(require,module,exports){ +'use strict'; + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': require('./ref'), + allOf: require('./allOf'), + anyOf: require('./anyOf'), + '$comment': require('./comment'), + const: require('./const'), + contains: require('./contains'), + dependencies: require('./dependencies'), + 'enum': require('./enum'), + format: require('./format'), + 'if': require('./if'), + items: require('./items'), + maximum: require('./_limit'), + minimum: require('./_limit'), + maxItems: require('./_limitItems'), + minItems: require('./_limitItems'), + maxLength: require('./_limitLength'), + minLength: require('./_limitLength'), + maxProperties: require('./_limitProperties'), + minProperties: require('./_limitProperties'), + multipleOf: require('./multipleOf'), + not: require('./not'), + oneOf: require('./oneOf'), + pattern: require('./pattern'), + properties: require('./properties'), + propertyNames: require('./propertyNames'), + required: require('./required'), + uniqueItems: require('./uniqueItems'), + validate: require('./validate') +}; + +},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){ +'use strict'; +module.exports = function generate_items(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; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($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) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' 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) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],29:[function(require,module,exports){ +'use strict'; +module.exports = function generate_multipleOf(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],30:[function(require,module,exports){ +'use strict'; +module.exports = function generate_not(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); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + +},{}],31:[function(require,module,exports){ +'use strict'; +module.exports = function generate_oneOf(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 $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + 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; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + +},{}],32:[function(require,module,exports){ +'use strict'; +module.exports = function generate_pattern(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],33:[function(require,module,exports){ +'use strict'; +module.exports = function generate_properties(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 $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + 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) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, 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) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, 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; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + 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 ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : 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 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],34:[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; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : 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; + 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) + ' 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = 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)) + ') ) '; + } + } + 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: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { 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) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($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 */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, 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; + 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: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + +},{}],37:[function(require,module,exports){ +'use strict'; +module.exports = function generate_uniqueItems(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],38:[function(require,module,exports){ +'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.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(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]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + 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 ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + 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 (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + 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 { + 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) { + 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); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($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 + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($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; +} + +},{}],39:[function(require,module,exports){ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); +var definitionSchema = require('./definition_schema'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @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 */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } else { + return sets[0]; + } +} +function subexp(str) { + return "(?:" + str + ")"; +} +function typeOf(o) { + return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); +} +function toUpperCase(str) { + return str.toUpperCase(); +} +function toArray(obj) { + return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; +} +function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; +} + +function buildExps(isIRI) { + var ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), + //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), + //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", + //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", + //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), + //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), + // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), + // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), + //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), + //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), + //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), + //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), + //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), + //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), + //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), + //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), + //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), + //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), + //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), + //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), + //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), + //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +var URI_PROTOCOL = buildExps(false); + +var IRI_PROTOCOL = buildExps(true); + +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + + + + + + + + + + + + + +var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } +}; + +/** Highest positive signed 32-bit float value */ + +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' + +/** Regular expressions */ +var regexPunycode = /^xn--/; +var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error$1(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +var ucs2encode = function ucs2encode(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); +}; + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +var basicToDigit = function basicToDigit(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +var digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +var adapt = function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +var decode = function decode(input) { + // Don't use UCS-2. + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (var j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error$1('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + var oldi = i; + for (var w = 1, k = base;; /* no condition */k += base) { + + if (index >= inputLength) { + error$1('invalid-input'); + } + + var digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1('overflow'); + } + + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + + if (digit < t) { + break; + } + + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1('overflow'); + } + + w *= baseMinusT; + } + + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error$1('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + + return String.fromCodePoint.apply(String, output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +var encode = function encode(input) { + var output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + var inputLength = input.length; + + // Initialize the state. + var n = initialN; + var delta = 0; + var bias = initialBias; + + // Handle the basic code points. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + + if (_currentValue2 < 0x80) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var basicLength = output.length; + var handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + + if (_currentValue < n && ++delta > maxInt) { + error$1('overflow'); + } + if (_currentValue == n) { + // Represent delta as a generalized variable-length integer. + var q = delta; + for (var k = base;; /* no condition */k += base) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + ++delta; + ++n; + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +var toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +var toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * 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 GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +var SCHEMES = {}; +function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; +} +function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} + +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + + var _matches = slicedToArray(matches, 2), + address = _matches[1]; + + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + + var _matches2 = slicedToArray(matches, 3), + address = _matches2[1], + zone = _matches2[2]; + + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), + _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), + last = _address$toLowerCase$2[0], + first = _address$toLowerCase$2[1]; + + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function (acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index: index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function (a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } +} +var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; +function parse(uriString) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; + //fix port number + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} + +function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number") { + uriTokens.push(":"); + uriTokens.push(components.port.toString(10)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} + +var RDS1 = /^\.\.?\//; +var RDS2 = /^\/\.(\/|$)/; +var RDS3 = /^\/\.\.(\/|$)/; +var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} + +function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) {} + //TODO: normalize IPv6 address as per RFC 5952 + + //if host component is a domain name + else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + //convert IDN via punycode + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} + +function resolveComponents(base, relative) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var skipNormalization = arguments[3]; + + var target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} + +function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} + +function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} + +function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} + +function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); +} + +function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); +} + +var handler = { + scheme: "http", + domainHost: true, + parse: function parse(components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize(components, options) { + //normalize the default port + if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; + +var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize +}; + +var O = {}; +var isIRI = true; +//RFC 3986 +var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +var UNRESERVED = new RegExp(UNRESERVED$$, "g"); +var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +var NOT_HFVALUE = NOT_HFNAME; +function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; +} +var handler$2 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; + +var URN_PARSE = /^([^\:]+)\:(.*)/; +//RFC 2141 +var handler$3 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } +}; + +var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +//RFC 4122 +var handler$4 = { + scheme: "urn:uuid", + parse: function parse(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize(uuidComponents, options) { + var urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } +}; + +SCHEMES[handler.scheme] = handler; +SCHEMES[handler$1.scheme] = handler$1; +SCHEMES[handler$2.scheme] = handler$2; +SCHEMES[handler$3.scheme] = handler$3; +SCHEMES[handler$4.scheme] = handler$4; + +exports.SCHEMES = SCHEMES; +exports.pctEncChar = pctEncChar; +exports.pctDecChars = pctDecChars; +exports.parse = parse; +exports.removeDotSegments = removeDotSegments; +exports.serialize = serialize; +exports.resolveComponents = resolveComponents; +exports.resolve = resolve; +exports.normalize = normalize; +exports.equal = equal; +exports.escapeComponent = escapeComponent; +exports.unescapeComponent = unescapeComponent; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + + +},{}],"ajv":[function(require,module,exports){ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./data') + , util = require('./compile/util'); + +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; +Ajv.prototype.validateKeyword = customKeyword.validate; + +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-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +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); + + 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); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(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) 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} 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%\\^`{|}]|%[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,u=/^(?:(?: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,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,f=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\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|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri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?:\.(?: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:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.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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::[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:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var $=e("./resolve"),D=e("./util"),j=e("./error_classes"),O=e("fast-json-stable-stringify"),I=e("../dotjs/validate"),A=D.ucs2length,C=e("fast-deep-equal"),k=j.Validation;function L(e,r,t){var a=s.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}function z(e,r,t){var a=s.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}function s(e,r,t){for(var a=0;a",g=f?">":"<",P=void 0;if(v){var E=e.util.getData(m.$data,i,e.dataPathArr),w="exclusive"+o,b="exclType"+o,S="exclIsNumber"+o,_="' + "+(R="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+E+"; ";var F;P=p;(F=F||[]).push(s+=" var "+w+"; var "+b+" = typeof "+(E="schemaExcl"+o)+"; if ("+b+" != 'boolean' && "+b+" != 'undefined' && "+b+" != 'number') { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_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: "+h+" "),s+=" } "):s+=" {} ";var x=s;s=F.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+b+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+E+" "+y+"= "+a+") ? "+h+" "+g+"= "+E+" : "+h+" "+g+" "+a+" ) : ( ("+w+" = "+E+" === true) ? "+h+" "+g+"= "+a+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { var op"+o+" = "+w+" ? '"+y+"' : '"+y+"='; ",void 0===n&&(c=e.errSchemaPath+"/"+(P=p),a=E,d=v)}else{_=y;if((S="number"==typeof m)&&d){var R="'"+_+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+y+"= "+a+" ? "+h+" "+g+"= "+m+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { "}else{S&&void 0===n?(w=!0,c=e.errSchemaPath+"/"+(P=p),a=m,g+="="):(S&&(a=Math[f?"min":"max"](m,n)),m===(!S||a)?(w=!0,c=e.errSchemaPath+"/"+(P=p),g+="="):(w=!1,_+="="));R="'"+_+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+h+" "+g+" "+a+" || "+h+" !== "+h+") { "}}P=P||r,(F=F||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+R+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+_+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";x=s;return s=F.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",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),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || ");var f=r,p=p||[];p.push(s+=" "+h+".length "+("maxItems"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_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":"fewer",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: "+h+" "),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),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+h+".length ":" ucs2length("+h+") ";var f=r,p=p||[];p.push(s+=" "+("maxLength"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_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+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),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),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || ");var f=r,p=p||[];p.push(s+=" Object.keys("+h+").length "+("maxProperties"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_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":"fewer",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: "+h+" "),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),c="";l.level++;var u="valid"+l.level,h=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m "+x+") { ";var $=u+"["+x+"]";f.schema=F,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 D=e.validate(f);f.baseId=P,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",a+=" } ",c&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&(e.opts.strictKeywords?"object"==typeof E&&0 "+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;D=e.validate(f);f.baseId=P,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",c&&(a+=" if (!"+m+") break; "),a+=" } } ",c&&(a+=" if ("+m+") { ",p+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) ");var f=f||[];f.push(s+=" ) { "),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , 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: "+h+" "),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}},{}],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,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof i&&0 1) { ";var p=e.schema.items&&e.schema.items.type,m=Array.isArray(p);if(!p||"object"==p||"array"==p||m&&(0<=p.indexOf("object")||0<=p.indexOf("array")))s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else s+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ",s+=" if ("+e.util["checkDataType"+(m?"s":"")](p,"item",!0)+") continue; ",m&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ";s+=" } ",f&&(s+=" } ");var v=v||[];v.push(s+=" if (!"+d+") { "),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , 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: "+h+" "),s+=" } "):s+=" {} ";var y=s;s=v.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e,r){var t="",s=!0===a.schema.$async,o=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),i=a.self._getId(a.schema);if(a.opts.strictKeywords){var n=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(n){var l="unknown keyword: "+n;if("log"!==a.opts.strictKeywords)throw new Error(l);a.logger.warn(l)}}if(a.isTop&&(t+=" var validate = ",s&&(a.async=!0,t+="async "),t+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(a.opts.sourceCode||a.opts.processCode)&&(t+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof a.schema||!o&&!a.schema.$ref){var c=a.level,u=a.dataLevel,h=a.schema[e="false schema"],d=a.schemaPath+a.util.getProperty(e),f=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,m="data"+(u||""),v="valid"+c;if(!1===a.schema){a.isTop?p=!0:t+=" var "+v+" = false; ",(G=G||[]).push(t),t="",!1!==a.createErrors?(t+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(f)+" , params: {} ",!1!==a.opts.messages&&(t+=" , message: 'boolean schema is false' "),a.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+m+" "),t+=" } "):t+=" {} ";var y=t;t=G.pop(),t+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else t+=a.isTop?s?" return data; ":" validate.errors = null; return true; ":" var "+v+" = true; ";return a.isTop&&(t+=" }; return validate; "),t}if(a.isTop){var g=a.isTop;c=a.level=0,u=a.dataLevel=0,m="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[void 0],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var P="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(P);a.logger.warn(P)}t+=" var vErrors = null; ",t+=" var errors = 0; ",t+=" if (rootData === undefined) rootData = data; "}else{c=a.level,m="data"+((u=a.dataLevel)||"");if(i&&(a.baseId=a.resolve.url(a.baseId,i)),s&&!a.async)throw new Error("async schema in sync schema");t+=" var errs_"+c+" = errors;"}v="valid"+c,p=!a.opts.allErrors;var E="",w="",b=a.schema.type,S=Array.isArray(b);if(b&&a.opts.nullable&&!0===a.schema.nullable&&(S?-1==b.indexOf("null")&&(b=b.concat("null")):"null"!=b&&(b=[b,"null"],S=!0)),S&&1==b.length&&(b=b[0],S=!1),a.schema.$ref&&o){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(o=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(t+=" "+a.RULES.all.$comment.code(a,"$comment")),b){if(a.opts.coerceTypes)var _=a.util.coerceToTypes(a.opts.coerceTypes,b);var F=a.RULES.types[b];if(_||S||!0===F||F&&!Y(F)){d=a.schemaPath+".type",f=a.errSchemaPath+"/type",d=a.schemaPath+".type",f=a.errSchemaPath+"/type";if(t+=" if ("+a.util[S?"checkDataTypes":"checkDataType"](b,m,!0)+") { ",_){var x="dataType"+c,R="coerced"+c;t+=" var "+x+" = typeof "+m+"; ","array"==a.opts.coerceTypes&&(t+=" if ("+x+" == 'object' && Array.isArray("+m+")) "+x+" = 'array'; "),t+=" var "+R+" = undefined; ";var $="",D=_;if(D)for(var j,O=-1,I=D.length-1;O= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=Math.floor,z=String.fromCharCode;function T(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1>1,e+=L(e/r);455L((A-s)/h))&&T("overflow"),s+=f*h;var p=d<=i?1:i+26<=d?26:d-i;if(fL(A/m)&&T("overflow"),h*=m}var v=t.length+1;i=Q(s-u,v,0==u),L(s/v)>A-o&&T("overflow"),o+=L(s/v),s%=v,t.splice(s++,0,o)}return String.fromCodePoint.apply(String,t)},c=function(e){var r=[],t=(e=q(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(z(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,f=d;for(d&&r.push("-");fL((A-s)/w)&&T("overflow"),s+=(p-a)*w,a=p;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(RA&&T("overflow"),R==a){for(var $=s,D=36;;D+=36){var j=D<=o?1:o+26<=D?26:D-o;if($>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function f(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]'),Z=new RegExp(K,"g"),G=new RegExp(B,"g"),Y=new RegExp(C("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',J),"g"),W=new RegExp(C("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),X=W;function ee(e){var r=f(e);return r.match(Z)?r:e}var re={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n); + + message: string; + errors: Array; + ajv: true; + validation: true; + } + + class MissingRefError extends Error { + constructor(baseId: string, ref: string, message?: string); + static message: (baseId: string, ref: string) => string; + + message: string; + missingRef: string; + missingSchema: string; + } +} + +declare namespace ajv { + type ValidationError = AjvErrors.ValidationError; + + type MissingRefError = AjvErrors.MissingRefError; + + 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 + * @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 | PromiseLike; + /** + * Create validating function for passed schema. + * @param {object|Boolean} schema schema object + * @return {Function} validating function + */ + compile(schema: object | boolean): 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 {PromiseLike} validating function + */ + compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): PromiseLike; + /** + * 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 + */ + addSchema(schema: Array | object, key?: string): Ajv; + /** + * 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 + */ + addMetaSchema(schema: object, key?: string): Ajv; + /** + * Validate schema + * @param {object|Boolean} schema schema to validate + * @return {Boolean} true if schema is valid + */ + validateSchema(schema: object | boolean): boolean; + /** + * Get compiled schema from the instance by `key` or `ref`. + * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). + * @return {Function} schema validating function (with property `schema`). + */ + getSchema(keyRef: string): ValidateFunction; + /** + * Remove cached schema(s). + * If no parameter is passed all schemas but meta-schemas are removed. + * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + * @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object + * @return {Ajv} this for method chaining + */ + removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv; + /** + * 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 + */ + addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv; + /** + * 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 + */ + addKeyword(keyword: string, definition: KeywordDefinition): Ajv; + /** + * 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. + */ + getKeyword(keyword: string): object | boolean; + /** + * Remove keyword + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {Ajv} this for method chaining + */ + removeKeyword(keyword: string): Ajv; + /** + * Validate keyword + * @this Ajv + * @param {object} definition keyword definition object + * @param {boolean} throwError true to throw exception if definition is invalid + * @return {boolean} validation result + */ + validateKeyword(definition: KeywordDefinition, throwError: boolean): boolean; + /** + * Convert array of error message objects to string + * @param {Array} 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 | null, options?: ErrorsTextOptions): string; + errors?: Array | null; + } + + interface CustomLogger { + log(...args: any[]): any; + warn(...args: any[]): any; + error(...args: any[]): any; + } + + interface ValidateFunction { + ( + data: any, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | PromiseLike; + schema?: object | boolean; + errors?: null | Array; + refs?: object; + refVal?: Array; + root?: ValidateFunction | object; + $async?: true; + source?: object; + } + + interface Options { + $data?: boolean; + allErrors?: boolean; + verbose?: boolean; + jsonPointers?: boolean; + uniqueItems?: boolean; + unicode?: boolean; + format?: string; + formats?: object; + unknownFormats?: true | string[] | 'ignore'; + schemas?: Array | object; + schemaId?: '$id' | 'id' | 'auto'; + missingRefs?: true | 'ignore' | 'fail'; + extendRefs?: true | 'ignore' | 'fail'; + loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike; + removeAdditional?: boolean | 'all' | 'failing'; + useDefaults?: boolean | 'empty' | 'shared'; + coerceTypes?: boolean | 'array'; + strictDefaults?: boolean | 'log'; + strictKeywords?: boolean | 'log'; + async?: boolean | string; + transpile?: string | ((code: string) => string); + meta?: boolean | object; + validateSchema?: boolean | 'log'; + addUsedSchema?: boolean; + inlineRefs?: boolean | number; + passContext?: boolean; + loopRequired?: number; + ownProperties?: boolean; + multipleOfPrecision?: boolean | number; + errorDataPath?: string, + messages?: boolean; + sourceCode?: boolean; + processCode?: (code: string) => string; + cache?: object; + logger?: CustomLogger | false; + nullable?: boolean; + serialize?: ((schema: object | boolean) => any) | false; + } + + type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike); + type NumberFormatValidator = ((data: number) => boolean | PromiseLike); + + interface NumberFormatDefinition { + type: "number", + validate: NumberFormatValidator; + compare?: (data1: number, data2: number) => number; + async?: boolean; + } + + interface StringFormatDefinition { + type?: "string", + validate: FormatValidator; + compare?: (data1: string, data2: string) => number; + async?: boolean; + } + + type FormatDefinition = NumberFormatDefinition | StringFormatDefinition; + + interface KeywordDefinition { + type?: string | Array; + async?: boolean; + $data?: boolean; + errors?: boolean | string; + metaSchema?: object; + // schema: false makes validate not to expect schema (ValidateFunction) + schema?: boolean; + statements?: boolean; + dependencies?: Array; + 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; + } + + interface SchemaValidateFunction { + ( + schema: any, + data: any, + parentSchema?: object, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | PromiseLike; + errors?: Array; + } + + interface ErrorsTextOptions { + separator?: string; + dataVar?: string; + } + + interface ErrorObject { + keyword: string; + 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; + data?: any; + } + + type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams | + DependenciesParams | FormatParams | ComparisonParams | + MultipleOfParams | PatternParams | RequiredParams | + TypeParams | UniqueItemsParams | CustomParams | + PatternRequiredParams | PropertyNamesParams | + IfParams | SwitchParams | NoParams | EnumParams; + + interface RefParams { + ref: string; + } + + interface LimitParams { + limit: number; + } + + interface AdditionalPropertiesParams { + additionalProperty: string; + } + + interface DependenciesParams { + property: string; + missingProperty: string; + depsCount: number; + deps: string; + } + + interface FormatParams { + format: string + } + + interface ComparisonParams { + comparison: string; + limit: number | string; + exclusive: boolean; + } + + interface MultipleOfParams { + multipleOf: number; + } + + interface PatternParams { + pattern: string; + } + + interface RequiredParams { + missingProperty: string; + } + + interface TypeParams { + type: string; + } + + interface UniqueItemsParams { + i: number; + j: number; + } + + interface CustomParams { + keyword: string; + } + + interface PatternRequiredParams { + missingPattern: string; + } + + interface PropertyNamesParams { + propertyName: string; + } + + interface IfParams { + failingKeyword: string; + } + + interface SwitchParams { + caseIndex: number; + } + + interface NoParams { } + + interface EnumParams { + allowedValues: Array; + } +} + +export = ajv; diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/ajv.js b/public/node_modules/_ajv@6.10.2@ajv/lib/ajv.js new file mode 100644 index 000000000..611b93835 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/ajv.js @@ -0,0 +1,497 @@ +'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') + , util = require('./compile/util'); + +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; +Ajv.prototype.validateKeyword = customKeyword.validate; + +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-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +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); + + 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); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(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) 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} 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%\\^`{|}]|%[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)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[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|23:59:60)(?:\.\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|23:59:60)(?:\.\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#][^\s#]*)?(?:#[^\\\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}: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*$/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, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // 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, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +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 year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : 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) || + (hour == 23 && minute == 59 && second == 60)) && + (!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/public/node_modules/_ajv@6.10.2@ajv/lib/compile/index.js b/public/node_modules/_ajv@6.10.2@ajv/lib/compile/index.js new file mode 100644 index 000000000..f4d3f0d58 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/compile/index.js @@ -0,0 +1,387 @@ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + 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; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function 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' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + 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); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/compile/util.js b/public/node_modules/_ajv@6.10.2@ajv/lib/compile/util.js new file mode 100644 index 000000000..0efa00111 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/compile/util.js @@ -0,0 +1,274 @@ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i' + , $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}}='; + {{ + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + }} +{{??}} + {{ + 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/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitItems.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitItems.jst new file mode 100644 index 000000000..a3e078e51 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitItems.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitItems' }} +} {{? $breakOnError }} else { {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitLength.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitLength.jst new file mode 100644 index 000000000..cfc8dbb01 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitLength.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitLength' }} +} {{? $breakOnError }} else { {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitProperties.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitProperties.jst new file mode 100644 index 000000000..da7ea776f --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/_limitProperties.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitProperties' }} +} {{? $breakOnError }} else { {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/allOf.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/allOf.jst new file mode 100644 index 000000000..4c2836311 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/allOf.jst @@ -0,0 +1,34 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $allSchemasEmpty = true; +}} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{# def.ifResultValid }} + {{?}} +{{~}} + +{{? $breakOnError }} + {{? $allSchemasEmpty }} + if (true) { + {{??}} + {{= $closingBraces.slice(0,-1) }} + {{?}} +{{?}} + +{{# def.cleanUp }} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/anyOf.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/anyOf.jst new file mode 100644 index 000000000..086cf2b33 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/anyOf.jst @@ -0,0 +1,48 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $noEmptySchema = $schema.every(function($sch) { + return {{# def.nonEmptySchema:$sch }}; + }); +}} +{{? $noEmptySchema }} + {{ var $currentBaseId = $it.baseId; }} + var {{=$errs}} = errors; + var {{=$valid}} = false; + + {{# def.setCompositeRule }} + + {{~ $schema:$sch:$i }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{=$valid}} = {{=$valid}} || {{=$nextValid}}; + + if (!{{=$valid}}) { + {{ $closingBraces += '}'; }} + {{~}} + + {{# def.resetCompositeRule }} + + {{= $closingBraces }} + + if (!{{=$valid}}) { + {{# def.extraError:'anyOf' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} + + {{# def.cleanUp }} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/coerce.def b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/coerce.def new file mode 100644 index 000000000..86e0e18af --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/coerce.def @@ -0,0 +1,61 @@ +{{## def.coerceType: + {{ + var $dataType = 'dataType' + $lvl + , $coerced = 'coerced' + $lvl; + }} + var {{=$dataType}} = typeof {{=$data}}; + {{? it.opts.coerceTypes == 'array'}} + if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array'; + {{?}} + + var {{=$coerced}} = undefined; + + {{ var $bracesCoercion = ''; }} + {{~ $coerceToTypes:$type:$i }} + {{? $i }} + if ({{=$coerced}} === undefined) { + {{ $bracesCoercion += '}'; }} + {{?}} + + {{? it.opts.coerceTypes == 'array' && $type != 'array' }} + if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) { + {{=$coerced}} = {{=$data}} = {{=$data}}[0]; + {{=$dataType}} = typeof {{=$data}}; + /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/ + } + {{?}} + + {{? $type == 'string' }} + if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') + {{=$coerced}} = '' + {{=$data}}; + else if ({{=$data}} === null) {{=$coerced}} = ''; + {{?? $type == 'number' || $type == 'integer' }} + if ({{=$dataType}} == 'boolean' || {{=$data}} === null + || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}} + {{? $type == 'integer' }} && !({{=$data}} % 1){{?}})) + {{=$coerced}} = +{{=$data}}; + {{?? $type == 'boolean' }} + if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) + {{=$coerced}} = false; + else if ({{=$data}} === 'true' || {{=$data}} === 1) + {{=$coerced}} = true; + {{?? $type == 'null' }} + if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) + {{=$coerced}} = null; + {{?? it.opts.coerceTypes == 'array' && $type == 'array' }} + if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) + {{=$coerced}} = [{{=$data}}]; + {{?}} + {{~}} + + {{= $bracesCoercion }} + + if ({{=$coerced}} === undefined) { + {{# def.error:'type' }} + } else { + {{# def.setParentData }} + {{=$data}} = {{=$coerced}}; + {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}} + {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}}; + } +#}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/comment.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/comment.jst new file mode 100644 index 000000000..f95915035 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/comment.jst @@ -0,0 +1,9 @@ +{{# def.definitions }} +{{# def.setupKeyword }} + +{{ var $comment = it.util.toQuotedString($schema); }} +{{? it.opts.$comment === true }} + console.log({{=$comment}}); +{{?? typeof it.opts.$comment == 'function' }} + self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema); +{{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/const.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/const.jst new file mode 100644 index 000000000..2aa22980d --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/const.jst @@ -0,0 +1,11 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{? !$isData }} + var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; +{{?}} +var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); +{{# def.checkError:'const' }} +{{? $breakOnError }} else { {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/contains.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/contains.jst new file mode 100644 index 000000000..925d2c84b --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/contains.jst @@ -0,0 +1,57 @@ +{{# 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/public/node_modules/_ajv@6.10.2@ajv/lib/dot/custom.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/custom.jst new file mode 100644 index 000000000..d30588fb0 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/custom.jst @@ -0,0 +1,191 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $rule = this + , $definition = 'definition' + $lvl + , $rDef = $rule.definition + , $closingBraces = ''; + var $validate = $rDef.validate; + var $compile, $inline, $macro, $ruleValidate, $validateCode; +}} + +{{? $isData && $rDef.$data }} + {{ + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + }} + var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition; + var {{=$validateCode}} = {{=$definition}}.validate; +{{??}} + {{ + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + }} +{{?}} + +{{ + var $ruleErrs = $validateCode + '.errors' + , $i = 'i' + $lvl + , $ruleErr = 'ruleErr' + $lvl + , $asyncKeyword = $rDef.async; + + if ($asyncKeyword && !it.async) + throw new Error('async keyword in sync schema'); +}} + + +{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}} +var {{=$errs}} = errors; +var {{=$valid}}; + +{{## def.callRuleValidate: + {{=$validateCode}}.call( + {{? it.opts.passContext }}this{{??}}self{{?}} + {{? $compile || $rDef.schema === false }} + , {{=$data}} + {{??}} + , {{=$schemaValue}} + , {{=$data}} + , validate.schema{{=it.schemaPath}} + {{?}} + , {{# def.dataPath }} + {{# def.passParentData }} + , rootData + ) +#}} + +{{## def.extendErrors:_inline: + for (var {{=$i}}={{=$errs}}; {{=$i}} 0 + : it.util.schemaHasRules(_schema, it.RULES.all)) +#}} + + +{{## def.strLength: + {{? it.opts.unicode === false }} + {{=$data}}.length + {{??}} + ucs2length({{=$data}}) + {{?}} +#}} + + +{{## def.willOptimize: + it.util.varOccurences($code, $nextData) < 2 +#}} + + +{{## def.generateSubschemaCode: + {{ + var $code = it.validate($it); + $it.baseId = $currentBaseId; + }} +#}} + + +{{## def.insertSubschemaCode: + {{= it.validate($it) }} + {{ $it.baseId = $currentBaseId; }} +#}} + + +{{## def._optimizeValidate: + it.util.varReplace($code, $nextData, $passData) +#}} + + +{{## def.optimizeValidate: + {{? {{# def.willOptimize}} }} + {{= {{# def._optimizeValidate }} }} + {{??}} + var {{=$nextData}} = {{=$passData}}; + {{= $code }} + {{?}} +#}} + + +{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}} + + +{{## def.finalCleanUp: {{ out = it.util.finalCleanUpCode(out, $async); }} #}} + + +{{## def.$data: + {{ + var $isData = it.opts.$data && $schema && $schema.$data + , $schemaValue; + }} + {{? $isData }} + var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }}; + {{ $schemaValue = 'schema' + $lvl; }} + {{??}} + {{ $schemaValue = $schema; }} + {{?}} +#}} + + +{{## def.$dataNotType:_type: + {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}} +#}} + + +{{## def.check$dataIsArray: + if (schema{{=$lvl}} === undefined) {{=$valid}} = true; + else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false; + else { +#}} + + +{{## def.beginDefOut: + {{ + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + }} +#}} + + +{{## def.storeDefOut:_variable: + {{ + var _variable = out; + out = $$outStack.pop(); + }} +#}} + + +{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}} + +{{## def.setParentData: + {{ + var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData' + , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + }} +#}} + +{{## def.passParentData: + {{# def.setParentData }} + , {{= $parentData }} + , {{= $parentDataProperty }} +#}} + + +{{## def.iterateProperties: + {{? $ownProperties }} + {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}}); + for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) { + var {{=$key}} = {{=$dataProperties}}[{{=$idx}}]; + {{??}} + for (var {{=$key}} in {{=$data}}) { + {{?}} +#}} + + +{{## def.noPropertyInData: + {{=$useData}} === undefined + {{? $ownProperties }} + || !{{# def.isOwnProperty }} + {{?}} +#}} + + +{{## def.isOwnProperty: + Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}') +#}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/dependencies.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/dependencies.jst new file mode 100644 index 000000000..c41f33422 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/dependencies.jst @@ -0,0 +1,80 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.missing }} +{{# def.setupKeyword }} +{{# 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; + + for ($property in $schema) { + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } +}} + +var {{=$errs}} = errors; + +{{ var $currentErrorPath = it.errorPath; }} + +var missing{{=$lvl}}; +{{ for (var $property in $propertyDeps) { }} + {{ $deps = $propertyDeps[$property]; }} + {{? $deps.length }} + if ({{# def.propertyInData }} + {{? $breakOnError }} + && ({{# def.checkMissingProperty:$deps }})) { + {{# def.errorMissingProperty:'dependencies' }} + {{??}} + ) { + {{~ $deps:$propertyKey }} + {{# def.allErrorsMissingProperty:'dependencies' }} + {{~}} + {{?}} + } {{# def.elseIfValid }} + {{?}} +{{ } }} + +{{ + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; +}} + + +{{ for (var $property in $schemaDeps) { }} + {{ var $sch = $schemaDeps[$property]; }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{=$nextValid}} = true; + + if ({{# def.propertyInData }}) { + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + }} + + {{# def.insertSubschemaCode }} + } + + {{# def.ifResultValid }} + {{?}} +{{ } }} + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} + +{{# def.cleanUp }} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/enum.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/enum.jst new file mode 100644 index 000000000..357c2e8c0 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/enum.jst @@ -0,0 +1,30 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $i = 'i' + $lvl + , $vSchema = 'schema' + $lvl; +}} + +{{? !$isData }} + var {{=$vSchema}} = validate.schema{{=$schemaPath}}; +{{?}} +var {{=$valid}}; + +{{?$isData}}{{# def.check$dataIsArray }}{{?}} + +{{=$valid}} = false; + +for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++) + if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) { + {{=$valid}} = true; + break; + } + +{{? $isData }} } {{?}} + +{{# def.checkError:'enum' }} + +{{? $breakOnError }} else { {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/errors.def b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/errors.def new file mode 100644 index 000000000..5c5752cb0 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/errors.def @@ -0,0 +1,194 @@ +{{# def.definitions }} + +{{## def._error:_rule: + {{ 'istanbul ignore else'; }} + {{? it.createErrors !== false }} + { + keyword: '{{= $errorKeyword || _rule }}' + , dataPath: (dataPath || '') + {{= it.errorPath }} + , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}} + , params: {{# def._errorParams[_rule] }} + {{? it.opts.messages !== false }} + , message: {{# def._errorMessages[_rule] }} + {{?}} + {{? it.opts.verbose }} + , schema: {{# def._errorSchemas[_rule] }} + , parentSchema: validate.schema{{=it.schemaPath}} + , data: {{=$data}} + {{?}} + } + {{??}} + {} + {{?}} +#}} + + +{{## def._addError:_rule: + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; +#}} + + +{{## def.addError:_rule: + var err = {{# def._error:_rule }}; + {{# def._addError:_rule }} +#}} + + +{{## def.error:_rule: + {{# def.beginDefOut}} + {{# def._error:_rule }} + {{# def.storeDefOut:__err }} + + {{? !it.compositeRule && $breakOnError }} + {{ 'istanbul ignore if'; }} + {{? it.async }} + throw new ValidationError([{{=__err}}]); + {{??}} + validate.errors = [{{=__err}}]; + return false; + {{?}} + {{??}} + var err = {{=__err}}; + {{# def._addError:_rule }} + {{?}} +#}} + + +{{## def.extraError:_rule: + {{# def.addError:_rule}} + {{? !it.compositeRule && $breakOnError }} + {{ 'istanbul ignore if'; }} + {{? it.async }} + throw new ValidationError(vErrors); + {{??}} + validate.errors = vErrors; + return false; + {{?}} + {{?}} +#}} + + +{{## def.checkError:_rule: + if (!{{=$valid}}) { + {{# def.error:_rule }} + } +#}} + + +{{## def.resetErrors: + errors = {{=$errs}}; + if (vErrors !== null) { + if ({{=$errs}}) vErrors.length = {{=$errs}}; + else vErrors = null; + } +#}} + + +{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}} +{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}} +{{## 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: "'{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}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}}\"'", + 'if': "'should match \"' + {{=$ifClause}} + '\" schema'", + _limit: "'should be {{=$opStr}} {{#def.appendSchema}}", + _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'", + _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} items'", + _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'", + _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} properties'", + multipleOf: "'should be multiple of {{#def.appendSchema}}", + not: "'should NOT be valid'", + oneOf: "'should match exactly one schema in oneOf'", + pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'", + 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'", + patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''", + switch: "'should pass \"switch\" keyword validation'", + _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'", + _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'" +} #}} + + +{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}} +{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} + +{{## def._errorSchemas = { + '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}}", + 'if': "validate.schema{{=$schemaPath}}", + _limit: "{{#def.schemaRefOrVal}}", + _exclusiveLimit: "validate.schema{{=$schemaPath}}", + _limitItems: "{{#def.schemaRefOrVal}}", + _limitLength: "{{#def.schemaRefOrVal}}", + _limitProperties:"{{#def.schemaRefOrVal}}", + multipleOf: "{{#def.schemaRefOrVal}}", + not: "validate.schema{{=$schemaPath}}", + oneOf: "validate.schema{{=$schemaPath}}", + pattern: "{{#def.schemaRefOrQS}}", + propertyNames: "validate.schema{{=$schemaPath}}", + required: "validate.schema{{=$schemaPath}}", + type: "validate.schema{{=$schemaPath}}", + uniqueItems: "{{#def.schemaRefOrVal}}", + custom: "validate.schema{{=$schemaPath}}", + patternRequired: "validate.schema{{=$schemaPath}}", + switch: "validate.schema{{=$schemaPath}}", + _formatLimit: "{{#def.schemaRefOrQS}}", + _formatExclusiveLimit: "validate.schema{{=$schemaPath}}" +} #}} + + +{{## 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: "{ allowedValue: schema{{=$lvl}} }", + 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}} }", + 'if': "{ failingKeyword: {{=$ifClause}} }", + _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }", + _exclusiveLimit: "{}", + _limitItems: "{ limit: {{=$schemaValue}} }", + _limitLength: "{ limit: {{=$schemaValue}} }", + _limitProperties:"{ limit: {{=$schemaValue}} }", + multipleOf: "{ multipleOf: {{=$schemaValue}} }", + not: "{}", + oneOf: "{ passingSchemas: {{=$passingSchemas}} }", + pattern: "{ pattern: {{#def.schemaValueQS}} }", + propertyNames: "{ propertyName: '{{=$invalidName}}' }", + required: "{ missingProperty: '{{=$missingProperty}}' }", + type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }", + uniqueItems: "{ i: i, j: j }", + custom: "{ keyword: '{{=$rule.keyword}}' }", + patternRequired: "{ missingPattern: '{{=$missingPattern}}' }", + switch: "{ caseIndex: {{=$caseIndex}} }", + _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }", + _formatExclusiveLimit: "{}" +} #}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/format.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/format.jst new file mode 100644 index 000000000..37f14da80 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/format.jst @@ -0,0 +1,106 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} + +{{## def.skipFormat: + {{? $breakOnError }} if (true) { {{?}} + {{ return out; }} +#}} + +{{? it.opts.format === false }}{{# def.skipFormat }}{{?}} + + +{{# def.$data }} + + +{{## def.$dataCheckFormat: + {{# def.$dataNotType:'string' }} + ({{? $unknownFormats != 'ignore' }} + ({{=$schemaValue}} && !{{=$format}} + {{? $allowUnknown }} + && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1 + {{?}}) || + {{?}} + ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}' + && !(typeof {{=$format}} == 'function' + ? {{? it.async}} + (async{{=$lvl}} ? await {{=$format}}({{=$data}}) : {{=$format}}({{=$data}})) + {{??}} + {{=$format}}({{=$data}}) + {{?}} + : {{=$format}}.test({{=$data}})))) +#}} + +{{## def.checkFormat: + {{ + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + }} + {{? typeof $format == 'function' }} + {{=$formatRef}}({{=$data}}) + {{??}} + {{=$formatRef}}.test({{=$data}}) + {{?}} +#}} + + +{{ + var $unknownFormats = it.opts.unknownFormats + , $allowUnknown = Array.isArray($unknownFormats); +}} + +{{? $isData }} + {{ + var $format = 'format' + $lvl + , $isObject = 'isObject' + $lvl + , $formatType = 'formatType' + $lvl; + }} + var {{=$format}} = formats[{{=$schemaValue}}]; + var {{=$isObject}} = typeof {{=$format}} == 'object' + && !({{=$format}} instanceof RegExp) + && {{=$format}}.validate; + var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string'; + if ({{=$isObject}}) { + {{? it.async}} + var async{{=$lvl}} = {{=$format}}.async; + {{?}} + {{=$format}} = {{=$format}}.validate; + } + if ({{# def.$dataCheckFormat }}) { +{{??}} + {{ 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 }} + {{??}} + {{ 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; + } + }} + {{? $formatType != $ruleType }} + {{# def.skipFormat }} + {{?}} + {{? $async }} + {{ + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + }} + if (!(await {{=$formatRef}}({{=$data}}))) { + {{??}} + if (!{{# def.checkFormat }}) { + {{?}} +{{?}} + {{# def.error:'format' }} + } {{? $breakOnError }} else { {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/if.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/if.jst new file mode 100644 index 000000000..7ccc9b7f7 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/if.jst @@ -0,0 +1,75 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateIfClause:_clause: + {{ + $it.schema = it.schema['_clause']; + $it.schemaPath = it.schemaPath + '._clause'; + $it.errSchemaPath = it.errSchemaPath + '/_clause'; + }} + {{# def.insertSubschemaCode }} + {{=$valid}} = {{=$nextValid}}; + {{? $thenPresent && $elsePresent }} + {{ $ifClause = 'ifClause' + $lvl; }} + var {{=$ifClause}} = '_clause'; + {{??}} + {{ $ifClause = '\'_clause\''; }} + {{?}} +#}} + +{{ + var $thenSch = it.schema['then'] + , $elseSch = it.schema['else'] + , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }} + , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }} + , $currentBaseId = $it.baseId; +}} + +{{? $thenPresent || $elsePresent }} + {{ + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + var {{=$errs}} = errors; + var {{=$valid}} = true; + + {{# def.setCompositeRule }} + {{# def.insertSubschemaCode }} + {{ $it.createErrors = true; }} + {{# def.resetErrors }} + {{# def.resetCompositeRule }} + + {{? $thenPresent }} + if ({{=$nextValid}}) { + {{# def.validateIfClause:then }} + } + {{? $elsePresent }} + else { + {{?}} + {{??}} + if (!{{=$nextValid}}) { + {{?}} + + {{? $elsePresent }} + {{# def.validateIfClause:else }} + } + {{?}} + + if (!{{=$valid}}) { + {{# def.extraError:'if' }} + } + {{? $breakOnError }} else { {{?}} + + {{# def.cleanUp }} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} + diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/items.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/items.jst new file mode 100644 index 000000000..8c0f5acb5 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/items.jst @@ -0,0 +1,100 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateItems:startFrom: + for (var {{=$idx}} = {{=startFrom}}; {{=$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 }} + + {{? $breakOnError }} + if (!{{=$nextValid}}) break; + {{?}} + } +#}} + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? Array.isArray($schema) }} + {{ /* 'items' is an array of schemas */}} + {{ var $additionalItems = it.schema.additionalItems; }} + {{? $additionalItems === false }} + {{=$valid}} = {{=$data}}.length <= {{= $schema.length }}; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{# def.checkError:'additionalItems' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{# def.elseIfValid}} + {{?}} + + {{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{=$i}}) { + {{ + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + } + + {{# def.ifResultValid }} + {{?}} + {{~}} + + {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }} + {{ + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{= $schema.length }}) { + {{# def.validateItems: $schema.length }} + } + + {{# def.ifResultValid }} + {{?}} + +{{?? {{# def.nonEmptySchema:$schema }} }} + {{ /* 'items' is a single schema */}} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + {{# def.validateItems: 0 }} +{{?}} + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} + +{{# def.cleanUp }} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/missing.def b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/missing.def new file mode 100644 index 000000000..a73b9f966 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/missing.def @@ -0,0 +1,39 @@ +{{## def.checkMissingProperty:_properties: + {{~ _properties:$propertyKey:$i }} + {{?$i}} || {{?}} + {{ + var $prop = it.util.getProperty($propertyKey) + , $useData = $data + $prop; + }} + ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) ) + {{~}} +#}} + + +{{## def.errorMissingProperty:_error: + {{ + var $propertyPath = 'missing' + $lvl + , $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers + ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) + : $currentErrorPath + ' + ' + $propertyPath; + } + }} + {{# def.error:_error }} +#}} + + +{{## def.allErrorsMissingProperty:_error: + {{ + var $prop = it.util.getProperty($propertyKey) + , $missingProperty = it.util.escapeQuotes($propertyKey) + , $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + }} + if ({{# def.noPropertyInData }}) { + {{# def.addError:_error }} + } +#}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/multipleOf.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/multipleOf.jst new file mode 100644 index 000000000..5f8dd33b5 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/multipleOf.jst @@ -0,0 +1,20 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +var division{{=$lvl}}; +if ({{?$isData}} + {{=$schemaValue}} !== undefined && ( + typeof {{=$schemaValue}} != 'number' || + {{?}} + (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, + {{? it.opts.multipleOfPrecision }} + Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} + {{??}} + division{{=$lvl}} !== parseInt(division{{=$lvl}}) + {{?}} + ) + {{?$isData}} ) {{?}} ) { + {{# def.error:'multipleOf' }} +} {{? $breakOnError }} else { {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/not.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/not.jst new file mode 100644 index 000000000..e03185ae8 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/not.jst @@ -0,0 +1,43 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$errs}} = errors; + + {{# def.setCompositeRule }} + + {{ + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + }} + {{= it.validate($it) }} + {{ + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + }} + + {{# def.resetCompositeRule }} + + if ({{=$nextValid}}) { + {{# def.error:'not' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} +{{??}} + {{# def.addError:'not' }} + {{? $breakOnError}} + if (false) { + {{?}} +{{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/oneOf.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/oneOf.jst new file mode 100644 index 000000000..bcce2c6ed --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/oneOf.jst @@ -0,0 +1,54 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $prevValid = 'prevValid' + $lvl + , $passingSchemas = 'passingSchemas' + $lvl; +}} + +var {{=$errs}} = errors + , {{=$prevValid}} = false + , {{=$valid}} = false + , {{=$passingSchemas}} = null; + +{{# def.setCompositeRule }} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + {{??}} + var {{=$nextValid}} = true; + {{?}} + + {{? $i }} + if ({{=$nextValid}} && {{=$prevValid}}) { + {{=$valid}} = false; + {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}]; + } else { + {{ $closingBraces += '}'; }} + {{?}} + + if ({{=$nextValid}}) { + {{=$valid}} = {{=$prevValid}} = true; + {{=$passingSchemas}} = {{=$i}}; + } +{{~}} + +{{# def.resetCompositeRule }} + +{{= $closingBraces }} + +if (!{{=$valid}}) { + {{# def.extraError:'oneOf' }} +} else { + {{# def.resetErrors }} +{{? it.opts.allErrors }} } {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/pattern.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/pattern.jst new file mode 100644 index 000000000..3a37ef6cb --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/pattern.jst @@ -0,0 +1,14 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $regexp = $isData + ? '(new RegExp(' + $schemaValue + '))' + : it.usePattern($schema); +}} + +if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { + {{# def.error:'pattern' }} +} {{? $breakOnError }} else { {{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/properties.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/properties.jst new file mode 100644 index 000000000..862067e75 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/properties.jst @@ -0,0 +1,244 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateAdditional: + {{ /* additionalProperties is schema */ + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty + ? it.errorPath + : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} +#}} + + +{{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl; + + var $schemaKeys = Object.keys($schema || {}) + , $pProperties = it.schema.patternProperties || {} + , $pPropertyKeys = Object.keys($pProperties) + , $aProperties = it.schema.additionalProperties + , $someProperties = $schemaKeys.length || $pPropertyKeys.length + , $noAdditional = $aProperties === false + , $additionalIsSchema = typeof $aProperties == 'object' + && Object.keys($aProperties).length + , $removeAdditional = it.opts.removeAdditional + , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) + var $requiredHash = it.util.toHash($required); +}} + + +var {{=$errs}} = errors; +var {{=$nextValid}} = true; +{{? $ownProperties }} + var {{=$dataProperties}} = undefined; +{{?}} + +{{? $checkAdditional }} + {{# def.iterateProperties }} + {{? $someProperties }} + var isAdditional{{=$lvl}} = !(false + {{? $schemaKeys.length }} + {{? $schemaKeys.length > 8 }} + || validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}}) + {{??}} + {{~ $schemaKeys:$propertyKey }} + || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }} + {{~}} + {{?}} + {{?}} + {{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty:$i }} + || {{= it.usePattern($pProperty) }}.test({{=$key}}) + {{~}} + {{?}} + ); + + if (isAdditional{{=$lvl}}) { + {{?}} + {{? $removeAdditional == 'all' }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{ + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + }} + {{? $noAdditional }} + {{? $removeAdditional }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{=$nextValid}} = false; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + }} + {{# def.error:'additionalProperties' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{? $breakOnError }} break; {{?}} + {{?}} + {{?? $additionalIsSchema }} + {{? $removeAdditional == 'failing' }} + var {{=$errs}} = errors; + {{# def.setCompositeRule }} + + {{# def.validateAdditional }} + + if (!{{=$nextValid}}) { + errors = {{=$errs}}; + if (validate.errors !== null) { + if (errors) validate.errors.length = errors; + else validate.errors = null; + } + delete {{=$data}}[{{=$key}}]; + } + + {{# def.resetCompositeRule }} + {{??}} + {{# def.validateAdditional }} + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + {{?}} + {{?}} + {{ it.errorPath = $currentErrorPath; }} + {{?}} + {{? $someProperties }} + } + {{?}} + } + + {{# def.ifResultValid }} +{{?}} + +{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }} + +{{? $schemaKeys.length }} + {{~ $schemaKeys:$propertyKey }} + {{ var $sch = $schema[$propertyKey]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + var $prop = it.util.getProperty($propertyKey) + , $passData = $data + $prop + , $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + }} + + {{# def.generateSubschemaCode }} + + {{? {{# def.willOptimize }} }} + {{ + $code = {{# def._optimizeValidate }}; + var $useData = $passData; + }} + {{??}} + {{ var $useData = $nextData; }} + var {{=$nextData}} = {{=$passData}}; + {{?}} + + {{? $hasDefault }} + {{= $code }} + {{??}} + {{? $requiredHash && $requiredHash[$propertyKey] }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = false; + {{ + var $currentErrorPath = it.errorPath + , $currErrSchemaPath = $errSchemaPath + , $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + }} + {{# def.error:'required' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{ it.errorPath = $currentErrorPath; }} + } else { + {{??}} + {{? $breakOnError }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = true; + } else { + {{??}} + if ({{=$useData}} !== undefined + {{? $ownProperties }} + && {{# def.isOwnProperty }} + {{?}} + ) { + {{?}} + {{?}} + + {{= $code }} + } + {{?}} {{ /* $hasDefault */ }} + {{?}} {{ /* def.nonEmptySchema */ }} + + {{# def.ifResultValid }} + {{~}} +{{?}} + +{{? $pPropertyKeys.length }} + {{~ $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.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; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + } + {{? $breakOnError }} else {{=$nextValid}} = true; {{?}} + } + + {{# def.ifResultValid }} + {{?}} {{ /* def.nonEmptySchema */ }} + {{~}} +{{?}} + + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} + +{{# def.cleanUp }} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/propertyNames.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/propertyNames.jst new file mode 100644 index 000000000..ee52b2151 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/propertyNames.jst @@ -0,0 +1,54 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +var {{=$errs}} = errors; + +{{? {{# 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; + }} + + {{? $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}}= it.opts.loopRequired + , $ownProperties = it.opts.ownProperties; + }} + + {{? $breakOnError }} + var missing{{=$lvl}}; + {{? $loopRequired }} + {{# def.setupLoop }} + var {{=$valid}} = true; + + {{?$isData}}{{# def.check$dataIsArray }}{{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined + {{? $ownProperties }} + && {{# def.isRequiredOwnProperty }} + {{?}}; + if (!{{=$valid}}) break; + } + + {{? $isData }} } {{?}} + + {{# def.checkError:'required' }} + else { + {{??}} + if ({{# def.checkMissingProperty:$required }}) { + {{# def.errorMissingProperty:'required' }} + } else { + {{?}} + {{??}} + {{? $loopRequired }} + {{# def.setupLoop }} + {{? $isData }} + if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) { + {{# def.addError:'required' }} + } else if ({{=$vSchema}} !== undefined) { + {{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined + {{? $ownProperties }} + || !{{# def.isRequiredOwnProperty }} + {{?}}) { + {{# def.addError:'required' }} + } + } + + {{? $isData }} } {{?}} + {{??}} + {{~ $required:$propertyKey }} + {{# def.allErrorsMissingProperty:'required' }} + {{~}} + {{?}} + {{?}} + + {{ it.errorPath = $currentErrorPath; }} + +{{?? $breakOnError }} + if (true) { +{{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/uniqueItems.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/uniqueItems.jst new file mode 100644 index 000000000..22f82f99d --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/uniqueItems.jst @@ -0,0 +1,62 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + + +{{? ($schema || $isData) && it.opts.uniqueItems !== false }} + {{? $isData }} + var {{=$valid}}; + if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined) + {{=$valid}} = true; + else if (typeof {{=$schemaValue}} != 'boolean') + {{=$valid}} = false; + else { + {{?}} + + var i = {{=$data}}.length + , {{=$valid}} = true + , j; + if (i > 1) { + {{ + var $itemType = it.schema.items && it.schema.items.type + , $typeIsArray = Array.isArray($itemType); + }} + {{? !$itemType || $itemType == 'object' || $itemType == 'array' || + ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }} + outer: + for (;i--;) { + for (j = i; j--;) { + if (equal({{=$data}}[i], {{=$data}}[j])) { + {{=$valid}} = false; + break outer; + } + } + } + {{??}} + var itemIndices = {}, item; + for (;i--;) { + var item = {{=$data}}[i]; + {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }} + if ({{= it.util[$method]($itemType, 'item', true) }}) continue; + {{? $typeIsArray}} + if (typeof item == 'string') item = '"' + item; + {{?}} + if (typeof itemIndices[item] == 'number') { + {{=$valid}} = false; + j = itemIndices[item]; + break; + } + itemIndices[item] = i; + } + {{?}} + } + + {{? $isData }} } {{?}} + + if (!{{=$valid}}) { + {{# def.error:'uniqueItems' }} + } {{? $breakOnError }} else { {{?}} +{{??}} + {{? $breakOnError }} if (true) { {{?}} +{{?}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dot/validate.jst b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/validate.jst new file mode 100644 index 000000000..f8a1edfc0 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dot/validate.jst @@ -0,0 +1,282 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.defaults }} +{{# def.coerce }} + +{{ /** + * schema compilation (render) time: + * it = { schema, RULES, _validate, opts } + * it.validate - this template function, + * it is used recursively to generate code for subschemas + * + * runtime: + * "validate" is a variable name to which this function will be assigned + * validateRef etc. are defined in the parent scope in index.js + */ }} + +{{ + var $async = it.schema.$async === true + , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref') + , $id = it.self._getId(it.schema); +}} + +{{ + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } +}} + +{{? it.isTop }} + var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + {{? $id && (it.opts.sourceCode || it.opts.processCode) }} + {{= '/\*# sourceURL=' + $id + ' */' }} + {{?}} +{{?}} + +{{? 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 }} + {{ + 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]; + + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + }} + + 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 $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'); + }} + + 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 ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) + $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } +}} + +{{## def.checkType: + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type' + , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + }} + + 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 + '"'); + }} + {{?}} +{{?}} + +{{? it.schema.$comment && it.opts.$comment }} + {{= it.RULES.all.$comment.code(it, '$comment') }} +{{?}} + +{{? $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 $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.checkType }} + {{? $coerceToTypes }} + {{# def.coerceType }} + {{??}} + {{# def.error:'type' }} + {{?}} + } + {{?}} +{{?}} + + +{{? it.schema.$ref && !$refKeywords }} + {{= it.RULES.all.$ref.code(it, '$ref') }} + {{? $breakOnError }} + } + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} +{{??}} + {{~ it.RULES:$rulesGroup }} + {{? $shouldUseGroup($rulesGroup) }} + {{? $rulesGroup.type }} + if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) { + {{?}} + {{? it.opts.useDefaults }} + {{? $rulesGroup.type == 'object' && it.schema.properties }} + {{# def.defaultProperties }} + {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }} + {{# def.defaultItems }} + {{?}} + {{?}} + {{~ $rulesGroup.rules:$rule }} + {{? $shouldUseRule($rule) }} + {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }} + {{? $code }} + {{= $code }} + {{? $breakOnError }} + {{ $closingBraces1 += '}'; }} + {{?}} + {{?}} + {{?}} + {{~}} + {{? $breakOnError }} + {{= $closingBraces1 }} + {{ $closingBraces1 = ''; }} + {{?}} + {{? $rulesGroup.type }} + } + {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }} + else { + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.error:'type' }} + } + {{?}} + {{?}} + + {{? $breakOnError }} + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} + {{?}} + {{~}} +{{?}} + +{{? $breakOnError }} {{= $closingBraces2 }} {{?}} + +{{? $top }} + {{? $async }} + if (errors === 0) return data; {{ /* don't edit, used in replace */ }} + else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }} + {{??}} + validate.errors = vErrors; {{ /* don't edit, used in replace */ }} + return errors === 0; {{ /* don't edit, used in replace */ }} + {{?}} + }; + + return validate; +{{??}} + var {{=$valid}} = errors === errs_{{=$lvl}}; +{{?}} + +{{# def.cleanUp }} + +{{? $top }} + {{# def.finalCleanUp }} +{{?}} + +{{ + 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; + } +}} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/README.md b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/README.md new file mode 100644 index 000000000..4d994846c --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/README.md @@ -0,0 +1,3 @@ +These files are compiled dot templates from dot folder. + +Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limit.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limit.js new file mode 100644 index 000000000..f02a76014 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limit.js @@ -0,0 +1,157 @@ +'use strict'; +module.exports = function generate__limit(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + 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\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($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) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $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) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitItems.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitItems.js new file mode 100644 index 000000000..a27d11886 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitItems.js @@ -0,0 +1,77 @@ +'use strict'; +module.exports = function generate__limitItems(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitLength.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitLength.js new file mode 100644 index 000000000..789f3741e --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitLength.js @@ -0,0 +1,82 @@ +'use strict'; +module.exports = function generate__limitLength(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitProperties.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitProperties.js new file mode 100644 index 000000000..11dc93931 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/_limitProperties.js @@ -0,0 +1,77 @@ +'use strict'; +module.exports = function generate__limitProperties(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/allOf.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/allOf.js new file mode 100644 index 000000000..4bad914d6 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/allOf.js @@ -0,0 +1,43 @@ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/anyOf.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/anyOf.js new file mode 100644 index 000000000..01551d54b --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/anyOf.js @@ -0,0 +1,74 @@ +'use strict'; +module.exports = function generate_anyOf(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 $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + 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) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + 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; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/comment.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/comment.js new file mode 100644 index 000000000..dd66bb8f0 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/comment.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/const.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/const.js new file mode 100644 index 000000000..15b7c619f --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/const.js @@ -0,0 +1,56 @@ +'use strict'; +module.exports = function generate_const(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/contains.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/contains.js new file mode 100644 index 000000000..cd4dfabeb --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/contains.js @@ -0,0 +1,82 @@ +'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.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : 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/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/custom.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/custom.js new file mode 100644 index 000000000..f3e641e70 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/custom.js @@ -0,0 +1,228 @@ +'use strict'; +module.exports = function generate_custom(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 $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0 : 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/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/enum.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/enum.js new file mode 100644 index 000000000..90580b9ff --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/enum.js @@ -0,0 +1,66 @@ +'use strict'; +module.exports = function generate_enum(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/format.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/format.js new file mode 100644 index 000000000..cd9a5693e --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/format.js @@ -0,0 +1,150 @@ +'use strict'; +module.exports = function generate_format(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 || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $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) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } 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) { '; + } + 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'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/if.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/if.js new file mode 100644 index 000000000..019f61ab5 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/if.js @@ -0,0 +1,104 @@ +'use strict'; +module.exports = function generate_if(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); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + 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; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/index.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/index.js new file mode 100644 index 000000000..2fb1b00ef --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/index.js @@ -0,0 +1,33 @@ +'use strict'; + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': require('./ref'), + allOf: require('./allOf'), + anyOf: require('./anyOf'), + '$comment': require('./comment'), + const: require('./const'), + contains: require('./contains'), + dependencies: require('./dependencies'), + 'enum': require('./enum'), + format: require('./format'), + 'if': require('./if'), + items: require('./items'), + maximum: require('./_limit'), + minimum: require('./_limit'), + maxItems: require('./_limitItems'), + minItems: require('./_limitItems'), + maxLength: require('./_limitLength'), + minLength: require('./_limitLength'), + maxProperties: require('./_limitProperties'), + minProperties: require('./_limitProperties'), + multipleOf: require('./multipleOf'), + not: require('./not'), + oneOf: require('./oneOf'), + pattern: require('./pattern'), + properties: require('./properties'), + propertyNames: require('./propertyNames'), + required: require('./required'), + uniqueItems: require('./uniqueItems'), + validate: require('./validate') +}; diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/items.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/items.js new file mode 100644 index 000000000..d5532f07c --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/items.js @@ -0,0 +1,141 @@ +'use strict'; +module.exports = function generate_items(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; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($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) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' 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) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/multipleOf.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/multipleOf.js new file mode 100644 index 000000000..af087d2c3 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/multipleOf.js @@ -0,0 +1,77 @@ +'use strict'; +module.exports = function generate_multipleOf(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/not.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/not.js new file mode 100644 index 000000000..6aea65991 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/not.js @@ -0,0 +1,84 @@ +'use strict'; +module.exports = function generate_not(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); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/oneOf.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/oneOf.js new file mode 100644 index 000000000..30988d5e3 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/oneOf.js @@ -0,0 +1,73 @@ +'use strict'; +module.exports = function generate_oneOf(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 $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + 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; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/pattern.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/pattern.js new file mode 100644 index 000000000..1d74d6b04 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/pattern.js @@ -0,0 +1,75 @@ +'use strict'; +module.exports = function generate_pattern(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/properties.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/properties.js new file mode 100644 index 000000000..34a82c62d --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/properties.js @@ -0,0 +1,330 @@ +'use strict'; +module.exports = function generate_properties(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 $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + 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) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, 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) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, 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; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + 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 ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : 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 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/propertyNames.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/propertyNames.js new file mode 100644 index 000000000..b2bf29540 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/propertyNames.js @@ -0,0 +1,82 @@ +'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; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : 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; + 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) + ' 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = 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)) + ') ) '; + } + } + 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: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { 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) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($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 */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, 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; + 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: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/uniqueItems.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/uniqueItems.js new file mode 100644 index 000000000..c4f6536b4 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/uniqueItems.js @@ -0,0 +1,86 @@ +'use strict'; +module.exports = function generate_uniqueItems(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 $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/validate.js b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/validate.js new file mode 100644 index 000000000..cd0efc810 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/dotjs/validate.js @@ -0,0 +1,494 @@ +'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.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(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]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + 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 ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + 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 (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + 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 { + 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) { + 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); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($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 + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($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/public/node_modules/_ajv@6.10.2@ajv/lib/keyword.js b/public/node_modules/_ajv@6.10.2@ajv/lib/keyword.js new file mode 100644 index 000000000..5fec19a67 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/lib/keyword.js @@ -0,0 +1,146 @@ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); +var definitionSchema = require('./definition_schema'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @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 */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i ../ajv-dist/bower.json + cd ../ajv-dist + + if [[ `git status --porcelain` ]]; then + echo "Changes detected. Updating master branch..." + git add -A + git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin master > /dev/null 2>&1 + fi + + echo "Publishing tag..." + + git tag $TRAVIS_TAG + git push --tags > /dev/null 2>&1 + + echo "Done" +fi diff --git a/public/node_modules/_ajv@6.10.2@ajv/scripts/travis-gh-pages b/public/node_modules/_ajv@6.10.2@ajv/scripts/travis-gh-pages new file mode 100755 index 000000000..46ded1611 --- /dev/null +++ b/public/node_modules/_ajv@6.10.2@ajv/scripts/travis-gh-pages @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -e + +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then + git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { + rm -rf ../gh-pages + git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages + mkdir -p ../gh-pages/_source + cp *.md ../gh-pages/_source + cp LICENSE ../gh-pages/_source + currentDir=$(pwd) + cd ../gh-pages + $currentDir/node_modules/.bin/gh-pages-generator + # remove logo from README + sed -i -E "s/]+ajv_logo[^>]+>//" index.md + git config user.email "$GIT_USER_EMAIL" + git config user.name "$GIT_USER_NAME" + git add . + git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin gh-pages > /dev/null 2>&1 + } +fi diff --git a/public/node_modules/_aproba@1.2.0@aproba/LICENSE b/public/node_modules/_aproba@1.2.0@aproba/LICENSE new file mode 100644 index 000000000..f4be44d88 --- /dev/null +++ b/public/node_modules/_aproba@1.2.0@aproba/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/public/node_modules/_aproba@1.2.0@aproba/README.md b/public/node_modules/_aproba@1.2.0@aproba/README.md new file mode 100644 index 000000000..0bfc594c5 --- /dev/null +++ b/public/node_modules/_aproba@1.2.0@aproba/README.md @@ -0,0 +1,94 @@ +aproba +====== + +A ridiculously light-weight function argument validator + +``` +var validate = require("aproba") + +function myfunc(a, b, c) { + // `a` must be a string, `b` a number, `c` a function + validate('SNF', arguments) // [a,b,c] is also valid +} + +myfunc('test', 23, function () {}) // ok +myfunc(123, 23, function () {}) // type error +myfunc('test', 23) // missing arg error +myfunc('test', 23, function () {}, true) // too many args error + +``` + +Valid types are: + +| type | description +| :--: | :---------- +| * | matches any type +| A | `Array.isArray` OR an `arguments` object +| S | typeof == string +| N | typeof == number +| F | typeof == function +| O | typeof == object and not type A and not type E +| B | typeof == boolean +| E | `instanceof Error` OR `null` **(special: see below)** +| Z | == `null` + +Validation failures throw one of three exception types, distinguished by a +`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. + +If you pass in an invalid type then it will throw with a code of +`EUNKNOWNTYPE`. + +If an **error** argument is found and is not null then the remaining +arguments are optional. That is, if you say `ESO` then that's like using a +non-magical `E` in: `E|ESO|ZSO`. + +### But I have optional arguments?! + +You can provide more than one signature by separating them with pipes `|`. +If any signature matches the arguments then they'll be considered valid. + +So for example, say you wanted to write a signature for +`fs.createWriteStream`. The docs for it describe it thusly: + +``` +fs.createWriteStream(path[, options]) +``` + +This would be a signature of `SO|S`. That is, a string and and object, or +just a string. + +Now, if you read the full `fs` docs, you'll see that actually path can ALSO +be a buffer. And options can be a string, that is: +``` +path | +options | +``` + +To reproduce this you have to fully enumerate all of the possible +combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The +awkwardness is a feature: It reminds you of the complexity you're adding to +your API when you do this sort of thing. + + +### Browser support + +This has no dependencies and should work in browsers, though you'll have +noisier stack traces. + +### Why this exists + +I wanted a very simple argument validator. It needed to do two things: + +1. Be more concise and easier to use than assertions + +2. Not encourage an infinite bikeshed of DSLs + +This is why types are specified by a single character and there's no such +thing as an optional argument. + +This is not intended to validate user data. This is specifically about +asserting the interface of your functions. + +If you need greater validation, I encourage you to write them by hand or +look elsewhere. + diff --git a/public/node_modules/_aproba@1.2.0@aproba/index.js b/public/node_modules/_aproba@1.2.0@aproba/index.js new file mode 100644 index 000000000..6f3f797c0 --- /dev/null +++ b/public/node_modules/_aproba@1.2.0@aproba/index.js @@ -0,0 +1,105 @@ +'use strict' + +function isArguments (thingy) { + return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') +} + +var types = { + '*': {label: 'any', check: function () { return true }}, + A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }}, + S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }}, + N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }}, + F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }}, + O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }}, + B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }}, + E: {label: 'error', check: function (thingy) { return thingy instanceof Error }}, + Z: {label: 'null', check: function (thingy) { return thingy == null }} +} + +function addSchema (schema, arity) { + var group = arity[schema.length] = arity[schema.length] || [] + if (group.indexOf(schema) === -1) group.push(schema) +} + +var validate = module.exports = function (rawSchemas, args) { + if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) + if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') + if (!args) throw missingRequiredArg(1, 'args') + if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) + if (!types.A.check(args)) throw invalidType(1, ['array'], args) + var schemas = rawSchemas.split('|') + var arity = {} + + schemas.forEach(function (schema) { + for (var ii = 0; ii < schema.length; ++ii) { + var type = schema[ii] + if (!types[type]) throw unknownType(ii, type) + } + if (/E.*E/.test(schema)) throw moreThanOneError(schema) + addSchema(schema, arity) + if (/E/.test(schema)) { + addSchema(schema.replace(/E.*$/, 'E'), arity) + addSchema(schema.replace(/E/, 'Z'), arity) + if (schema.length === 1) addSchema('', arity) + } + }) + var matching = arity[args.length] + if (!matching) { + throw wrongNumberOfArgs(Object.keys(arity), args.length) + } + for (var ii = 0; ii < args.length; ++ii) { + var newMatching = matching.filter(function (schema) { + var type = schema[ii] + var typeCheck = types[type].check + return typeCheck(args[ii]) + }) + if (!newMatching.length) { + var labels = matching.map(function (schema) { + return types[schema[ii]].label + }).filter(function (schema) { return schema != null }) + throw invalidType(ii, labels, args[ii]) + } + matching = newMatching + } +} + +function missingRequiredArg (num) { + return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) +} + +function unknownType (num, type) { + return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) +} + +function invalidType (num, expectedTypes, value) { + var valueType + Object.keys(types).forEach(function (typeCode) { + if (types[typeCode].check(value)) valueType = types[typeCode].label + }) + return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + + englishList(expectedTypes) + ' but got ' + valueType) +} + +function englishList (list) { + return list.join(', ').replace(/, ([^,]+)$/, ' or $1') +} + +function wrongNumberOfArgs (expected, got) { + var english = englishList(expected) + var args = expected.every(function (ex) { return ex.length === 1 }) + ? 'argument' + : 'arguments' + return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) +} + +function moreThanOneError (schema) { + return newException('ETOOMANYERRORTYPES', + 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') +} + +function newException (code, msg) { + var e = new Error(msg) + e.code = code + if (Error.captureStackTrace) Error.captureStackTrace(e, validate) + return e +} diff --git a/public/node_modules/_aproba@1.2.0@aproba/package.json b/public/node_modules/_aproba@1.2.0@aproba/package.json new file mode 100644 index 000000000..5504c552d --- /dev/null +++ b/public/node_modules/_aproba@1.2.0@aproba/package.json @@ -0,0 +1,37 @@ +{ + "name": "aproba", + "version": "1.2.0", + "description": "A ridiculously light-weight argument validator (now browser friendly)", + "main": "index.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "standard": "^10.0.3", + "tap": "^10.0.2" + }, + "files": [ + "index.js" + ], + "scripts": { + "test": "standard && tap -j3 test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/iarna/aproba" + }, + "keywords": [ + "argument", + "validate" + ], + "author": "Rebecca Turner ", + "license": "ISC", + "bugs": { + "url": "https://github.com/iarna/aproba/issues" + }, + "homepage": "https://github.com/iarna/aproba", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "aproba@1.2.0", + "_resolved": "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_balanced-match@1.0.0@balanced-match/.npmignore b/public/node_modules/_balanced-match@1.0.0@balanced-match/.npmignore new file mode 100644 index 000000000..ae5d8c36a --- /dev/null +++ b/public/node_modules/_balanced-match@1.0.0@balanced-match/.npmignore @@ -0,0 +1,5 @@ +test +.gitignore +.travis.yml +Makefile +example.js diff --git a/public/node_modules/_balanced-match@1.0.0@balanced-match/LICENSE.md b/public/node_modules/_balanced-match@1.0.0@balanced-match/LICENSE.md new file mode 100644 index 000000000..2cdc8e414 --- /dev/null +++ b/public/node_modules/_balanced-match@1.0.0@balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/public/node_modules/_balanced-match@1.0.0@balanced-match/README.md b/public/node_modules/_balanced-match@1.0.0@balanced-match/README.md new file mode 100644 index 000000000..08e918c0d --- /dev/null +++ b/public/node_modules/_balanced-match@1.0.0@balanced-match/README.md @@ -0,0 +1,91 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/public/node_modules/_balanced-match@1.0.0@balanced-match/index.js b/public/node_modules/_balanced-match@1.0.0@balanced-match/index.js new file mode 100644 index 000000000..1685a7629 --- /dev/null +++ b/public/node_modules/_balanced-match@1.0.0@balanced-match/index.js @@ -0,0 +1,59 @@ +'use strict'; +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/public/node_modules/_balanced-match@1.0.0@balanced-match/package.json b/public/node_modules/_balanced-match@1.0.0@balanced-match/package.json new file mode 100644 index 000000000..f87e7a4cd --- /dev/null +++ b/public/node_modules/_balanced-match@1.0.0@balanced-match/package.json @@ -0,0 +1,52 @@ +{ + "name": "balanced-match", + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "version": "1.0.0", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "main": "index.js", + "scripts": { + "test": "make test", + "bench": "make bench" + }, + "dependencies": {}, + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "balanced-match@1.0.0", + "_resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_brace-expansion@1.1.11@brace-expansion/LICENSE b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/LICENSE new file mode 100644 index 000000000..de3226673 --- /dev/null +++ b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +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/public/node_modules/_brace-expansion@1.1.11@brace-expansion/README.md b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/README.md new file mode 100644 index 000000000..6b4e0e164 --- /dev/null +++ b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/README.md @@ -0,0 +1,129 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/public/node_modules/_brace-expansion@1.1.11@brace-expansion/index.js b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/index.js new file mode 100644 index 000000000..0478be81e --- /dev/null +++ b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/public/node_modules/_brace-expansion@1.1.11@brace-expansion/node_modules/balanced-match b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/node_modules/balanced-match new file mode 120000 index 000000000..3e43756fb --- /dev/null +++ b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/node_modules/balanced-match @@ -0,0 +1 @@ +../../_balanced-match@1.0.0@balanced-match \ No newline at end of file diff --git a/public/node_modules/_brace-expansion@1.1.11@brace-expansion/node_modules/concat-map b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/node_modules/concat-map new file mode 120000 index 000000000..5a80a2679 --- /dev/null +++ b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/node_modules/concat-map @@ -0,0 +1 @@ +../../_concat-map@0.0.1@concat-map \ No newline at end of file diff --git a/public/node_modules/_brace-expansion@1.1.11@brace-expansion/package.json b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/package.json new file mode 100644 index 000000000..0dbc4c069 --- /dev/null +++ b/public/node_modules/_brace-expansion@1.1.11@brace-expansion/package.json @@ -0,0 +1,50 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "1.1.11", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh", + "bench": "matcha test/perf/bench.js" + }, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "brace-expansion@1.1.11", + "_resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_buffer-from@1.1.1@buffer-from/LICENSE b/public/node_modules/_buffer-from@1.1.1@buffer-from/LICENSE new file mode 100644 index 000000000..e4bf1d69b --- /dev/null +++ b/public/node_modules/_buffer-from@1.1.1@buffer-from/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016, 2018 Linus Unnebäck + +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/public/node_modules/_buffer-from@1.1.1@buffer-from/index.js b/public/node_modules/_buffer-from@1.1.1@buffer-from/index.js new file mode 100644 index 000000000..d92a83d01 --- /dev/null +++ b/public/node_modules/_buffer-from@1.1.1@buffer-from/index.js @@ -0,0 +1,69 @@ +var toString = Object.prototype.toString + +var isModern = ( + typeof Buffer.alloc === 'function' && + typeof Buffer.allocUnsafe === 'function' && + typeof Buffer.from === 'function' +) + +function isArrayBuffer (input) { + return toString.call(input).slice(8, -1) === 'ArrayBuffer' +} + +function fromArrayBuffer (obj, byteOffset, length) { + byteOffset >>>= 0 + + var maxLength = obj.byteLength - byteOffset + + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } + + if (length === undefined) { + length = maxLength + } else { + length >>>= 0 + + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") + } + } + + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} + +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return isModern + ? Buffer.from(value) + : new Buffer(value) +} + +module.exports = bufferFrom diff --git a/public/node_modules/_buffer-from@1.1.1@buffer-from/package.json b/public/node_modules/_buffer-from@1.1.1@buffer-from/package.json new file mode 100644 index 000000000..a020d6622 --- /dev/null +++ b/public/node_modules/_buffer-from@1.1.1@buffer-from/package.json @@ -0,0 +1,22 @@ +{ + "name": "buffer-from", + "version": "1.1.1", + "license": "MIT", + "repository": "LinusU/buffer-from", + "files": [ + "index.js" + ], + "scripts": { + "test": "standard && node test" + }, + "devDependencies": { + "standard": "^7.1.2" + }, + "keywords": [ + "buffer", + "buffer from" + ], + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "buffer-from@1.1.1", + "_resolved": "https://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_buffer-from@1.1.1@buffer-from/readme.md b/public/node_modules/_buffer-from@1.1.1@buffer-from/readme.md new file mode 100644 index 000000000..9880a558a --- /dev/null +++ b/public/node_modules/_buffer-from@1.1.1@buffer-from/readme.md @@ -0,0 +1,69 @@ +# Buffer From + +A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available. + +## Installation + +```sh +npm install --save buffer-from +``` + +## Usage + +```js +const bufferFrom = require('buffer-from') + +console.log(bufferFrom([1, 2, 3, 4])) +//=> + +const arr = new Uint8Array([1, 2, 3, 4]) +console.log(bufferFrom(arr.buffer, 1, 2)) +//=> + +console.log(bufferFrom('test', 'utf8')) +//=> + +const buf = bufferFrom('test') +console.log(bufferFrom(buf)) +//=> +``` + +## API + +### bufferFrom(array) + +- `array` <Array> + +Allocates a new `Buffer` using an `array` of octets. + +### bufferFrom(arrayBuffer[, byteOffset[, length]]) + +- `arrayBuffer` <ArrayBuffer> The `.buffer` property of a TypedArray or ArrayBuffer +- `byteOffset` <Integer> Where to start copying from `arrayBuffer`. **Default:** `0` +- `length` <Integer> How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a TypedArray instance, the +newly created `Buffer` will share the same allocated memory as the TypedArray. + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +### bufferFrom(buffer) + +- `buffer` <Buffer> An existing `Buffer` to copy data from + +Copies the passed `buffer` data onto a new `Buffer` instance. + +### bufferFrom(string[, encoding]) + +- `string` <String> A string to encode. +- `encoding` <String> The encoding of `string`. **Default:** `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `string`. If +provided, the `encoding` parameter identifies the character encoding of +`string`. + +## See also + +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` diff --git a/public/node_modules/_cacache@13.0.1@cacache/CHANGELOG.md b/public/node_modules/_cacache@13.0.1@cacache/CHANGELOG.md new file mode 100644 index 000000000..08db375c2 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/CHANGELOG.md @@ -0,0 +1,747 @@ +# Changelog + +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. + +### [13.0.1](https://github.com/npm/cacache/compare/v13.0.0...v13.0.1) (2019-09-30) + + +### Bug Fixes + +* **fix-owner:** chownr.sync quits on non-root uid ([08801be](https://github.com/npm/cacache/commit/08801be)) + +## [13.0.0](https://github.com/npm/cacache/compare/v12.0.3...v13.0.0) (2019-09-25) + + +### ⚠ BREAKING CHANGES + +* This subtly changes the streaming interface of +everything in cacache that streams, which is, well, everything in +cacache. Most users will probably not notice, but any code that +depended on stream behavior always being deferred until next tick will +need to adjust. + +The mississippi methods 'to', 'from', 'through', and so on, have been +replaced with their Minipass counterparts, and streaming interaction +with the file system is done via fs-minipass. + +The following modules are of interest here: + +- [minipass](http://npm.im/minipass) The core stream library. + +- [fs-minipass](http://npm.im/fs-minipass) Note that the 'WriteStream' + class from fs-minipass is _not_ a Minipass stream, but rather a plain + old EventEmitter that duck types as a Writable. + +- [minipass-collect](http://npm.im/minipass-collect) Gather up all the + data from a stream. Cacache only uses Collect.PassThrough, which is a + basic Minipass passthrough stream which emits a 'collect' event with + the completed data just before the 'end' event. + +- [minipass-pipeline](http://npm.im/minipass-pipeline) Connect one or + more streams into a pipe chain. Errors anywhere in the pipeline are + proxied down the chain and then up to the Pipeline object itself. + Writes go into the head, reads go to the tail. Used in place of + pump() and pumpify(). + +- [minipass-flush](http://npm.im/minipass-flush) A Minipass passthrough + stream that defers its 'end' event until after a flush() method has + completed (either calling the supplied callback, or returning a + promise.) Use in place of flush-write-stream (aka mississippi.to). + +Streams from through2, concat-stream, and the behavior provided by +end-of-stream are all implemented in Minipass itself. + +Features of interest to cacache, which make Minipass a particularly good +fit: + +- All of the 'endish' events are normalized, so we can just listen on + 'end' and know that finish, prefinish, and close will be handled as + well. +- Minipass doesn't waste time [containing + zalgo](https://blog.izs.me/2013/08/designing-apis-for-asynchrony). +- Minipass has built-in support for promises that indicate the end or + error: stream.promise(), stream.collect(), and stream.concat(). +- With reliable and consistent timing guarantees, much less + error-checking logic is required. We can be more confident that an + error is being thrown or emitted in the correct place, rather than in + a callback which is deferred, resulting in a hung promise or + uncaughtException. + +The biggest downside of Minipass is that it lacks some of the internal +characteristics of node-core streams, which many community modules use +to identify streams. They have no _writableState or _readableState +objects, or _read or _write methods. As a result, the is-stream module +(at least, at the time of this commit) doesn't recognize Minipass +streams as readable or writable streams. + +All in all, the changes required of downstream users should be minimal, +but are unlikely to be zero. Hence the semver major change. + +### Features + +* replace all streams with Minipass streams ([f4c0962](https://github.com/npm/cacache/commit/f4c0962)) +* **deps:** Add minipass and minipass-pipeline ([a6545a9](https://github.com/npm/cacache/commit/a6545a9)) +* **promise:** converted .resolve to native promise, converted .map and .reduce to native ([220c56d](https://github.com/npm/cacache/commit/220c56d)) +* **promise:** individually promisifing functions as needed ([74b939e](https://github.com/npm/cacache/commit/74b939e)) +* **promise:** moved .reject from bluebird to native promise ([1d56da1](https://github.com/npm/cacache/commit/1d56da1)) +* **promise:** removed .fromNode, removed .join ([9c457a0](https://github.com/npm/cacache/commit/9c457a0)) +* **promise:** removed .map, replaced with p-map. removed .try ([cc3ee05](https://github.com/npm/cacache/commit/cc3ee05)) +* **promise:** removed .tap ([0260f12](https://github.com/npm/cacache/commit/0260f12)) +* **promise:** removed .using/.disposer ([5d832f3](https://github.com/npm/cacache/commit/5d832f3)) +* **promise:** removed bluebird ([c21298c](https://github.com/npm/cacache/commit/c21298c)) +* **promise:** removed bluebird specific .catch calls ([28aeeac](https://github.com/npm/cacache/commit/28aeeac)) +* **promise:** replaced .reduce and .mapSeries ([478f5cb](https://github.com/npm/cacache/commit/478f5cb)) + +### [12.0.3](https://github.com/npm/cacache/compare/v12.0.2...v12.0.3) (2019-08-19) + + +### Bug Fixes + +* do not chown if not running as root ([2d80af9](https://github.com/npm/cacache/commit/2d80af9)) + + + +### [12.0.2](https://github.com/npm/cacache/compare/v12.0.1...v12.0.2) (2019-07-19) + + + +### [12.0.1](https://github.com/npm/cacache/compare/v12.0.0...v12.0.1) (2019-07-19) + +* **deps** Abstracted out `lib/util/infer-owner.js` to + [@npmcli/infer-owner](https://www.npmjs.com/package/@npmcli/infer-owner) + so that it could be more easily used in other parts of the npm CLI. + + +## [12.0.0](https://github.com/npm/cacache/compare/v11.3.3...v12.0.0) (2019-07-15) + + +### Features + +* infer uid/gid instead of accepting as options ([ac84d14](https://github.com/npm/cacache/commit/ac84d14)) +* **i18n:** add another error message ([676cb32](https://github.com/npm/cacache/commit/676cb32)) + + +### BREAKING CHANGES + +* the uid gid options are no longer respected or +necessary. As of this change, cacache will always match the cache +contents to the ownership of the cache directory (or its parent +directory), regardless of what the caller passes in. + +Reasoning: + +The number one reason to use a uid or gid option was to keep root-owned +files from causing problems in the cache. In npm's case, this meant +that CLI's ./lib/command.js had to work out the appropriate uid and gid, +then pass it to the libnpmcommand module, which had to in turn pass the +uid and gid to npm-registry-fetch, which then passed it to +make-fetch-happen, which passed it to cacache. (For package fetching, +pacote would be in that mix as well.) + +Added to that, `cacache.rm()` will actually _write_ a file into the +cache index, but has no way to accept an option so that its call to +entry-index.js will write the index with the appropriate uid/gid. +Little ownership bugs were all over the place, and tricky to trace +through. (Why should make-fetch-happen even care about accepting or +passing uids and gids? It's an http library.) + +This change allows us to keep the cache from having mixed ownership in +any situation. + +Of course, this _does_ mean that if you have a root-owned but +user-writable folder (for example, `/tmp`), then the cache will try to +chown everything to root. + +The solution is for the user to create a folder, make it user-owned, and +use that, rather than relying on cacache to create the root cache folder. + +If we decide to restore the uid/gid opts, and use ownership inference +only when uid/gid are unset, then take care to also make rm take an +option object, and pass it through to entry-index.js. + + + +### [11.3.3](https://github.com/npm/cacache/compare/v11.3.2...v11.3.3) (2019-06-17) + + +### Bug Fixes + +* **audit:** npm audit fix ([200a6d5](https://github.com/npm/cacache/commit/200a6d5)) +* **config:** Add ssri config 'error' option ([#146](https://github.com/npm/cacache/issues/146)) ([47de8f5](https://github.com/npm/cacache/commit/47de8f5)) +* **deps:** npm audit fix ([481a7dc](https://github.com/npm/cacache/commit/481a7dc)) +* **standard:** standard --fix ([7799149](https://github.com/npm/cacache/commit/7799149)) +* **write:** avoid another cb never called situation ([5156561](https://github.com/npm/cacache/commit/5156561)) + + + + +## [11.3.2](https://github.com/npm/cacache/compare/v11.3.1...v11.3.2) (2018-12-21) + + +### Bug Fixes + +* **get:** make sure to handle errors in the .then ([b10bcd0](https://github.com/npm/cacache/commit/b10bcd0)) + + + + +## [11.3.1](https://github.com/npm/cacache/compare/v11.3.0...v11.3.1) (2018-11-05) + + +### Bug Fixes + +* **get:** export hasContent.sync properly ([d76c920](https://github.com/npm/cacache/commit/d76c920)) + + + + +# [11.3.0](https://github.com/npm/cacache/compare/v11.2.0...v11.3.0) (2018-11-05) + + +### Features + +* **get:** add sync API for reading ([db1e094](https://github.com/npm/cacache/commit/db1e094)) + + + + +# [11.2.0](https://github.com/npm/cacache/compare/v11.1.0...v11.2.0) (2018-08-08) + + +### Features + +* **read:** add sync support to other internal read.js fns ([fe638b6](https://github.com/npm/cacache/commit/fe638b6)) + + + + +# [11.1.0](https://github.com/npm/cacache/compare/v11.0.3...v11.1.0) (2018-08-01) + + +### Features + +* **read:** add sync support for low-level content read ([b43af83](https://github.com/npm/cacache/commit/b43af83)) + + + + +## [11.0.3](https://github.com/npm/cacache/compare/v11.0.2...v11.0.3) (2018-08-01) + + +### Bug Fixes + +* **config:** add ssri config options ([#136](https://github.com/npm/cacache/issues/136)) ([10d5d9a](https://github.com/npm/cacache/commit/10d5d9a)) +* **perf:** refactor content.read to avoid lstats ([c5ac10e](https://github.com/npm/cacache/commit/c5ac10e)) +* **test:** oops when removing safe-buffer ([1950490](https://github.com/npm/cacache/commit/1950490)) + + + + +## [11.0.2](https://github.com/npm/cacache/compare/v11.0.1...v11.0.2) (2018-05-07) + + +### Bug Fixes + +* **verify:** size param no longer lost in a verify ([#131](https://github.com/npm/cacache/issues/131)) ([c614a19](https://github.com/npm/cacache/commit/c614a19)), closes [#130](https://github.com/npm/cacache/issues/130) + + + + +## [11.0.1](https://github.com/npm/cacache/compare/v11.0.0...v11.0.1) (2018-04-10) + + + + +# [11.0.0](https://github.com/npm/cacache/compare/v10.0.4...v11.0.0) (2018-04-09) + + +### Features + +* **opts:** use figgy-pudding for opts ([#128](https://github.com/npm/cacache/issues/128)) ([33d4eed](https://github.com/npm/cacache/commit/33d4eed)) + + +### meta + +* drop support for node@4 ([529f347](https://github.com/npm/cacache/commit/529f347)) + + +### BREAKING CHANGES + +* node@4 is no longer supported + + + + +## [10.0.4](https://github.com/npm/cacache/compare/v10.0.3...v10.0.4) (2018-02-16) + + + + +## [10.0.3](https://github.com/npm/cacache/compare/v10.0.2...v10.0.3) (2018-02-16) + + +### Bug Fixes + +* **content:** rethrow aggregate errors as ENOENT ([fa918f5](https://github.com/npm/cacache/commit/fa918f5)) + + + + +## [10.0.2](https://github.com/npm/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/npm/cacache/commit/347dc36)) + + + + +## [10.0.1](https://github.com/npm/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/npm/cacache/commit/073fbe1)) + + + + +# [10.0.0](https://github.com/npm/cacache/compare/v9.3.0...v10.0.0) (2017-10-23) + + +### Features + +* **license:** relicense to ISC (#111) ([fdbb4e5](https://github.com/npm/cacache/commit/fdbb4e5)) + + +### Performance Improvements + +* more copyFile benchmarks ([63787bb](https://github.com/npm/cacache/commit/63787bb)) + + +### BREAKING CHANGES + +* **license:** the license has been changed from CC0-1.0 to ISC. + + + + +# [9.3.0](https://github.com/npm/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/npm/cacache/commit/067b5f6)) + + + + +## [9.2.9](https://github.com/npm/cacache/compare/v9.2.8...v9.2.9) (2017-06-17) + + + + +## [9.2.8](https://github.com/npm/cacache/compare/v9.2.7...v9.2.8) (2017-06-05) + + +### Bug Fixes + +* **ssri:** bump ssri for bugfix ([c3232ea](https://github.com/npm/cacache/commit/c3232ea)) + + + + +## [9.2.7](https://github.com/npm/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/npm/cacache/commit/4131196)) + + + + +## [9.2.6](https://github.com/npm/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/npm/cacache/commit/5209ffe)) + + + + +## [9.2.5](https://github.com/npm/cacache/compare/v9.2.4...v9.2.5) (2017-05-25) + + +### Bug Fixes + +* **deps:** fix lockfile issues and bump ssri ([84e1d7e](https://github.com/npm/cacache/commit/84e1d7e)) + + + + +## [9.2.4](https://github.com/npm/cacache/compare/v9.2.3...v9.2.4) (2017-05-24) + + +### Bug Fixes + +* **deps:** bumping deps ([bbccb12](https://github.com/npm/cacache/commit/bbccb12)) + + + + +## [9.2.3](https://github.com/npm/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/npm/cacache/commit/ac90bc0)) + + + + +## [9.2.2](https://github.com/npm/cacache/compare/v9.2.1...v9.2.2) (2017-05-14) + + +### Bug Fixes + +* **i18n:** lets pretend this didn't happen ([519b4ee](https://github.com/npm/cacache/commit/519b4ee)) + + + + +## [9.2.1](https://github.com/npm/cacache/compare/v9.2.0...v9.2.1) (2017-05-14) + + +### Bug Fixes + +* **docs:** fixing translation messup ([bb9e4f9](https://github.com/npm/cacache/commit/bb9e4f9)) + + + + +# [9.2.0](https://github.com/npm/cacache/compare/v9.1.0...v9.2.0) (2017-05-14) + + +### Features + +* **i18n:** add Spanish translation for API ([531f9a4](https://github.com/npm/cacache/commit/531f9a4)) + + + + +# [9.1.0](https://github.com/npm/cacache/compare/v9.0.0...v9.1.0) (2017-05-14) + + +### Features + +* **i18n:** Add Spanish translation and i18n setup (#91) ([323b90c](https://github.com/npm/cacache/commit/323b90c)) + + + + +# [9.0.0](https://github.com/npm/cacache/compare/v8.0.0...v9.0.0) (2017-04-28) + + +### Bug Fixes + +* **memoization:** actually use the LRU ([0e55dc9](https://github.com/npm/cacache/commit/0e55dc9)) + + +### Features + +* **memoization:** memoizers can be injected through opts.memoize (#90) ([e5614c7](https://github.com/npm/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. + + + + +# [8.0.0](https://github.com/npm/cacache/compare/v7.1.0...v8.0.0) (2017-04-22) + + +### Features + +* **read:** change hasContent to return {sri, size} (#88) ([bad6c49](https://github.com/npm/cacache/commit/bad6c49)), closes [#87](https://github.com/npm/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. + + + + +# [7.1.0](https://github.com/npm/cacache/compare/v7.0.5...v7.1.0) (2017-04-20) + + +### Features + +* **size:** handle content size info (#49) ([91230af](https://github.com/npm/cacache/commit/91230af)) + + + + +## [7.0.5](https://github.com/npm/cacache/compare/v7.0.4...v7.0.5) (2017-04-18) + + +### Bug Fixes + +* **integrity:** new ssri with fixed integrity stream ([6d13e8e](https://github.com/npm/cacache/commit/6d13e8e)) +* **write:** wrap stuff in promises to improve errors ([3624fc5](https://github.com/npm/cacache/commit/3624fc5)) + + + + +## [7.0.4](https://github.com/npm/cacache/compare/v7.0.3...v7.0.4) (2017-04-15) + + +### Bug Fixes + +* **fix-owner:** throw away ENOENTs on chownr ([d49bbcd](https://github.com/npm/cacache/commit/d49bbcd)) + + + + +## [7.0.3](https://github.com/npm/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/npm/cacache/commit/9d4f0a5)) + + + + +## [7.0.2](https://github.com/npm/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/npm/cacache/commit/8dc2e62)) + + + + +## [7.0.1](https://github.com/npm/cacache/compare/v7.0.0...v7.0.1) (2017-04-03) + + +### Bug Fixes + +* **docs:** fix header name conflict in readme ([afcd456](https://github.com/npm/cacache/commit/afcd456)) + + + + +# [7.0.0](https://github.com/npm/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/npm/cacache/commit/d2e9b6a)) + + +### Features + +* **integrity:** subresource integrity support (#78) ([b1e731f](https://github.com/npm/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: '-', + path: ContentPath, + time: Date, + 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. + + + + +# [6.3.0](https://github.com/npm/cacache/compare/v6.2.0...v6.3.0) (2017-04-01) + + +### Bug Fixes + +* **fixOwner:** ignore EEXIST race condition from mkdirp ([4670e9b](https://github.com/npm/cacache/commit/4670e9b)) +* **index:** ignore index removal races when inserting ([b9d2fa2](https://github.com/npm/cacache/commit/b9d2fa2)) +* **memo:** use lru-cache for better mem management (#75) ([d8ac5aa](https://github.com/npm/cacache/commit/d8ac5aa)) + + +### Features + +* **dependencies:** Switch to move-concurrently (#77) ([dc6482d](https://github.com/npm/cacache/commit/dc6482d)) + + + + +# [6.2.0](https://github.com/npm/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/npm/cacache/commit/f8e0f25)) +* **verify:** return fixOwner.chownr promise ([6818521](https://github.com/npm/cacache/commit/6818521)) + + +### Features + +* **tmp:** safe tmp dir creation/management util (#73) ([c42da71](https://github.com/npm/cacache/commit/c42da71)) + + + + +## [6.1.2](https://github.com/npm/cacache/compare/v6.1.1...v6.1.2) (2017-03-13) + + +### Bug Fixes + +* **index:** set default hashAlgorithm ([d6eb2f0](https://github.com/npm/cacache/commit/d6eb2f0)) + + + + +## [6.1.1](https://github.com/npm/cacache/compare/v6.1.0...v6.1.1) (2017-03-13) + + +### Bug Fixes + +* **coverage:** bumping coverage for verify (#71) ([0b7faf6](https://github.com/npm/cacache/commit/0b7faf6)) +* **deps:** glob should have been a regular dep :< ([0640bc4](https://github.com/npm/cacache/commit/0640bc4)) + + + + +# [6.1.0](https://github.com/npm/cacache/compare/v6.0.2...v6.1.0) (2017-03-12) + + +### Bug Fixes + +* **coverage:** more coverage for content reads (#70) ([ef4f70a](https://github.com/npm/cacache/commit/ef4f70a)) +* **tests:** use safe-buffer because omfg (#69) ([6ab8132](https://github.com/npm/cacache/commit/6ab8132)) + + +### Features + +* **rm:** limited rm.all and fixed bugs (#66) ([d5d25ba](https://github.com/npm/cacache/commit/d5d25ba)), closes [#66](https://github.com/npm/cacache/issues/66) +* **verify:** tested, working cache verifier/gc (#68) ([45ad77a](https://github.com/npm/cacache/commit/45ad77a)) + + + + +## [6.0.2](https://github.com/npm/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/npm/cacache/commit/c3644e5)) + + + + +## [6.0.1](https://github.com/npm/cacache/compare/v6.0.0...v6.0.1) (2017-03-05) + + +### Bug Fixes + +* **docs:** Missed spots in README ([8ffb7fa](https://github.com/npm/cacache/commit/8ffb7fa)) + + + + +# [6.0.0](https://github.com/npm/cacache/compare/v5.0.3...v6.0.0) (2017-03-05) + + +### Bug Fixes + +* **api:** keep memo cache mostly-internal ([2f72d0a](https://github.com/npm/cacache/commit/2f72d0a)) +* **content:** use the rest of the string, not the whole string ([fa8f3c3](https://github.com/npm/cacache/commit/fa8f3c3)) +* **deps:** removed `format-number@2.0.2` ([1187791](https://github.com/npm/cacache/commit/1187791)) +* **deps:** removed inflight@1.0.6 ([0d1819c](https://github.com/npm/cacache/commit/0d1819c)) +* **deps:** rimraf@2.6.1 ([9efab6b](https://github.com/npm/cacache/commit/9efab6b)) +* **deps:** standard@9.0.0 ([4202cba](https://github.com/npm/cacache/commit/4202cba)) +* **deps:** tap@10.3.0 ([aa03088](https://github.com/npm/cacache/commit/aa03088)) +* **deps:** weallcontribute@1.0.8 ([ad4f4dc](https://github.com/npm/cacache/commit/ad4f4dc)) +* **docs:** add security note to hashKey ([03f81ba](https://github.com/npm/cacache/commit/03f81ba)) +* **hashes:** change default hashAlgorithm to sha512 ([ea00ba6](https://github.com/npm/cacache/commit/ea00ba6)) +* **hashes:** missed a spot for hashAlgorithm defaults ([45997d8](https://github.com/npm/cacache/commit/45997d8)) +* **index:** add length header before JSON for verification ([fb8cb4d](https://github.com/npm/cacache/commit/fb8cb4d)) +* **index:** change index filenames to sha1s of keys ([bbc5fca](https://github.com/npm/cacache/commit/bbc5fca)) +* **index:** who cares about race conditions anyway ([b1d3888](https://github.com/npm/cacache/commit/b1d3888)) +* **perf:** bulk-read get+read for massive speed ([d26cdf9](https://github.com/npm/cacache/commit/d26cdf9)) +* **perf:** use bulk file reads for index reads ([79a8891](https://github.com/npm/cacache/commit/79a8891)) +* **put-stream:** remove tmp file on stream insert error ([65f6632](https://github.com/npm/cacache/commit/65f6632)) +* **put-stream:** robustified and predictibilized ([daf9e08](https://github.com/npm/cacache/commit/daf9e08)) +* **put-stream:** use new promise API for moves ([1d36013](https://github.com/npm/cacache/commit/1d36013)) +* **readme:** updated to reflect new default hashAlgo ([c60a2fa](https://github.com/npm/cacache/commit/c60a2fa)) +* **verify:** tiny typo fix ([db22d05](https://github.com/npm/cacache/commit/db22d05)) + + +### Features + +* **api:** converted external api ([7bf032f](https://github.com/npm/cacache/commit/7bf032f)) +* **cacache:** exported clearMemoized() utility ([8d2c5b6](https://github.com/npm/cacache/commit/8d2c5b6)) +* **cache:** add versioning to content and index ([31bc549](https://github.com/npm/cacache/commit/31bc549)) +* **content:** collate content files into subdirs ([c094d9f](https://github.com/npm/cacache/commit/c094d9f)) +* **deps:** `@npmcorp/move@1.0.0` ([bdd00bf](https://github.com/npm/cacache/commit/bdd00bf)) +* **deps:** `bluebird@3.4.7` ([3a17aff](https://github.com/npm/cacache/commit/3a17aff)) +* **deps:** `promise-inflight@1.0.1` ([a004fe6](https://github.com/npm/cacache/commit/a004fe6)) +* **get:** added memoization support for get ([c77d794](https://github.com/npm/cacache/commit/c77d794)) +* **get:** export hasContent ([2956ec3](https://github.com/npm/cacache/commit/2956ec3)) +* **index:** add hashAlgorithm and format insert ret val ([b639746](https://github.com/npm/cacache/commit/b639746)) +* **index:** collate index files into subdirs ([e8402a5](https://github.com/npm/cacache/commit/e8402a5)) +* **index:** promisify entry index ([cda3335](https://github.com/npm/cacache/commit/cda3335)) +* **memo:** added memoization lib ([da07b92](https://github.com/npm/cacache/commit/da07b92)) +* **memo:** export memoization api ([954b1b3](https://github.com/npm/cacache/commit/954b1b3)) +* **move-file:** add move fallback for weird errors ([5cf4616](https://github.com/npm/cacache/commit/5cf4616)) +* **perf:** bulk content write api ([51b536e](https://github.com/npm/cacache/commit/51b536e)) +* **put:** added memoization support to put ([b613a70](https://github.com/npm/cacache/commit/b613a70)) +* **read:** switched to promises ([a869362](https://github.com/npm/cacache/commit/a869362)) +* **rm:** added memoization support to rm ([4205cf0](https://github.com/npm/cacache/commit/4205cf0)) +* **rm:** switched to promises ([a000d24](https://github.com/npm/cacache/commit/a000d24)) +* **util:** promise-inflight ownership fix requests ([9517cd7](https://github.com/npm/cacache/commit/9517cd7)) +* **util:** use promises for api ([ae204bb](https://github.com/npm/cacache/commit/ae204bb)) +* **verify:** converted to Promises ([f0b3974](https://github.com/npm/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/public/node_modules/_cacache@13.0.1@cacache/LICENSE.md b/public/node_modules/_cacache@13.0.1@cacache/LICENSE.md new file mode 100644 index 000000000..8d28acf86 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/LICENSE.md @@ -0,0 +1,16 @@ +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/public/node_modules/_cacache@13.0.1@cacache/README.md b/public/node_modules/_cacache@13.0.1@cacache/README.md new file mode 100644 index 000000000..de3a92e12 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/README.md @@ -0,0 +1,617 @@ +# 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/npm/cacache.svg)](https://travis-ci.org/npm/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/cacache?svg=true)](https://ci.appveyor.com/project/npm/cacache) [![Coverage Status](https://coveralls.io/repos/github/npm/cacache/badge.svg?branch=latest)](https://coveralls.io/github/npm/cacache?branch=latest) + +[`cacache`](https://github.com/npm/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. + +On systems that support user and group settings on files, cacache will +match the `uid` and `gid` values to the folder where the cache lives, even +when running as `root`. + +It was 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 + * [`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') +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 + +#### `> cacache.ls(cache) -> Promise` + +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 + } +} +``` + +#### `> 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 +} + +{ + ... +} +``` + +#### `> 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 +`-`. + +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#, + size: 9320 +} + +// Look up by digest +cache.get.byDigest(cachePath, 'sha512-BaSe64HaSh').then(console.log) +// Output: +Buffer# +``` + +#### `> 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') +) +``` + +#### `> 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 where content is stored, joined with `cache` argument. +* `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' + } +} +``` + +#### `> 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 +``` + +#### `> 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) +}) +``` + +#### `> 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}`)) +) +``` + +#### `> 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.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. + +#### `> 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 😱') +}) +``` + +#### `> 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') +}) +``` + +#### `> 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!') +}) +``` + +#### `> cacache.clearMemoized()` + +Completely resets the in-memory entry cache. + +#### `> tmp.mkdir(cache, opts) -> Promise` + +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 given the appropriate `gid`/`uid` ownership settings to match +the rest of the cache. 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>, ...) +}) +``` + +#### `> tmp.fix(cache) -> Promise` + +Sets the `uid` and `gid` properties on all files and folders within the tmp +folder to match the rest of the cache. + +Use this after manually writing files into [`tmp.mkdir`](#tmp-mkdir) or +[`tmp.withTmp`](#with-tmp). + +##### Example + +```javascript +cacache.tmp.mkdir(cache).then(dir => { + writeFile(path.join(dir, 'file'), someData).then(() => { + // make sure we didn't just put a root-owned file in the cache + cacache.tmp.fix().then(() => { + // all uids and gids match now + }) + }) +}) +``` + +#### `> 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, 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 +}) +``` + +#### 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 `-`. + +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. + +#### `> 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.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) +}) +``` + +#### `> 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/public/node_modules/_cacache@13.0.1@cacache/get.js b/public/node_modules/_cacache@13.0.1@cacache/get.js new file mode 100644 index 000000000..638d40137 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/get.js @@ -0,0 +1,266 @@ +'use strict' + +const util = require('util') + +const figgyPudding = require('figgy-pudding') +const fs = require('fs') +const index = require('./lib/entry-index') +const memo = require('./lib/memoization') +const read = require('./lib/content/read') + +const Minipass = require('minipass') +const Collect = require('minipass-collect') +const Pipeline = require('minipass-pipeline') + +const writeFile = util.promisify(fs.writeFile) + +const GetOpts = figgyPudding({ + integrity: {}, + memoize: {}, + size: {} +}) + +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 = GetOpts(opts) + const memoized = byDigest + ? memo.get.byDigest(cache, key, opts) + : memo.get(cache, key, opts) + if (memoized && opts.memoize !== false) { + return Promise.resolve( + byDigest + ? memoized + : { + metadata: memoized.entry.metadata, + data: memoized.data, + integrity: memoized.entry.integrity, + size: memoized.entry.size + } + ) + } + return (byDigest ? Promise.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.sync = function get (cache, key, opts) { + return getDataSync(false, cache, key, opts) +} +module.exports.sync.byDigest = function getByDigest (cache, digest, opts) { + return getDataSync(true, cache, digest, opts) +} + +function getDataSync (byDigest, cache, key, opts) { + opts = GetOpts(opts) + const memoized = byDigest + ? memo.get.byDigest(cache, key, opts) + : memo.get(cache, key, opts) + if (memoized && opts.memoize !== false) { + return byDigest + ? memoized + : { + metadata: memoized.entry.metadata, + data: memoized.data, + integrity: memoized.entry.integrity, + size: memoized.entry.size + } + } + const entry = !byDigest && index.find.sync(cache, key, opts) + if (!entry && !byDigest) { + throw new index.NotFoundError(cache, key) + } + const data = read.sync(cache, byDigest ? key : entry.integrity, { + integrity: opts.integrity, + size: opts.size + }) + const res = byDigest + ? data + : { + metadata: entry.metadata, + data: data, + size: entry.size, + integrity: entry.integrity + } + 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 + +const getMemoizedStream = (memoized) => { + const stream = new Minipass() + 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.end(memoized.data) + return stream +} + +function getStream (cache, key, opts) { + opts = GetOpts(opts) + const memoized = memo.get(cache, key, opts) + if (memoized && opts.memoize !== false) { + return getMemoizedStream(memoized) + } + + const stream = new Pipeline() + index + .find(cache, key) + .then((entry) => { + if (!entry) { + throw new index.NotFoundError(cache, key) + } + 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) + }) + + const src = read.readStream( + cache, + entry.integrity, + opts.concat({ + size: opts.size == null ? entry.size : opts.size + }) + ) + + if (opts.memoize) { + const memoStream = new Collect.PassThrough() + memoStream.on('collect', data => memo.put(cache, entry, data, opts)) + stream.unshift(memoStream) + } + stream.unshift(src) + }) + .catch((err) => stream.emit('error', err)) + + return stream +} + +module.exports.stream.byDigest = getStreamDigest + +function getStreamDigest (cache, integrity, opts) { + opts = GetOpts(opts) + const memoized = memo.get.byDigest(cache, integrity, opts) + if (memoized && opts.memoize !== false) { + const stream = new Minipass() + stream.end(memoized) + return stream + } else { + const stream = read.readStream(cache, integrity, opts) + if (!opts.memoize) { + return stream + } + const memoStream = new Collect.PassThrough() + memoStream.on('collect', data => memo.put.byDigest( + cache, + integrity, + data, + opts + )) + return new Pipeline(stream, memoStream) + } +} + +module.exports.info = info + +function info (cache, key, opts) { + opts = GetOpts(opts) + const memoized = memo.get(cache, key, opts) + if (memoized && opts.memoize !== false) { + return Promise.resolve(memoized.entry) + } else { + return index.find(cache, key) + } +} + +module.exports.hasContent = read.hasContent + +function cp (cache, key, dest, opts) { + return copy(false, cache, key, dest, opts) +} + +module.exports.copy = cp + +function cpDigest (cache, digest, dest, opts) { + return copy(true, cache, digest, dest, opts) +} + +module.exports.copy.byDigest = cpDigest + +function copy (byDigest, cache, key, dest, opts) { + opts = GetOpts(opts) + if (read.copy) { + return (byDigest + ? Promise.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(() => { + return byDigest + ? key + : { + metadata: entry.metadata, + size: entry.size, + integrity: entry.integrity + } + }) + }) + } + + return getData(byDigest, cache, key, opts).then((res) => { + return writeFile(dest, byDigest ? res : res.data).then(() => { + return byDigest + ? key + : { + metadata: res.metadata, + size: res.size, + integrity: res.integrity + } + }) + }) +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/index.js b/public/node_modules/_cacache@13.0.1@cacache/index.js new file mode 100644 index 000000000..08ba14835 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/index.js @@ -0,0 +1,41 @@ +'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 { clearMemoized } = require('./lib/memoization.js') +const tmp = require('./lib/util/tmp.js') + +module.exports.ls = ls +module.exports.ls.stream = ls.stream + +module.exports.get = get +module.exports.get.byDigest = get.byDigest +module.exports.get.sync = get.sync +module.exports.get.sync.byDigest = get.sync.byDigest +module.exports.get.stream = get.stream +module.exports.get.stream.byDigest = get.stream.byDigest +module.exports.get.copy = get.copy +module.exports.get.copy.byDigest = get.copy.byDigest +module.exports.get.info = get.info +module.exports.get.hasContent = get.hasContent +module.exports.get.hasContent.sync = get.hasContent.sync + +module.exports.put = put +module.exports.put.stream = put.stream + +module.exports.rm = rm.entry +module.exports.rm.all = rm.all +module.exports.rm.entry = module.exports.rm +module.exports.rm.content = rm.content + +module.exports.clearMemoized = clearMemoized + +module.exports.tmp = {} +module.exports.tmp.mkdir = tmp.mkdir +module.exports.tmp.withTmp = tmp.withTmp + +module.exports.verify = verify +module.exports.verify.lastRun = verify.lastRun diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/content/path.js b/public/node_modules/_cacache@13.0.1@cacache/lib/content/path.js new file mode 100644 index 000000000..68e02c034 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/content/path.js @@ -0,0 +1,28 @@ +'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/public/node_modules/_cacache@13.0.1@cacache/lib/content/read.js b/public/node_modules/_cacache@13.0.1@cacache/lib/content/read.js new file mode 100644 index 000000000..3656b540b --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/content/read.js @@ -0,0 +1,261 @@ +'use strict' + +const util = require('util') + +const figgyPudding = require('figgy-pudding') +const fs = require('graceful-fs') +const fsm = require('fs-minipass') +const ssri = require('ssri') +const contentPath = require('./path') +const Pipeline = require('minipass-pipeline') + +const lstat = util.promisify(fs.lstat) +const readFile = util.promisify(fs.readFile) + +const ReadOpts = figgyPudding({ + size: {} +}) + +module.exports = read + +const MAX_SINGLE_READ_SIZE = 64 * 1024 * 1024 +function read (cache, integrity, opts) { + opts = ReadOpts(opts) + return withContentSri(cache, integrity, (cpath, sri) => { + // get size + return lstat(cpath).then(stat => ({ stat, cpath, sri })) + }).then(({ stat, cpath, sri }) => { + if (typeof opts.size === 'number' && stat.size !== opts.size) { + throw sizeError(opts.size, stat.size) + } + if (stat.size > MAX_SINGLE_READ_SIZE) { + return readPipeline(cpath, stat.size, sri, new Pipeline()).concat() + } + + return readFile(cpath, null).then((data) => { + if (!ssri.checkData(data, sri)) { + throw integrityError(sri, cpath) + } + return data + }) + }) +} + +const readPipeline = (cpath, size, sri, stream) => { + stream.push( + new fsm.ReadStream(cpath, { + size, + readSize: MAX_SINGLE_READ_SIZE + }), + ssri.integrityStream({ + integrity: sri, + size + }) + ) + return stream +} + +module.exports.sync = readSync + +function readSync (cache, integrity, opts) { + opts = ReadOpts(opts) + return withContentSriSync(cache, integrity, (cpath, sri) => { + const data = fs.readFileSync(cpath) + if (typeof opts.size === 'number' && opts.size !== data.length) { + throw sizeError(opts.size, data.length) + } + + if (ssri.checkData(data, sri)) { + return data + } + + throw integrityError(sri, cpath) + }) +} + +module.exports.stream = readStream +module.exports.readStream = readStream + +function readStream (cache, integrity, opts) { + opts = ReadOpts(opts) + + const stream = new Pipeline() + withContentSri(cache, integrity, (cpath, sri) => { + // just lstat to ensure it exists + return lstat(cpath).then((stat) => ({ stat, cpath, sri })) + }).then(({ stat, cpath, sri }) => { + if (typeof opts.size === 'number' && opts.size !== stat.size) { + return stream.emit('error', sizeError(opts.size, stat.size)) + } + readPipeline(cpath, stat.size, sri, stream) + }, er => stream.emit('error', er)) + + return stream +} + +let copyFile +if (fs.copyFile) { + module.exports.copy = copy + module.exports.copy.sync = copySync + copyFile = util.promisify(fs.copyFile) +} + +function copy (cache, integrity, dest, opts) { + opts = ReadOpts(opts) + return withContentSri(cache, integrity, (cpath, sri) => { + return copyFile(cpath, dest) + }) +} + +function copySync (cache, integrity, dest, opts) { + opts = ReadOpts(opts) + return withContentSriSync(cache, integrity, (cpath, sri) => { + return fs.copyFileSync(cpath, dest) + }) +} + +module.exports.hasContent = hasContent + +function hasContent (cache, integrity) { + if (!integrity) { + return Promise.resolve(false) + } + return withContentSri(cache, integrity, (cpath, sri) => { + return lstat(cpath).then((stat) => ({ size: stat.size, sri, stat })) + }).catch((err) => { + if (err.code === 'ENOENT') { + return false + } + if (err.code === 'EPERM') { + if (process.platform !== 'win32') { + throw err + } else { + return false + } + } + }) +} + +module.exports.hasContent.sync = hasContentSync + +function hasContentSync (cache, integrity) { + if (!integrity) { + return false + } + return withContentSriSync(cache, integrity, (cpath, sri) => { + try { + const stat = fs.lstatSync(cpath) + return { size: stat.size, sri, stat } + } catch (err) { + if (err.code === 'ENOENT') { + return false + } + if (err.code === 'EPERM') { + if (process.platform !== 'win32') { + throw err + } else { + return false + } + } + } + }) +} + +function withContentSri (cache, integrity, fn) { + const tryFn = () => { + 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 fn(cpath, digests[0]) + } else { + // Can't use race here because a generic error can happen before a ENOENT error, and can happen before a valid result + return Promise + .all(sri[sri.pickAlgorithm()].map((meta) => { + return withContentSri(cache, meta, fn) + .catch((err) => { + if (err.code === 'ENOENT') { + return Object.assign( + new Error('No matching content found for ' + sri.toString()), + { code: 'ENOENT' } + ) + } + return err + }) + })) + .then((results) => { + // Return the first non error if it is found + const result = results.find((r) => !(r instanceof Error)) + if (result) { + return result + } + + // Throw the No matching content found error + const enoentError = results.find((r) => r.code === 'ENOENT') + if (enoentError) { + throw enoentError + } + + // Throw generic error + const genericError = results.find((r) => r instanceof Error) + if (genericError) { + throw genericError + } + }) + } + } + + return new Promise((resolve, reject) => { + try { + tryFn() + .then(resolve) + .catch(reject) + } catch (err) { + reject(err) + } + }) +} + +function withContentSriSync (cache, integrity, fn) { + 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 fn(cpath, digests[0]) + } else { + let lastErr = null + for (const meta of sri[sri.pickAlgorithm()]) { + try { + return withContentSriSync(cache, meta, fn) + } catch (err) { + lastErr = err + } + } + if (lastErr) { + throw lastErr + } + } +} + +function sizeError (expected, found) { + const err = new Error(`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) { + const err = new Error(`Integrity verification failed for ${sri} (${path})`) + err.code = 'EINTEGRITY' + err.sri = sri + err.path = path + return err +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/content/rm.js b/public/node_modules/_cacache@13.0.1@cacache/lib/content/rm.js new file mode 100644 index 000000000..139bb0b29 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/content/rm.js @@ -0,0 +1,22 @@ +'use strict' + +const util = require('util') + +const contentPath = require('./path') +const { hasContent } = require('./read') +const rimraf = util.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/public/node_modules/_cacache@13.0.1@cacache/lib/content/write.js b/public/node_modules/_cacache@13.0.1@cacache/lib/content/write.js new file mode 100644 index 000000000..b585938ce --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/content/write.js @@ -0,0 +1,187 @@ +'use strict' + +const util = require('util') + +const contentPath = require('./path') +const fixOwner = require('../util/fix-owner') +const fs = require('graceful-fs') +const moveFile = require('../util/move-file') +const Minipass = require('minipass') +const Pipeline = require('minipass-pipeline') +const Flush = require('minipass-flush') +const path = require('path') +const rimraf = util.promisify(require('rimraf')) +const ssri = require('ssri') +const uniqueFilename = require('unique-filename') +const { disposer } = require('./../util/disposer') +const fsm = require('fs-minipass') + +const writeFile = util.promisify(fs.writeFile) + +module.exports = write + +function write (cache, data, opts) { + opts = opts || {} + if (opts.algorithms && opts.algorithms.length > 1) { + throw new Error('opts.algorithms only supports a single algorithm for now') + } + if (typeof opts.size === 'number' && data.length !== opts.size) { + return Promise.reject(sizeError(opts.size, data.length)) + } + const sri = ssri.fromData(data, { + algorithms: opts.algorithms + }) + if (opts.integrity && !ssri.checkData(data, opts.integrity, opts)) { + return Promise.reject(checksumError(opts.integrity, sri)) + } + + return disposer(makeTmp(cache, opts), makeTmpDisposer, + (tmp) => { + return writeFile(tmp.target, data, { flag: 'wx' }) + .then(() => moveToDestination(tmp, cache, sri, opts)) + }) + .then(() => ({ integrity: sri, size: data.length })) +} + +module.exports.stream = writeStream + +// writes proxied to the 'inputStream' that is passed to the Promise +// 'end' is deferred until content is handled. +class CacacheWriteStream extends Flush { + constructor (cache, opts) { + super() + this.opts = opts + this.cache = cache + this.inputStream = new Minipass() + this.inputStream.on('error', er => this.emit('error', er)) + this.inputStream.on('drain', () => this.emit('drain')) + this.handleContentP = null + } + + write (chunk, encoding, cb) { + if (!this.handleContentP) { + this.handleContentP = handleContent( + this.inputStream, + this.cache, + this.opts + ) + } + return this.inputStream.write(chunk, encoding, cb) + } + + flush (cb) { + this.inputStream.end(() => { + if (!this.handleContentP) { + const e = new Error('Cache input stream was empty') + e.code = 'ENODATA' + // empty streams are probably emitting end right away. + // defer this one tick by rejecting a promise on it. + return Promise.reject(e).catch(cb) + } + this.handleContentP.then( + (res) => { + res.integrity && this.emit('integrity', res.integrity) + res.size !== null && this.emit('size', res.size) + cb() + }, + (er) => cb(er) + ) + }) + } +} + +function writeStream (cache, opts) { + opts = opts || {} + return new CacacheWriteStream(cache, opts) +} + +function handleContent (inputStream, cache, opts) { + return disposer(makeTmp(cache, opts), makeTmpDisposer, (tmp) => { + return pipeToTmp(inputStream, cache, tmp.target, opts) + .then((res) => { + return moveToDestination( + tmp, + cache, + res.integrity, + opts + ).then(() => res) + }) + }) +} + +function pipeToTmp (inputStream, cache, tmpTarget, opts) { + let integrity + let size + const hashStream = ssri.integrityStream({ + integrity: opts.integrity, + algorithms: opts.algorithms, + size: opts.size + }) + hashStream.on('integrity', i => { integrity = i }) + hashStream.on('size', s => { size = s }) + + const outStream = new fsm.WriteStream(tmpTarget, { + flags: 'wx' + }) + + // NB: this can throw if the hashStream has a problem with + // it, and the data is fully written. but pipeToTmp is only + // called in promisory contexts where that is handled. + const pipeline = new Pipeline( + inputStream, + hashStream, + outStream + ) + + return pipeline.promise() + .then(() => ({ integrity, size })) + .catch(er => rimraf(tmpTarget).then(() => { throw er })) +} + +function makeTmp (cache, opts) { + const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) + return fixOwner.mkdirfix(cache, path.dirname(tmpTarget)).then(() => ({ + target: tmpTarget, + moved: false + })) +} + +function makeTmpDisposer (tmp) { + if (tmp.moved) { + return Promise.resolve() + } + return rimraf(tmp.target) +} + +function moveToDestination (tmp, cache, sri, opts) { + const destination = contentPath(cache, sri) + const destDir = path.dirname(destination) + + return fixOwner + .mkdirfix(cache, destDir) + .then(() => { + return moveFile(tmp.target, destination) + }) + .then(() => { + tmp.moved = true + return fixOwner.chownr(cache, destination) + }) +} + +function sizeError (expected, found) { + const err = new Error(`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) { + const err = new Error(`Integrity check failed: + Wanted: ${expected} + Found: ${found}`) + err.code = 'EINTEGRITY' + err.expected = expected + err.found = found + return err +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/entry-index.js b/public/node_modules/_cacache@13.0.1@cacache/lib/entry-index.js new file mode 100644 index 000000000..5e6798523 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/entry-index.js @@ -0,0 +1,311 @@ +'use strict' + +const util = require('util') + +const crypto = require('crypto') +const figgyPudding = require('figgy-pudding') +const fs = require('graceful-fs') +const Minipass = require('minipass') +const path = require('path') +const ssri = require('ssri') +const contentPath = require('./content/path') +const fixOwner = require('./util/fix-owner') +const hashToSegments = require('./util/hash-to-segments') +const indexV = require('../package.json')['cache-version'].index + +const appendFile = util.promisify(fs.appendFile) +const readFile = util.promisify(fs.readFile) +const readdir = util.promisify(fs.readdir) + +module.exports.NotFoundError = class NotFoundError extends Error { + constructor (cache, key) { + super(`No cache entry for ${key} found in ${cache}`) + this.code = 'ENOENT' + this.cache = cache + this.key = key + } +} + +const IndexOpts = figgyPudding({ + metadata: {}, + size: {} +}) + +module.exports.insert = insert + +function insert (cache, key, integrity, opts) { + opts = IndexOpts(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(cache, path.dirname(bucket)) + .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 appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`) + }) + .then(() => fixOwner.chownr(cache, bucket)) + .catch((err) => { + if (err.code === 'ENOENT') { + return undefined + } + throw err + // 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.insert.sync = insertSync + +function insertSync (cache, key, integrity, opts) { + opts = IndexOpts(opts) + const bucket = bucketPath(cache, key) + const entry = { + key, + integrity: integrity && ssri.stringify(integrity), + time: Date.now(), + size: opts.size, + metadata: opts.metadata + } + fixOwner.mkdirfix.sync(cache, path.dirname(bucket)) + const stringified = JSON.stringify(entry) + fs.appendFileSync(bucket, `\n${hashEntry(stringified)}\t${stringified}`) + try { + fixOwner.chownr.sync(cache, bucket) + } catch (err) { + if (err.code !== 'ENOENT') { + throw err + } + } + return formatEntry(cache, entry) +} + +module.exports.find = find + +function find (cache, key) { + const bucket = bucketPath(cache, key) + return bucketEntries(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.find.sync = findSync + +function findSync (cache, key) { + const bucket = bucketPath(cache, key) + try { + return bucketEntriesSync(bucket).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.delete.sync = delSync + +function delSync (cache, key, opts) { + return insertSync(cache, key, null, opts) +} + +module.exports.lsStream = lsStream + +function lsStream (cache) { + const indexDir = bucketDir(cache) + const stream = new Minipass({ objectMode: true }) + + readdirOrEmpty(indexDir).then(buckets => Promise.all( + buckets.map(bucket => { + const bucketPath = path.join(indexDir, bucket) + return readdirOrEmpty(bucketPath).then(subbuckets => Promise.all( + subbuckets.map(subbucket => { + const subbucketPath = path.join(bucketPath, subbucket) + + // "/cachename//./*" + return readdirOrEmpty(subbucketPath).then(entries => Promise.all( + entries.map(entry => { + const entryPath = path.join(subbucketPath, entry) + return bucketEntries(entryPath).then(entries => + // using a Map here prevents duplicate keys from + // showing up twice, I guess? + entries.reduce((acc, entry) => { + acc.set(entry.key, entry) + return acc + }, new Map()) + ).then(reduced => { + // reduced is a map of key => entry + for (const entry of reduced.values()) { + const formatted = formatEntry(cache, entry) + if (formatted) { + stream.write(formatted) + } + } + }).catch(err => { + if (err.code === 'ENOENT') { return undefined } + throw err + }) + }) + )) + }) + )) + }) + )) + .then( + () => stream.end(), + err => stream.emit('error', err) + ) + + return stream +} + +module.exports.ls = ls + +function ls (cache) { + return lsStream(cache).collect().then(entries => + entries.reduce((acc, xs) => { + acc[xs.key] = xs + return acc + }, {}) + ) +} + +function bucketEntries (bucket, filter) { + return readFile(bucket, 'utf8').then((data) => _bucketEntries(data, filter)) +} + +function bucketEntriesSync (bucket, filter) { + const data = fs.readFileSync(bucket, 'utf8') + return _bucketEntries(data, filter) +} + +function _bucketEntries (data, filter) { + const 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 readdir(dir).catch((err) => { + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { + return [] + } + + throw err + }) +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/memoization.js b/public/node_modules/_cacache@13.0.1@cacache/lib/memoization.js new file mode 100644 index 000000000..185141d8e --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/memoization.js @@ -0,0 +1,74 @@ +'use strict' + +const LRU = require('lru-cache') + +const MAX_SIZE = 50 * 1024 * 1024 // 50MB +const MAX_AGE = 3 * 60 * 1000 + +const MEMOIZED = new LRU({ + max: MAX_SIZE, + maxAge: MAX_AGE, + length: (entry, key) => key.startsWith('key:') ? entry.data.length : 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/public/node_modules/_cacache@13.0.1@cacache/lib/util/disposer.js b/public/node_modules/_cacache@13.0.1@cacache/lib/util/disposer.js new file mode 100644 index 000000000..8a24ad2f2 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/util/disposer.js @@ -0,0 +1,30 @@ +'use strict' + +module.exports.disposer = disposer + +function disposer (creatorFn, disposerFn, fn) { + const runDisposer = (resource, result, shouldThrow = false) => { + return disposerFn(resource) + .then( + // disposer resolved, do something with original fn's promise + () => { + if (shouldThrow) { + throw result + } + return result + }, + // Disposer fn failed, crash process + (err) => { + throw err + // Or process.exit? + }) + } + + return creatorFn + .then((resource) => { + // fn(resource) can throw, so wrap in a promise here + return Promise.resolve().then(() => fn(resource)) + .then((result) => runDisposer(resource, result)) + .catch((err) => runDisposer(resource, err, true)) + }) +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/util/fix-owner.js b/public/node_modules/_cacache@13.0.1@cacache/lib/util/fix-owner.js new file mode 100644 index 000000000..b5cf387a3 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/util/fix-owner.js @@ -0,0 +1,145 @@ +'use strict' + +const util = require('util') + +const chownr = util.promisify(require('chownr')) +const mkdirp = util.promisify(require('mkdirp')) +const inflight = require('promise-inflight') +const inferOwner = require('infer-owner') + +// Memoize getuid()/getgid() calls. +// patch process.setuid/setgid to invalidate cached value on change +const self = { uid: null, gid: null } +const getSelf = () => { + if (typeof self.uid !== 'number') { + self.uid = process.getuid() + const setuid = process.setuid + process.setuid = (uid) => { + self.uid = null + process.setuid = setuid + return process.setuid(uid) + } + } + if (typeof self.gid !== 'number') { + self.gid = process.getgid() + const setgid = process.setgid + process.setgid = (gid) => { + self.gid = null + process.setgid = setgid + return process.setgid(gid) + } + } +} + +module.exports.chownr = fixOwner + +function fixOwner (cache, filepath) { + if (!process.getuid) { + // This platform doesn't need ownership fixing + return Promise.resolve() + } + + getSelf() + if (self.uid !== 0) { + // almost certainly can't chown anyway + return Promise.resolve() + } + + return Promise.resolve(inferOwner(cache)).then((owner) => { + const { uid, gid } = owner + + // No need to override if it's already what we used. + if (self.uid === uid && self.gid === gid) { + return + } + + return inflight('fixOwner: fixing ownership on ' + filepath, () => + chownr( + filepath, + typeof uid === 'number' ? uid : self.uid, + typeof gid === 'number' ? gid : self.gid + ).catch((err) => { + if (err.code === 'ENOENT') { + return null + } + throw err + }) + ) + }) +} + +module.exports.chownr.sync = fixOwnerSync + +function fixOwnerSync (cache, filepath) { + if (!process.getuid) { + // This platform doesn't need ownership fixing + return + } + const { uid, gid } = inferOwner.sync(cache) + getSelf() + if (self.uid !== 0) { + // almost certainly can't chown anyway + return + } + + if (self.uid === uid && self.gid === gid) { + // No need to override if it's already what we used. + return + } + try { + chownr.sync( + filepath, + typeof uid === 'number' ? uid : self.uid, + typeof gid === 'number' ? gid : self.gid + ) + } catch (err) { + // only catch ENOENT, any other error is a problem. + if (err.code === 'ENOENT') { + return null + } + throw err + } +} + +module.exports.mkdirfix = mkdirfix + +function mkdirfix (cache, p, cb) { + // we have to infer the owner _before_ making the directory, even though + // we aren't going to use the results, since the cache itself might not + // exist yet. If we mkdirp it, then our current uid/gid will be assumed + // to be correct if it creates the cache folder in the process. + return Promise.resolve(inferOwner(cache)).then(() => { + return mkdirp(p) + .then((made) => { + if (made) { + return fixOwner(cache, made).then(() => made) + } + }) + .catch((err) => { + if (err.code === 'EEXIST') { + return fixOwner(cache, p).then(() => null) + } + throw err + }) + }) +} + +module.exports.mkdirfix.sync = mkdirfixSync + +function mkdirfixSync (cache, p) { + try { + inferOwner.sync(cache) + const made = mkdirp.sync(p) + if (made) { + fixOwnerSync(cache, made) + return made + } + } catch (err) { + if (err.code === 'EEXIST') { + fixOwnerSync(cache, p) + return null + } else { + throw err + } + } +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/util/hash-to-segments.js b/public/node_modules/_cacache@13.0.1@cacache/lib/util/hash-to-segments.js new file mode 100644 index 000000000..445599b50 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/util/hash-to-segments.js @@ -0,0 +1,7 @@ +'use strict' + +module.exports = hashToSegments + +function hashToSegments (hash) { + return [hash.slice(0, 2), hash.slice(2, 4), hash.slice(4)] +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/util/move-file.js b/public/node_modules/_cacache@13.0.1@cacache/lib/util/move-file.js new file mode 100644 index 000000000..89cea6afe --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/util/move-file.js @@ -0,0 +1,56 @@ +'use strict' + +const fs = require('graceful-fs') +const util = require('util') +const chmod = util.promisify(fs.chmod) +const unlink = util.promisify(fs.unlink) +const stat = util.promisify(fs.stat) +const move = require('move-concurrently') +const pinflight = require('promise-inflight') + +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 new Promise((resolve, reject) => { + 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 reject(err) + } + } + return resolve() + }) + }) + .then(() => { + // content should never change for any reason, so make it read-only + return Promise.all([ + unlink(src), + process.platform !== 'win32' && chmod(dest, '0444') + ]) + }) + .catch(() => { + return pinflight('cacache-move-file:' + dest, () => { + return 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 + return move(src, dest, { Promise, fs }) + }) + }) + }) +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/util/tmp.js b/public/node_modules/_cacache@13.0.1@cacache/lib/util/tmp.js new file mode 100644 index 000000000..8d0ba38ab --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/util/tmp.js @@ -0,0 +1,42 @@ +'use strict' + +const util = require('util') + +const figgyPudding = require('figgy-pudding') +const fixOwner = require('./fix-owner') +const path = require('path') +const rimraf = util.promisify(require('rimraf')) +const uniqueFilename = require('unique-filename') +const { disposer } = require('./disposer') + +const TmpOpts = figgyPudding({ + tmpPrefix: {} +}) + +module.exports.mkdir = mktmpdir + +function mktmpdir (cache, opts) { + opts = TmpOpts(opts) + const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) + return fixOwner.mkdirfix(cache, tmpTarget).then(() => { + return tmpTarget + }) +} + +module.exports.withTmp = withTmp + +function withTmp (cache, opts, cb) { + if (!cb) { + cb = opts + opts = null + } + opts = TmpOpts(opts) + + return disposer(mktmpdir(cache, opts), rimraf, cb) +} + +module.exports.fix = fixtmpdir + +function fixtmpdir (cache) { + return fixOwner(cache, path.join(cache, 'tmp')) +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/lib/verify.js b/public/node_modules/_cacache@13.0.1@cacache/lib/verify.js new file mode 100644 index 000000000..8a1c95893 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/lib/verify.js @@ -0,0 +1,291 @@ +'use strict' + +const util = require('util') + +const pMap = require('p-map') +const contentPath = require('./content/path') +const figgyPudding = require('figgy-pudding') +const fixOwner = require('./util/fix-owner') +const fs = require('graceful-fs') +const fsm = require('fs-minipass') +const glob = util.promisify(require('glob')) +const index = require('./entry-index') +const path = require('path') +const rimraf = util.promisify(require('rimraf')) +const ssri = require('ssri') + +const hasOwnProperty = (obj, key) => + Object.prototype.hasOwnProperty.call(obj, key) + +const stat = util.promisify(fs.stat) +const truncate = util.promisify(fs.truncate) +const writeFile = util.promisify(fs.writeFile) +const readFile = util.promisify(fs.readFile) + +const VerifyOpts = figgyPudding({ + concurrency: { + default: 20 + }, + filter: {}, + log: { + default: { silly () {} } + } +}) + +module.exports = verify + +function verify (cache, opts) { + opts = VerifyOpts(opts) + opts.log.silly('verify', 'verifying cache at', cache) + + const steps = [ + markStartTime, + fixPerms, + garbageCollect, + rebuildIndex, + cleanTmp, + writeVerifile, + markEndTime + ] + + return steps + .reduce((promise, step, i) => { + const label = step.name || `step #${i}` + const start = new Date() + return promise.then((stats) => { + return 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 Promise.resolve(stats) + }) + }) + }, Promise.resolve({})) + .then((stats) => { + stats.runTime.total = stats.endTime - stats.startTime + opts.log.silly( + 'verify', + 'verification finished for', + cache, + 'in', + `${stats.runTime.total}ms` + ) + return stats + }) +} + +function markStartTime (cache, opts) { + return Promise.resolve({ startTime: new Date() }) +} + +function markEndTime (cache, opts) { + return Promise.resolve({ endTime: new Date() }) +} + +function fixPerms (cache, opts) { + opts.log.silly('verify', 'fixing cache permissions') + return fixOwner + .mkdirfix(cache, cache) + .then(() => { + // TODO - fix file permissions too + return fixOwner.chownr(cache, cache) + }) + .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.silly('verify', 'garbage collecting content') + const indexStream = index.lsStream(cache) + const liveContent = new Set() + indexStream.on('data', (entry) => { + if (opts.filter && !opts.filter(entry)) { + return + } + liveContent.add(entry.integrity.toString()) + }) + return new Promise((resolve, reject) => { + indexStream.on('end', resolve).on('error', reject) + }).then(() => { + const contentDir = contentPath.contentDir(cache) + return glob(path.join(contentDir, '**'), { + follow: false, + nodir: true, + nosort: true + }).then((files) => { + return Promise.resolve({ + verifiedContent: 0, + reclaimedCount: 0, + reclaimedSize: 0, + badContentCount: 0, + keptSize: 0 + }).then((stats) => + pMap( + 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 stat(f).then((s) => { + return rimraf(f).then(() => { + stats.reclaimedSize += s.size + return stats + }) + }) + } + }, + { concurrency: opts.concurrency } + ).then(() => stats) + ) + }) + }) +} + +function verifyContent (filepath, sri) { + return stat(filepath) + .then((s) => { + const contentInfo = { + size: s.size, + valid: true + } + return ssri + .checkStream(new fsm.ReadStream(filepath), sri) + .catch((err) => { + if (err.code !== 'EINTEGRITY') { + throw err + } + return rimraf(filepath).then(() => { + contentInfo.valid = false + }) + }) + .then(() => contentInfo) + }) + .catch((err) => { + if (err.code === 'ENOENT') { + return { size: 0, valid: false } + } + throw err + }) +} + +function rebuildIndex (cache, opts) { + opts.log.silly('verify', 'rebuilding index') + return index.ls(cache).then((entries) => { + const stats = { + missingContent: 0, + rejectedEntries: 0, + totalEntries: 0 + } + const buckets = {} + for (const k in entries) { + if (hasOwnProperty(entries, k)) { + const hashed = index.hashKey(k) + const entry = entries[k] + const excluded = 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 pMap( + Object.keys(buckets), + (key) => { + return rebuildBucket(cache, buckets[key], stats, opts) + }, + { concurrency: opts.concurrency } + ).then(() => stats) + }) +} + +function rebuildBucket (cache, bucket, stats, opts) { + return truncate(bucket._path).then(() => { + // This needs to be serialized because cacache explicitly + // lets very racy bucket conflicts clobber each other. + return bucket.reduce((promise, entry) => { + return promise.then(() => { + const content = contentPath(cache, entry.integrity) + return stat(content) + .then(() => { + return index + .insert(cache, entry.key, entry.integrity, { + metadata: entry.metadata, + size: entry.size + }) + .then(() => { + stats.totalEntries++ + }) + }) + .catch((err) => { + if (err.code === 'ENOENT') { + stats.rejectedEntries++ + stats.missingContent++ + return + } + throw err + }) + }) + }, Promise.resolve()) + }) +} + +function cleanTmp (cache, opts) { + 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.silly('verify', 'writing verifile to ' + verifile) + try { + return writeFile(verifile, '' + +new Date()) + } finally { + fixOwner.chownr.sync(cache, verifile) + } +} + +module.exports.lastRun = lastRun + +function lastRun (cache) { + return readFile(path.join(cache, '_lastverified'), 'utf8').then( + (data) => new Date(+data) + ) +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/ls.js b/public/node_modules/_cacache@13.0.1@cacache/ls.js new file mode 100644 index 000000000..6006c99e3 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/ls.js @@ -0,0 +1,6 @@ +'use strict' + +const index = require('./lib/entry-index') + +module.exports = index.ls +module.exports.stream = index.lsStream diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/.bin/mkdirp b/public/node_modules/_cacache@13.0.1@cacache/node_modules/.bin/mkdirp new file mode 120000 index 000000000..e493ef63c --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../../../_mkdirp@0.5.1@mkdirp/bin/cmd.js \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/.bin/rimraf b/public/node_modules/_cacache@13.0.1@cacache/node_modules/.bin/rimraf new file mode 120000 index 000000000..cc571a043 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../../../_rimraf@2.7.1@rimraf/bin.js \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/chownr b/public/node_modules/_cacache@13.0.1@cacache/node_modules/chownr new file mode 120000 index 000000000..236db6c56 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/chownr @@ -0,0 +1 @@ +../../_chownr@1.1.3@chownr \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/figgy-pudding b/public/node_modules/_cacache@13.0.1@cacache/node_modules/figgy-pudding new file mode 120000 index 000000000..eb655b7da --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/figgy-pudding @@ -0,0 +1 @@ +../../_figgy-pudding@3.5.1@figgy-pudding \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/fs-minipass b/public/node_modules/_cacache@13.0.1@cacache/node_modules/fs-minipass new file mode 120000 index 000000000..f5a4c3416 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/fs-minipass @@ -0,0 +1 @@ +../../_fs-minipass@2.0.0@fs-minipass \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/glob b/public/node_modules/_cacache@13.0.1@cacache/node_modules/glob new file mode 120000 index 000000000..b400d29dd --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/glob @@ -0,0 +1 @@ +../../_glob@7.1.6@glob \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/graceful-fs b/public/node_modules/_cacache@13.0.1@cacache/node_modules/graceful-fs new file mode 120000 index 000000000..ae23402b1 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/graceful-fs @@ -0,0 +1 @@ +../../_graceful-fs@4.2.3@graceful-fs \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/infer-owner b/public/node_modules/_cacache@13.0.1@cacache/node_modules/infer-owner new file mode 120000 index 000000000..ebfb64a84 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/infer-owner @@ -0,0 +1 @@ +../../_infer-owner@1.0.4@infer-owner \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/lru-cache b/public/node_modules/_cacache@13.0.1@cacache/node_modules/lru-cache new file mode 120000 index 000000000..36294b2db --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/lru-cache @@ -0,0 +1 @@ +../../_lru-cache@5.1.1@lru-cache \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass b/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass new file mode 120000 index 000000000..a95109227 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass @@ -0,0 +1 @@ +../../_minipass@3.1.1@minipass \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-collect b/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-collect new file mode 120000 index 000000000..202591f75 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-collect @@ -0,0 +1 @@ +../../_minipass-collect@1.0.2@minipass-collect \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-flush b/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-flush new file mode 120000 index 000000000..670b99c3b --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-flush @@ -0,0 +1 @@ +../../_minipass-flush@1.0.5@minipass-flush \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-pipeline b/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-pipeline new file mode 120000 index 000000000..f336995e8 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/minipass-pipeline @@ -0,0 +1 @@ +../../_minipass-pipeline@1.2.2@minipass-pipeline \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/mkdirp b/public/node_modules/_cacache@13.0.1@cacache/node_modules/mkdirp new file mode 120000 index 000000000..4aa6ce401 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/mkdirp @@ -0,0 +1 @@ +../../_mkdirp@0.5.1@mkdirp \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/move-concurrently b/public/node_modules/_cacache@13.0.1@cacache/node_modules/move-concurrently new file mode 120000 index 000000000..befaf071e --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/move-concurrently @@ -0,0 +1 @@ +../../_move-concurrently@1.0.1@move-concurrently \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/p-map b/public/node_modules/_cacache@13.0.1@cacache/node_modules/p-map new file mode 120000 index 000000000..9e6a0f799 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/p-map @@ -0,0 +1 @@ +../../_p-map@3.0.0@p-map \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/promise-inflight b/public/node_modules/_cacache@13.0.1@cacache/node_modules/promise-inflight new file mode 120000 index 000000000..86abb0db7 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/promise-inflight @@ -0,0 +1 @@ +../../_promise-inflight@1.0.1@promise-inflight \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/rimraf b/public/node_modules/_cacache@13.0.1@cacache/node_modules/rimraf new file mode 120000 index 000000000..62e1c056a --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/rimraf @@ -0,0 +1 @@ +../../_rimraf@2.7.1@rimraf \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/ssri b/public/node_modules/_cacache@13.0.1@cacache/node_modules/ssri new file mode 120000 index 000000000..0f43d7f0a --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/ssri @@ -0,0 +1 @@ +../../_ssri@7.1.0@ssri \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/node_modules/unique-filename b/public/node_modules/_cacache@13.0.1@cacache/node_modules/unique-filename new file mode 120000 index 000000000..070b1c169 --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/node_modules/unique-filename @@ -0,0 +1 @@ +../../_unique-filename@1.1.1@unique-filename \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/package.json b/public/node_modules/_cacache@13.0.1@cacache/package.json new file mode 100644 index 000000000..cf2df9c5f --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/package.json @@ -0,0 +1,98 @@ +{ + "name": "cacache", + "version": "13.0.1", + "cache-version": { + "content": "2", + "index": "5" + }, + "description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.", + "main": "index.js", + "files": [ + "*.js", + "lib", + "locales" + ], + "scripts": { + "benchmarks": "node test/benchmarks", + "prerelease": "npm t", + "postrelease": "npm publish && git push --follow-tags", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap 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'" + }, + "repository": "https://github.com/npm/cacache", + "keywords": [ + "cache", + "caching", + "content-addressable", + "sri", + "sri hash", + "subresource integrity", + "cache", + "storage", + "store", + "file store", + "filesystem", + "disk cache", + "disk storage" + ], + "author": { + "name": "Kat Marchán", + "email": "kzm@sykosomatic.org", + "twitter": "maybekatz" + }, + "contributors": [ + { + "name": "Charlotte Spencer", + "email": "charlottelaspencer@gmail.com", + "twitter": "charlotteis" + }, + { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "twitter": "ReBeccaOrg" + } + ], + "license": "ISC", + "dependencies": { + "chownr": "^1.1.2", + "figgy-pudding": "^3.5.1", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.2", + "infer-owner": "^1.0.4", + "lru-cache": "^5.1.1", + "minipass": "^3.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "p-map": "^3.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^2.7.1", + "ssri": "^7.0.0", + "unique-filename": "^1.1.1" + }, + "devDependencies": { + "benchmark": "^2.1.4", + "chalk": "^2.4.2", + "cross-env": "^5.2.1", + "require-inject": "^1.4.4", + "standard": "^14.3.0", + "standard-version": "^7.0.0", + "tacks": "^1.3.0", + "tap": "^14.6.9", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.9" + }, + "engines": { + "node": ">= 8" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "cacache@13.0.1", + "_resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_cacache@13.0.1@cacache/put.js b/public/node_modules/_cacache@13.0.1@cacache/put.js new file mode 100644 index 000000000..3e535fedb --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/put.js @@ -0,0 +1,94 @@ +'use strict' + +const figgyPudding = require('figgy-pudding') +const index = require('./lib/entry-index') +const memo = require('./lib/memoization') +const write = require('./lib/content/write') +const Flush = require('minipass-flush') +const { PassThrough } = require('minipass-collect') +const Pipeline = require('minipass-pipeline') + +const PutOpts = figgyPudding({ + algorithms: { + default: ['sha512'] + }, + integrity: {}, + memoize: {}, + metadata: {}, + pickAlgorithm: {}, + size: {}, + tmpPrefix: {}, + single: {}, + sep: {}, + error: {}, + strict: {} +}) + +module.exports = putData + +function putData (cache, key, data, opts) { + opts = PutOpts(opts) + return write(cache, data, opts).then((res) => { + return index + .insert(cache, key, res.integrity, opts.concat({ size: res.size })) + .then((entry) => { + if (opts.memoize) { + memo.put(cache, entry, data, opts) + } + return res.integrity + }) + }) +} + +module.exports.stream = putStream + +function putStream (cache, key, opts) { + opts = PutOpts(opts) + let integrity + let size + + let memoData + const pipeline = new Pipeline() + // first item in the pipeline is the memoizer, because we need + // that to end first and get the collected data. + if (opts.memoize) { + const memoizer = new PassThrough().on('collect', data => { + memoData = data + }) + pipeline.push(memoizer) + } + + // contentStream is a write-only, not a passthrough + // no data comes out of it. + const contentStream = write.stream(cache, opts) + .on('integrity', (int) => { + integrity = int + }) + .on('size', (s) => { + size = s + }) + + pipeline.push(contentStream) + + // last but not least, we write the index and emit hash and size, + // and memoize if we're doing that + pipeline.push(new Flush({ + flush () { + return index + .insert(cache, key, integrity, opts.concat({ size })) + .then((entry) => { + if (opts.memoize && memoData) { + memo.put(cache, entry, memoData, opts) + } + if (integrity) { + pipeline.emit('integrity', integrity) + } + if (size) { + pipeline.emit('size', size) + } + }) + } + })) + + return pipeline +} diff --git a/public/node_modules/_cacache@13.0.1@cacache/rm.js b/public/node_modules/_cacache@13.0.1@cacache/rm.js new file mode 100644 index 000000000..7dd4e8c8b --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/rm.js @@ -0,0 +1,31 @@ +'use strict' + +const util = require('util') + +const index = require('./lib/entry-index') +const memo = require('./lib/memoization') +const path = require('path') +const rimraf = util.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/public/node_modules/_cacache@13.0.1@cacache/verify.js b/public/node_modules/_cacache@13.0.1@cacache/verify.js new file mode 100644 index 000000000..db7763d7a --- /dev/null +++ b/public/node_modules/_cacache@13.0.1@cacache/verify.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('./lib/verify') diff --git a/public/node_modules/_chownr@1.1.3@chownr/LICENSE b/public/node_modules/_chownr@1.1.3@chownr/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_chownr@1.1.3@chownr/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_chownr@1.1.3@chownr/README.md b/public/node_modules/_chownr@1.1.3@chownr/README.md new file mode 100644 index 000000000..70e9a54a3 --- /dev/null +++ b/public/node_modules/_chownr@1.1.3@chownr/README.md @@ -0,0 +1,3 @@ +Like `chown -R`. + +Takes the same arguments as `fs.chown()` diff --git a/public/node_modules/_chownr@1.1.3@chownr/chownr.js b/public/node_modules/_chownr@1.1.3@chownr/chownr.js new file mode 100644 index 000000000..9f04393b7 --- /dev/null +++ b/public/node_modules/_chownr@1.1.3@chownr/chownr.js @@ -0,0 +1,125 @@ +'use strict' +const fs = require('fs') +const path = require('path') + +/* istanbul ignore next */ +const LCHOWN = fs.lchown ? 'lchown' : 'chown' +/* istanbul ignore next */ +const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' + +const needEISDIRHandled = fs.lchown && + !process.version.match(/v1[1-9]+\./) && + !process.version.match(/v10\.[6-9]/) + +/* istanbul ignore next */ +const handleEISDIR = + needEISDIRHandled ? (path, uid, gid, cb) => er => { + // Node prior to v10 had a very questionable implementation of + // fs.lchown, which would always try to call fs.open on a directory + // Fall back to fs.chown in those cases. + if (!er || er.code !== 'EISDIR') + cb(er) + else + fs.chown(path, uid, gid, cb) + } + : (_, __, ___, cb) => cb + +/* istanbul ignore next */ +const handleEISDirSync = + needEISDIRHandled ? (path, uid, gid) => { + try { + return fs[LCHOWNSYNC](path, uid, gid) + } catch (er) { + if (er.code !== 'EISDIR') + throw er + fs.chownSync(path, uid, gid) + } + } + : (path, uid, gid) => fs[LCHOWNSYNC](path, uid, gid) + +// fs.readdir could only accept an options object as of node v6 +const nodeVersion = process.version +let readdir = (path, options, cb) => fs.readdir(path, options, cb) +let readdirSync = (path, options) => fs.readdirSync(path, options) +/* istanbul ignore next */ +if (/^v4\./.test(nodeVersion)) + readdir = (path, options, cb) => fs.readdir(path, cb) + +const chownrKid = (p, child, uid, gid, cb) => { + if (typeof child === 'string') + return fs.lstat(path.resolve(p, child), (er, stats) => { + if (er) + return cb(er) + stats.name = child + chownrKid(p, stats, uid, gid, cb) + }) + + if (child.isDirectory()) { + chownr(path.resolve(p, child.name), uid, gid, er => { + if (er) + return cb(er) + const cpath = path.resolve(p, child.name) + fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb)) + }) + } else { + const cpath = path.resolve(p, child.name) + fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb)) + } +} + + +const chownr = (p, uid, gid, cb) => { + readdir(p, { withFileTypes: true }, (er, children) => { + // any error other than ENOTDIR or ENOTSUP means it's not readable, + // or doesn't exist. give up. + if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') + return cb(er) + if (er || !children.length) + return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb)) + + let len = children.length + let errState = null + const then = er => { + if (errState) + return + if (er) + return cb(errState = er) + if (-- len === 0) + return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb)) + } + + children.forEach(child => chownrKid(p, child, uid, gid, then)) + }) +} + +const chownrKidSync = (p, child, uid, gid) => { + if (typeof child === 'string') { + const stats = fs.lstatSync(path.resolve(p, child)) + stats.name = child + child = stats + } + + if (child.isDirectory()) + chownrSync(path.resolve(p, child.name), uid, gid) + + handleEISDirSync(path.resolve(p, child.name), uid, gid) +} + +const chownrSync = (p, uid, gid) => { + let children + try { + children = readdirSync(p, { withFileTypes: true }) + } catch (er) { + if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP') + return handleEISDirSync(p, uid, gid) + throw er + } + + if (children.length) + children.forEach(child => chownrKidSync(p, child, uid, gid)) + + return handleEISDirSync(p, uid, gid) +} + +module.exports = chownr +chownr.sync = chownrSync diff --git a/public/node_modules/_chownr@1.1.3@chownr/package.json b/public/node_modules/_chownr@1.1.3@chownr/package.json new file mode 100644 index 000000000..789b4c5c9 --- /dev/null +++ b/public/node_modules/_chownr@1.1.3@chownr/package.json @@ -0,0 +1,29 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "chownr", + "description": "like `chown -R`", + "version": "1.1.3", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chownr.git" + }, + "main": "chownr.js", + "files": [ + "chownr.js" + ], + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "", + "tap": "^12.0.1" + }, + "scripts": { + "test": "tap test/*.js --cov", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "license": "ISC", + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "chownr@1.1.3", + "_resolved": "https://registry.npm.taobao.org/chownr/download/chownr-1.1.3.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_clean-stack@2.2.0@clean-stack/index.d.ts b/public/node_modules/_clean-stack@2.2.0@clean-stack/index.d.ts new file mode 100644 index 000000000..ed5899509 --- /dev/null +++ b/public/node_modules/_clean-stack@2.2.0@clean-stack/index.d.ts @@ -0,0 +1,47 @@ +declare namespace cleanStack { + interface Options { + /** + Prettify the file paths in the stack: + + `/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15` + + @default false + */ + readonly pretty?: boolean; + } +} + +/** +Clean up error stack traces. Removes the mostly unhelpful internal Node.js entries. + +@param stack - The `stack` property of an `Error`. + +@example +``` +import cleanStack = require('clean-stack'); + +const error = new Error('Missing unicorn'); + +console.log(error.stack); + +// Error: Missing unicorn +// at Object. (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15) +// at Module._compile (module.js:409:26) +// at Object.Module._extensions..js (module.js:416:10) +// at Module.load (module.js:343:32) +// at Function.Module._load (module.js:300:12) +// at Function.Module.runMain (module.js:441:10) +// at startup (node.js:139:18) + +console.log(cleanStack(error.stack)); + +// Error: Missing unicorn +// at Object. (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15) +``` +*/ +declare function cleanStack( + stack: string, + options?: cleanStack.Options +): string; + +export = cleanStack; diff --git a/public/node_modules/_clean-stack@2.2.0@clean-stack/index.js b/public/node_modules/_clean-stack@2.2.0@clean-stack/index.js new file mode 100644 index 000000000..8c1dcc4cd --- /dev/null +++ b/public/node_modules/_clean-stack@2.2.0@clean-stack/index.js @@ -0,0 +1,40 @@ +'use strict'; +const os = require('os'); + +const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; +const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; +const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); + +module.exports = (stack, options) => { + options = Object.assign({pretty: false}, options); + + return stack.replace(/\\/g, '/') + .split('\n') + .filter(line => { + const pathMatches = line.match(extractPathRegex); + if (pathMatches === null || !pathMatches[1]) { + return true; + } + + const match = pathMatches[1]; + + // Electron + if ( + match.includes('.app/Contents/Resources/electron.asar') || + match.includes('.app/Contents/Resources/default_app.asar') + ) { + return false; + } + + return !pathRegex.test(match); + }) + .filter(line => line.trim() !== '') + .map(line => { + if (options.pretty) { + return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); + } + + return line; + }) + .join('\n'); +}; diff --git a/public/node_modules/_clean-stack@2.2.0@clean-stack/license b/public/node_modules/_clean-stack@2.2.0@clean-stack/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_clean-stack@2.2.0@clean-stack/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_clean-stack@2.2.0@clean-stack/package.json b/public/node_modules/_clean-stack@2.2.0@clean-stack/package.json new file mode 100644 index 000000000..2fddf7018 --- /dev/null +++ b/public/node_modules/_clean-stack@2.2.0@clean-stack/package.json @@ -0,0 +1,42 @@ +{ + "name": "clean-stack", + "version": "2.2.0", + "description": "Clean up error stack traces", + "license": "MIT", + "repository": "sindresorhus/clean-stack", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "clean", + "stack", + "trace", + "traces", + "error", + "err", + "electron" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "browser": { + "os": false + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "clean-stack@2.2.0", + "_resolved": "https://registry.npm.taobao.org/clean-stack/download/clean-stack-2.2.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_clean-stack@2.2.0@clean-stack/readme.md b/public/node_modules/_clean-stack@2.2.0@clean-stack/readme.md new file mode 100644 index 000000000..8d4416046 --- /dev/null +++ b/public/node_modules/_clean-stack@2.2.0@clean-stack/readme.md @@ -0,0 +1,76 @@ +# clean-stack [![Build Status](https://travis-ci.org/sindresorhus/clean-stack.svg?branch=master)](https://travis-ci.org/sindresorhus/clean-stack) + +> Clean up error stack traces + +Removes the mostly unhelpful internal Node.js entries. + +Also works in Electron. + + +## Install + +``` +$ npm install clean-stack +``` + + +## Usage + +```js +const cleanStack = require('clean-stack'); + +const error = new Error('Missing unicorn'); + +console.log(error.stack); +/* +Error: Missing unicorn + at Object. (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15) + at Module._compile (module.js:409:26) + at Object.Module._extensions..js (module.js:416:10) + at Module.load (module.js:343:32) + at Function.Module._load (module.js:300:12) + at Function.Module.runMain (module.js:441:10) + at startup (node.js:139:18) +*/ + +console.log(cleanStack(error.stack)); +/* +Error: Missing unicorn + at Object. (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15) +*/ +``` + + +## API + +### cleanStack(stack, [options]) + +#### stack + +Type: `string` + +The `stack` property of an `Error`. + +#### options + +Type: `Object` + +##### pretty + +Type: `boolean`
+Default: `false` + +Prettify the file paths in the stack: + +`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15` + + +## Related + +- [extrack-stack](https://github.com/sindresorhus/extract-stack) - Extract the actual stack of an error +- [stack-utils](https://github.com/tapjs/stack-utils) - Captures and cleans stack traces + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_commander@2.20.3@commander/CHANGELOG.md b/public/node_modules/_commander@2.20.3@commander/CHANGELOG.md new file mode 100644 index 000000000..7dce779da --- /dev/null +++ b/public/node_modules/_commander@2.20.3@commander/CHANGELOG.md @@ -0,0 +1,419 @@ +2.20.3 / 2019-10-11 +================== + + * Support Node.js 0.10 (Revert #1059) + * Ran "npm unpublish commander@2.20.2". There is no 2.20.2. + +2.20.1 / 2019-09-29 +================== + + * Improve executable subcommand tracking + * Update dev dependencies + +2.20.0 / 2019-04-02 +================== + + * fix: resolve symbolic links completely when hunting for subcommands (#935) + * Update index.d.ts (#930) + * Update Readme.md (#924) + * Remove --save option as it isn't required anymore (#918) + * Add link to the license file (#900) + * Added example of receiving args from options (#858) + * Added missing semicolon (#882) + * Add extension to .eslintrc (#876) + +2.19.0 / 2018-10-02 +================== + + * Removed newline after Options and Commands headers (#864) + * Bugfix - Error output (#862) + * Fix to change default value to string (#856) + +2.18.0 / 2018-09-07 +================== + + * Standardize help output (#853) + * chmod 644 travis.yml (#851) + * add support for execute typescript subcommand via ts-node (#849) + +2.17.1 / 2018-08-07 +================== + + * Fix bug in command emit (#844) + +2.17.0 / 2018-08-03 +================== + + * fixed newline output after help information (#833) + * Fix to emit the action even without command (#778) + * npm update (#823) + +2.16.0 / 2018-06-29 +================== + + * Remove Makefile and `test/run` (#821) + * Make 'npm test' run on Windows (#820) + * Add badge to display install size (#807) + * chore: cache node_modules (#814) + * chore: remove Node.js 4 (EOL), add Node.js 10 (#813) + * fixed typo in readme (#812) + * Fix types (#804) + * Update eslint to resolve vulnerabilities in lodash (#799) + * updated readme with custom event listeners. (#791) + * fix tests (#794) + +2.15.0 / 2018-03-07 +================== + + * Update downloads badge to point to graph of downloads over time instead of duplicating link to npm + * Arguments description + +2.14.1 / 2018-02-07 +================== + + * Fix typing of help function + +2.14.0 / 2018-02-05 +================== + + * only register the option:version event once + * Fixes issue #727: Passing empty string for option on command is set to undefined + * enable eqeqeq rule + * resolves #754 add linter configuration to project + * resolves #560 respect custom name for version option + * document how to override the version flag + * document using options per command + +2.13.0 / 2018-01-09 +================== + + * Do not print default for --no- + * remove trailing spaces in command help + * Update CI's Node.js to LTS and latest version + * typedefs: Command and Option types added to commander namespace + +2.12.2 / 2017-11-28 +================== + + * fix: typings are not shipped + +2.12.1 / 2017-11-23 +================== + + * Move @types/node to dev dependency + +2.12.0 / 2017-11-22 +================== + + * add attributeName() method to Option objects + * Documentation updated for options with --no prefix + * typings: `outputHelp` takes a string as the first parameter + * typings: use overloads + * feat(typings): update to match js api + * Print default value in option help + * Fix translation error + * Fail when using same command and alias (#491) + * feat(typings): add help callback + * fix bug when description is add after command with options (#662) + * Format js code + * Rename History.md to CHANGELOG.md (#668) + * feat(typings): add typings to support TypeScript (#646) + * use current node + +2.11.0 / 2017-07-03 +================== + + * Fix help section order and padding (#652) + * feature: support for signals to subcommands (#632) + * Fixed #37, --help should not display first (#447) + * Fix translation errors. (#570) + * Add package-lock.json + * Remove engines + * Upgrade package version + * Prefix events to prevent conflicts between commands and options (#494) + * Removing dependency on graceful-readlink + * Support setting name in #name function and make it chainable + * Add .vscode directory to .gitignore (Visual Studio Code metadata) + * Updated link to ruby commander in readme files + +2.10.0 / 2017-06-19 +================== + + * Update .travis.yml. drop support for older node.js versions. + * Fix require arguments in README.md + * On SemVer you do not start from 0.0.1 + * Add missing semi colon in readme + * Add save param to npm install + * node v6 travis test + * Update Readme_zh-CN.md + * Allow literal '--' to be passed-through as an argument + * Test subcommand alias help + * link build badge to master branch + * Support the alias of Git style sub-command + * added keyword commander for better search result on npm + * Fix Sub-Subcommands + * test node.js stable + * Fixes TypeError when a command has an option called `--description` + * Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets. + * Add chinese Readme file + +2.9.0 / 2015-10-13 +================== + + * Add option `isDefault` to set default subcommand #415 @Qix- + * Add callback to allow filtering or post-processing of help text #434 @djulien + * Fix `undefined` text in help information close #414 #416 @zhiyelee + +2.8.1 / 2015-04-22 +================== + + * Back out `support multiline description` Close #396 #397 + +2.8.0 / 2015-04-07 +================== + + * Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee + * Fix bug in Git-style sub-commands #372 @zhiyelee + * Allow commands to be hidden from help #383 @tonylukasavage + * When git-style sub-commands are in use, yet none are called, display help #382 @claylo + * Add ability to specify arguments syntax for top-level command #258 @rrthomas + * Support multiline descriptions #208 @zxqfox + +2.7.1 / 2015-03-11 +================== + + * Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367. + +2.7.0 / 2015-03-09 +================== + + * Fix git-style bug when installed globally. Close #335 #349 @zhiyelee + * Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage + * Add support for camelCase on `opts()`. Close #353 @nkzawa + * Add node.js 0.12 and io.js to travis.yml + * Allow RegEx options. #337 @palanik + * Fixes exit code when sub-command failing. Close #260 #332 @pirelenito + * git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee + +2.6.0 / 2014-12-30 +================== + + * added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee + * Add application description to the help msg. Close #112 @dalssoft + +2.5.1 / 2014-12-15 +================== + + * fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee + +2.5.0 / 2014-10-24 +================== + + * add support for variadic arguments. Closes #277 @whitlockjc + +2.4.0 / 2014-10-17 +================== + + * fixed a bug on executing the coercion function of subcommands option. Closes #270 + * added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage + * added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage + * fixed a bug on subcommand name. Closes #248 @jonathandelgado + * fixed function normalize doesn’t honor option terminator. Closes #216 @abbr + +2.3.0 / 2014-07-16 +================== + + * add command alias'. Closes PR #210 + * fix: Typos. Closes #99 + * fix: Unused fs module. Closes #217 + +2.2.0 / 2014-03-29 +================== + + * add passing of previous option value + * fix: support subcommands on windows. Closes #142 + * Now the defaultValue passed as the second argument of the coercion function. + +2.1.0 / 2013-11-21 +================== + + * add: allow cflag style option params, unit test, fixes #174 + +2.0.0 / 2013-07-18 +================== + + * remove input methods (.prompt, .confirm, etc) + +1.3.2 / 2013-07-18 +================== + + * add support for sub-commands to co-exist with the original command + +1.3.1 / 2013-07-18 +================== + + * add quick .runningCommand hack so you can opt-out of other logic when running a sub command + +1.3.0 / 2013-07-09 +================== + + * add EACCES error handling + * fix sub-command --help + +1.2.0 / 2013-06-13 +================== + + * allow "-" hyphen as an option argument + * support for RegExp coercion + +1.1.1 / 2012-11-20 +================== + + * add more sub-command padding + * fix .usage() when args are present. Closes #106 + +1.1.0 / 2012-11-16 +================== + + * add git-style executable subcommand support. Closes #94 + +1.0.5 / 2012-10-09 +================== + + * fix `--name` clobbering. Closes #92 + * fix examples/help. Closes #89 + +1.0.4 / 2012-09-03 +================== + + * add `outputHelp()` method. + +1.0.3 / 2012-08-30 +================== + + * remove invalid .version() defaulting + +1.0.2 / 2012-08-24 +================== + + * add `--foo=bar` support [arv] + * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus] + +1.0.1 / 2012-08-03 +================== + + * fix issue #56 + * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode()) + +1.0.0 / 2012-07-05 +================== + + * add support for optional option descriptions + * add defaulting of `.version()` to package.json's version + +0.6.1 / 2012-06-01 +================== + + * Added: append (yes or no) on confirmation + * Added: allow node.js v0.7.x + +0.6.0 / 2012-04-10 +================== + + * Added `.prompt(obj, callback)` support. Closes #49 + * Added default support to .choose(). Closes #41 + * Fixed the choice example + +0.5.1 / 2011-12-20 +================== + + * Fixed `password()` for recent nodes. Closes #36 + +0.5.0 / 2011-12-04 +================== + + * Added sub-command option support [itay] + +0.4.3 / 2011-12-04 +================== + + * Fixed custom help ordering. Closes #32 + +0.4.2 / 2011-11-24 +================== + + * Added travis support + * Fixed: line-buffered input automatically trimmed. Closes #31 + +0.4.1 / 2011-11-18 +================== + + * Removed listening for "close" on --help + +0.4.0 / 2011-11-15 +================== + + * Added support for `--`. Closes #24 + +0.3.3 / 2011-11-14 +================== + + * Fixed: wait for close event when writing help info [Jerry Hamlet] + +0.3.2 / 2011-11-01 +================== + + * Fixed long flag definitions with values [felixge] + +0.3.1 / 2011-10-31 +================== + + * Changed `--version` short flag to `-V` from `-v` + * Changed `.version()` so it's configurable [felixge] + +0.3.0 / 2011-10-31 +================== + + * Added support for long flags only. Closes #18 + +0.2.1 / 2011-10-24 +================== + + * "node": ">= 0.4.x < 0.7.0". Closes #20 + +0.2.0 / 2011-09-26 +================== + + * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] + +0.1.0 / 2011-08-24 +================== + + * Added support for custom `--help` output + +0.0.5 / 2011-08-18 +================== + + * Changed: when the user enters nothing prompt for password again + * Fixed issue with passwords beginning with numbers [NuckChorris] + +0.0.4 / 2011-08-15 +================== + + * Fixed `Commander#args` + +0.0.3 / 2011-08-15 +================== + + * Added default option value support + +0.0.2 / 2011-08-15 +================== + + * Added mask support to `Command#password(str[, mask], fn)` + * Added `Command#password(str, fn)` + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/public/node_modules/_commander@2.20.3@commander/LICENSE b/public/node_modules/_commander@2.20.3@commander/LICENSE new file mode 100644 index 000000000..10f997ab1 --- /dev/null +++ b/public/node_modules/_commander@2.20.3@commander/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2011 TJ Holowaychuk + +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/public/node_modules/_commander@2.20.3@commander/Readme.md b/public/node_modules/_commander@2.20.3@commander/Readme.md new file mode 100644 index 000000000..c846e7a2d --- /dev/null +++ b/public/node_modules/_commander@2.20.3@commander/Readme.md @@ -0,0 +1,428 @@ +# Commander.js + + +[![Build Status](https://api.travis-ci.org/tj/commander.js.svg?branch=master)](http://travis-ci.org/tj/commander.js) +[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) +[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true) +[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander) +[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + + The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). + [API documentation](http://tj.github.com/commander.js/) + + +## Installation + + $ npm install commander + +## Option parsing + +Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. + +```js +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var program = require('commander'); + +program + .version('0.1.0') + .option('-p, --peppers', 'Add peppers') + .option('-P, --pineapple', 'Add pineapple') + .option('-b, --bbq-sauce', 'Add bbq sauce') + .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') + .parse(process.argv); + +console.log('you ordered a pizza with:'); +if (program.peppers) console.log(' - peppers'); +if (program.pineapple) console.log(' - pineapple'); +if (program.bbqSauce) console.log(' - bbq'); +console.log(' - %s cheese', program.cheese); +``` + +Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. + +Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false. + +```js +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var program = require('commander'); + +program + .option('--no-sauce', 'Remove sauce') + .parse(process.argv); + +console.log('you ordered a pizza'); +if (program.sauce) console.log(' with sauce'); +else console.log(' without sauce'); +``` + +To get string arguments from options you will need to use angle brackets <> for required inputs or square brackets [] for optional inputs. + +e.g. ```.option('-m --myarg [myVar]', 'my super cool description')``` + +Then to access the input if it was passed in. + +e.g. ```var myInput = program.myarg``` + +**NOTE**: If you pass a argument without using brackets the example above will return true and not the value passed in. + + +## Version option + +Calling the `version` implicitly adds the `-V` and `--version` options to the command. +When either of these options is present, the command prints the version number and exits. + + $ ./examples/pizza -V + 0.0.1 + +If you want your program to respond to the `-v` option instead of the `-V` option, simply pass custom flags to the `version` method using the same syntax as the `option` method. + +```js +program + .version('0.0.1', '-v, --version') +``` + +The version flags can be named anything, but the long option is required. + +## Command-specific options + +You can attach options to a command. + +```js +#!/usr/bin/env node + +var program = require('commander'); + +program + .command('rm ') + .option('-r, --recursive', 'Remove recursively') + .action(function (dir, cmd) { + console.log('remove ' + dir + (cmd.recursive ? ' recursively' : '')) + }) + +program.parse(process.argv) +``` + +A command's options are validated when the command is used. Any unknown options will be reported as an error. However, if an action-based command does not define an action, then the options are not validated. + +## Coercion + +```js +function range(val) { + return val.split('..').map(Number); +} + +function list(val) { + return val.split(','); +} + +function collect(val, memo) { + memo.push(val); + return memo; +} + +function increaseVerbosity(v, total) { + return total + 1; +} + +program + .version('0.1.0') + .usage('[options] ') + .option('-i, --integer ', 'An integer argument', parseInt) + .option('-f, --float ', 'A float argument', parseFloat) + .option('-r, --range ..', 'A range', range) + .option('-l, --list ', 'A list', list) + .option('-o, --optional [value]', 'An optional value') + .option('-c, --collect [value]', 'A repeatable value', collect, []) + .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0) + .parse(process.argv); + +console.log(' int: %j', program.integer); +console.log(' float: %j', program.float); +console.log(' optional: %j', program.optional); +program.range = program.range || []; +console.log(' range: %j..%j', program.range[0], program.range[1]); +console.log(' list: %j', program.list); +console.log(' collect: %j', program.collect); +console.log(' verbosity: %j', program.verbose); +console.log(' args: %j', program.args); +``` + +## Regular Expression +```js +program + .version('0.1.0') + .option('-s --size ', 'Pizza size', /^(large|medium|small)$/i, 'medium') + .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i) + .parse(process.argv); + +console.log(' size: %j', program.size); +console.log(' drink: %j', program.drink); +``` + +## Variadic arguments + + The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to + append `...` to the argument name. Here is an example: + +```js +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var program = require('commander'); + +program + .version('0.1.0') + .command('rmdir [otherDirs...]') + .action(function (dir, otherDirs) { + console.log('rmdir %s', dir); + if (otherDirs) { + otherDirs.forEach(function (oDir) { + console.log('rmdir %s', oDir); + }); + } + }); + +program.parse(process.argv); +``` + + An `Array` is used for the value of a variadic argument. This applies to `program.args` as well as the argument passed + to your action as demonstrated above. + +## Specify the argument syntax + +```js +#!/usr/bin/env node + +var program = require('commander'); + +program + .version('0.1.0') + .arguments(' [env]') + .action(function (cmd, env) { + cmdValue = cmd; + envValue = env; + }); + +program.parse(process.argv); + +if (typeof cmdValue === 'undefined') { + console.error('no command given!'); + process.exit(1); +} +console.log('command:', cmdValue); +console.log('environment:', envValue || "no environment given"); +``` +Angled brackets (e.g. ``) indicate required input. Square brackets (e.g. `[env]`) indicate optional input. + +## Git-style sub-commands + +```js +// file: ./examples/pm +var program = require('commander'); + +program + .version('0.1.0') + .command('install [name]', 'install one or more packages') + .command('search [query]', 'search with optional query') + .command('list', 'list packages installed', {isDefault: true}) + .parse(process.argv); +``` + +When `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools. +The commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`. + +Options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the subcommand from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified. + +If the program is designed to be installed globally, make sure the executables have proper modes, like `755`. + +### `--harmony` + +You can enable `--harmony` option in two ways: +* Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. Note some os version don’t support this pattern. +* Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process. + +## Automated --help + + The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: + +``` +$ ./examples/pizza --help +Usage: pizza [options] + +An application for pizzas ordering + +Options: + -h, --help output usage information + -V, --version output the version number + -p, --peppers Add peppers + -P, --pineapple Add pineapple + -b, --bbq Add bbq sauce + -c, --cheese Add the specified type of cheese [marble] + -C, --no-cheese You do not want any cheese +``` + +## Custom help + + You can display arbitrary `-h, --help` information + by listening for "--help". Commander will automatically + exit once you are done so that the remainder of your program + does not execute causing undesired behaviors, for example + in the following executable "stuff" will not output when + `--help` is used. + +```js +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var program = require('commander'); + +program + .version('0.1.0') + .option('-f, --foo', 'enable some foo') + .option('-b, --bar', 'enable some bar') + .option('-B, --baz', 'enable some baz'); + +// must be before .parse() since +// node's emit() is immediate + +program.on('--help', function(){ + console.log('') + console.log('Examples:'); + console.log(' $ custom-help --help'); + console.log(' $ custom-help -h'); +}); + +program.parse(process.argv); + +console.log('stuff'); +``` + +Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run: + +``` +Usage: custom-help [options] + +Options: + -h, --help output usage information + -V, --version output the version number + -f, --foo enable some foo + -b, --bar enable some bar + -B, --baz enable some baz + +Examples: + $ custom-help --help + $ custom-help -h +``` + +## .outputHelp(cb) + +Output help information without exiting. +Optional callback cb allows post-processing of help text before it is displayed. + +If you want to display help by default (e.g. if no command was provided), you can use something like: + +```js +var program = require('commander'); +var colors = require('colors'); + +program + .version('0.1.0') + .command('getstream [url]', 'get stream URL') + .parse(process.argv); + +if (!process.argv.slice(2).length) { + program.outputHelp(make_red); +} + +function make_red(txt) { + return colors.red(txt); //display the help text in red on the console +} +``` + +## .help(cb) + + Output help information and exit immediately. + Optional callback cb allows post-processing of help text before it is displayed. + + +## Custom event listeners + You can execute custom actions by listening to command and option events. + +```js +program.on('option:verbose', function () { + process.env.VERBOSE = this.verbose; +}); + +// error on unknown commands +program.on('command:*', function () { + console.error('Invalid command: %s\nSee --help for a list of available commands.', program.args.join(' ')); + process.exit(1); +}); +``` + +## Examples + +```js +var program = require('commander'); + +program + .version('0.1.0') + .option('-C, --chdir ', 'change the working directory') + .option('-c, --config ', 'set config path. defaults to ./deploy.conf') + .option('-T, --no-tests', 'ignore test hook'); + +program + .command('setup [env]') + .description('run setup commands for all envs') + .option("-s, --setup_mode [mode]", "Which setup mode to use") + .action(function(env, options){ + var mode = options.setup_mode || "normal"; + env = env || 'all'; + console.log('setup for %s env(s) with %s mode', env, mode); + }); + +program + .command('exec ') + .alias('ex') + .description('execute the given remote cmd') + .option("-e, --exec_mode ", "Which exec mode to use") + .action(function(cmd, options){ + console.log('exec "%s" using %s mode', cmd, options.exec_mode); + }).on('--help', function() { + console.log(''); + console.log('Examples:'); + console.log(''); + console.log(' $ deploy exec sequential'); + console.log(' $ deploy exec async'); + }); + +program + .command('*') + .action(function(env){ + console.log('deploying "%s"', env); + }); + +program.parse(process.argv); +``` + +More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory. + +## License + +[MIT](https://github.com/tj/commander.js/blob/master/LICENSE) diff --git a/public/node_modules/_commander@2.20.3@commander/index.js b/public/node_modules/_commander@2.20.3@commander/index.js new file mode 100644 index 000000000..ec1d61d58 --- /dev/null +++ b/public/node_modules/_commander@2.20.3@commander/index.js @@ -0,0 +1,1224 @@ +/** + * Module dependencies. + */ + +var EventEmitter = require('events').EventEmitter; +var spawn = require('child_process').spawn; +var path = require('path'); +var dirname = path.dirname; +var basename = path.basename; +var fs = require('fs'); + +/** + * Inherit `Command` from `EventEmitter.prototype`. + */ + +require('util').inherits(Command, EventEmitter); + +/** + * Expose the root command. + */ + +exports = module.exports = new Command(); + +/** + * Expose `Command`. + */ + +exports.Command = Command; + +/** + * Expose `Option`. + */ + +exports.Option = Option; + +/** + * Initialize a new `Option` with the given `flags` and `description`. + * + * @param {String} flags + * @param {String} description + * @api public + */ + +function Option(flags, description) { + this.flags = flags; + this.required = flags.indexOf('<') >= 0; + this.optional = flags.indexOf('[') >= 0; + this.bool = flags.indexOf('-no-') === -1; + flags = flags.split(/[ ,|]+/); + if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); + this.long = flags.shift(); + this.description = description || ''; +} + +/** + * Return option name. + * + * @return {String} + * @api private + */ + +Option.prototype.name = function() { + return this.long + .replace('--', '') + .replace('no-', ''); +}; + +/** + * Return option name, in a camelcase format that can be used + * as a object attribute key. + * + * @return {String} + * @api private + */ + +Option.prototype.attributeName = function() { + return camelcase(this.name()); +}; + +/** + * Check if `arg` matches the short or long flag. + * + * @param {String} arg + * @return {Boolean} + * @api private + */ + +Option.prototype.is = function(arg) { + return this.short === arg || this.long === arg; +}; + +/** + * Initialize a new `Command`. + * + * @param {String} name + * @api public + */ + +function Command(name) { + this.commands = []; + this.options = []; + this._execs = {}; + this._allowUnknownOption = false; + this._args = []; + this._name = name || ''; +} + +/** + * Add command `name`. + * + * The `.action()` callback is invoked when the + * command `name` is specified via __ARGV__, + * and the remaining arguments are applied to the + * function for access. + * + * When the `name` is "*" an un-matched command + * will be passed as the first arg, followed by + * the rest of __ARGV__ remaining. + * + * Examples: + * + * program + * .version('0.0.1') + * .option('-C, --chdir ', 'change the working directory') + * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') + * .option('-T, --no-tests', 'ignore test hook') + * + * program + * .command('setup') + * .description('run remote setup commands') + * .action(function() { + * console.log('setup'); + * }); + * + * program + * .command('exec ') + * .description('run the given remote command') + * .action(function(cmd) { + * console.log('exec "%s"', cmd); + * }); + * + * program + * .command('teardown [otherDirs...]') + * .description('run teardown commands') + * .action(function(dir, otherDirs) { + * console.log('dir "%s"', dir); + * if (otherDirs) { + * otherDirs.forEach(function (oDir) { + * console.log('dir "%s"', oDir); + * }); + * } + * }); + * + * program + * .command('*') + * .description('deploy the given env') + * .action(function(env) { + * console.log('deploying "%s"', env); + * }); + * + * program.parse(process.argv); + * + * @param {String} name + * @param {String} [desc] for git-style sub-commands + * @return {Command} the new command + * @api public + */ + +Command.prototype.command = function(name, desc, opts) { + if (typeof desc === 'object' && desc !== null) { + opts = desc; + desc = null; + } + opts = opts || {}; + var args = name.split(/ +/); + var cmd = new Command(args.shift()); + + if (desc) { + cmd.description(desc); + this.executables = true; + this._execs[cmd._name] = true; + if (opts.isDefault) this.defaultExecutable = cmd._name; + } + cmd._noHelp = !!opts.noHelp; + this.commands.push(cmd); + cmd.parseExpectedArgs(args); + cmd.parent = this; + + if (desc) return this; + return cmd; +}; + +/** + * Define argument syntax for the top-level command. + * + * @api public + */ + +Command.prototype.arguments = function(desc) { + return this.parseExpectedArgs(desc.split(/ +/)); +}; + +/** + * Add an implicit `help [cmd]` subcommand + * which invokes `--help` for the given command. + * + * @api private + */ + +Command.prototype.addImplicitHelpCommand = function() { + this.command('help [cmd]', 'display help for [cmd]'); +}; + +/** + * Parse expected `args`. + * + * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. + * + * @param {Array} args + * @return {Command} for chaining + * @api public + */ + +Command.prototype.parseExpectedArgs = function(args) { + if (!args.length) return; + var self = this; + args.forEach(function(arg) { + var argDetails = { + required: false, + name: '', + variadic: false + }; + + switch (arg[0]) { + case '<': + argDetails.required = true; + argDetails.name = arg.slice(1, -1); + break; + case '[': + argDetails.name = arg.slice(1, -1); + break; + } + + if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') { + argDetails.variadic = true; + argDetails.name = argDetails.name.slice(0, -3); + } + if (argDetails.name) { + self._args.push(argDetails); + } + }); + return this; +}; + +/** + * Register callback `fn` for the command. + * + * Examples: + * + * program + * .command('help') + * .description('display verbose help') + * .action(function() { + * // output help here + * }); + * + * @param {Function} fn + * @return {Command} for chaining + * @api public + */ + +Command.prototype.action = function(fn) { + var self = this; + var listener = function(args, unknown) { + // Parse any so-far unknown options + args = args || []; + unknown = unknown || []; + + var parsed = self.parseOptions(unknown); + + // Output help if necessary + outputHelpIfNecessary(self, parsed.unknown); + + // If there are still any unknown options, then we simply + // die, unless someone asked for help, in which case we give it + // to them, and then we die. + if (parsed.unknown.length > 0) { + self.unknownOption(parsed.unknown[0]); + } + + // Leftover arguments need to be pushed back. Fixes issue #56 + if (parsed.args.length) args = parsed.args.concat(args); + + self._args.forEach(function(arg, i) { + if (arg.required && args[i] == null) { + self.missingArgument(arg.name); + } else if (arg.variadic) { + if (i !== self._args.length - 1) { + self.variadicArgNotLast(arg.name); + } + + args[i] = args.splice(i); + } + }); + + // Always append ourselves to the end of the arguments, + // to make sure we match the number of arguments the user + // expects + if (self._args.length) { + args[self._args.length] = self; + } else { + args.push(self); + } + + fn.apply(self, args); + }; + var parent = this.parent || this; + var name = parent === this ? '*' : this._name; + parent.on('command:' + name, listener); + if (this._alias) parent.on('command:' + this._alias, listener); + return this; +}; + +/** + * Define option with `flags`, `description` and optional + * coercion `fn`. + * + * The `flags` string should contain both the short and long flags, + * separated by comma, a pipe or space. The following are all valid + * all will output this way when `--help` is used. + * + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" + * + * Examples: + * + * // simple boolean defaulting to false + * program.option('-p, --pepper', 'add pepper'); + * + * --pepper + * program.pepper + * // => Boolean + * + * // simple boolean defaulting to true + * program.option('-C, --no-cheese', 'remove cheese'); + * + * program.cheese + * // => true + * + * --no-cheese + * program.cheese + * // => false + * + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); + * + * --chdir /tmp + * program.chdir + * // => "/tmp" + * + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * + * @param {String} flags + * @param {String} description + * @param {Function|*} [fn] or default + * @param {*} [defaultValue] + * @return {Command} for chaining + * @api public + */ + +Command.prototype.option = function(flags, description, fn, defaultValue) { + var self = this, + option = new Option(flags, description), + oname = option.name(), + name = option.attributeName(); + + // default as 3rd arg + if (typeof fn !== 'function') { + if (fn instanceof RegExp) { + var regex = fn; + fn = function(val, def) { + var m = regex.exec(val); + return m ? m[0] : def; + }; + } else { + defaultValue = fn; + fn = null; + } + } + + // preassign default value only for --no-*, [optional], or + if (!option.bool || option.optional || option.required) { + // when --no-* we make sure default is true + if (!option.bool) defaultValue = true; + // preassign only if we have a default + if (defaultValue !== undefined) { + self[name] = defaultValue; + option.defaultValue = defaultValue; + } + } + + // register the option + this.options.push(option); + + // when it's passed assign the value + // and conditionally invoke the callback + this.on('option:' + oname, function(val) { + // coercion + if (val !== null && fn) { + val = fn(val, self[name] === undefined ? defaultValue : self[name]); + } + + // unassigned or bool + if (typeof self[name] === 'boolean' || typeof self[name] === 'undefined') { + // if no value, bool true, and we have a default, then use it! + if (val == null) { + self[name] = option.bool + ? defaultValue || true + : false; + } else { + self[name] = val; + } + } else if (val !== null) { + // reassign + self[name] = val; + } + }); + + return this; +}; + +/** + * Allow unknown options on the command line. + * + * @param {Boolean} arg if `true` or omitted, no error will be thrown + * for unknown options. + * @api public + */ +Command.prototype.allowUnknownOption = function(arg) { + this._allowUnknownOption = arguments.length === 0 || arg; + return this; +}; + +/** + * Parse `argv`, settings options and invoking commands when defined. + * + * @param {Array} argv + * @return {Command} for chaining + * @api public + */ + +Command.prototype.parse = function(argv) { + // implicit help + if (this.executables) this.addImplicitHelpCommand(); + + // store raw args + this.rawArgs = argv; + + // guess name + this._name = this._name || basename(argv[1], '.js'); + + // github-style sub-commands with no sub-command + if (this.executables && argv.length < 3 && !this.defaultExecutable) { + // this user needs help + argv.push('--help'); + } + + // process argv + var parsed = this.parseOptions(this.normalize(argv.slice(2))); + var args = this.args = parsed.args; + + var result = this.parseArgs(this.args, parsed.unknown); + + // executable sub-commands + var name = result.args[0]; + + var aliasCommand = null; + // check alias of sub commands + if (name) { + aliasCommand = this.commands.filter(function(command) { + return command.alias() === name; + })[0]; + } + + if (this._execs[name] === true) { + return this.executeSubCommand(argv, args, parsed.unknown); + } else if (aliasCommand) { + // is alias of a subCommand + args[0] = aliasCommand._name; + return this.executeSubCommand(argv, args, parsed.unknown); + } else if (this.defaultExecutable) { + // use the default subcommand + args.unshift(this.defaultExecutable); + return this.executeSubCommand(argv, args, parsed.unknown); + } + + return result; +}; + +/** + * Execute a sub-command executable. + * + * @param {Array} argv + * @param {Array} args + * @param {Array} unknown + * @api private + */ + +Command.prototype.executeSubCommand = function(argv, args, unknown) { + args = args.concat(unknown); + + if (!args.length) this.help(); + if (args[0] === 'help' && args.length === 1) this.help(); + + // --help + if (args[0] === 'help') { + args[0] = args[1]; + args[1] = '--help'; + } + + // executable + var f = argv[1]; + // name of the subcommand, link `pm-install` + var bin = basename(f, path.extname(f)) + '-' + args[0]; + + // In case of globally installed, get the base dir where executable + // subcommand file should be located at + var baseDir; + + var resolvedLink = fs.realpathSync(f); + + baseDir = dirname(resolvedLink); + + // prefer local `./` to bin in the $PATH + var localBin = path.join(baseDir, bin); + + // whether bin file is a js script with explicit `.js` or `.ts` extension + var isExplicitJS = false; + if (exists(localBin + '.js')) { + bin = localBin + '.js'; + isExplicitJS = true; + } else if (exists(localBin + '.ts')) { + bin = localBin + '.ts'; + isExplicitJS = true; + } else if (exists(localBin)) { + bin = localBin; + } + + args = args.slice(1); + + var proc; + if (process.platform !== 'win32') { + if (isExplicitJS) { + args.unshift(bin); + // add executable arguments to spawn + args = (process.execArgv || []).concat(args); + + proc = spawn(process.argv[0], args, { stdio: 'inherit', customFds: [0, 1, 2] }); + } else { + proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] }); + } + } else { + args.unshift(bin); + proc = spawn(process.execPath, args, { stdio: 'inherit' }); + } + + var signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; + signals.forEach(function(signal) { + process.on(signal, function() { + if (proc.killed === false && proc.exitCode === null) { + proc.kill(signal); + } + }); + }); + proc.on('close', process.exit.bind(process)); + proc.on('error', function(err) { + if (err.code === 'ENOENT') { + console.error('error: %s(1) does not exist, try --help', bin); + } else if (err.code === 'EACCES') { + console.error('error: %s(1) not executable. try chmod or run with root', bin); + } + process.exit(1); + }); + + // Store the reference to the child process + this.runningCommand = proc; +}; + +/** + * Normalize `args`, splitting joined short flags. For example + * the arg "-abc" is equivalent to "-a -b -c". + * This also normalizes equal sign and splits "--abc=def" into "--abc def". + * + * @param {Array} args + * @return {Array} + * @api private + */ + +Command.prototype.normalize = function(args) { + var ret = [], + arg, + lastOpt, + index; + + for (var i = 0, len = args.length; i < len; ++i) { + arg = args[i]; + if (i > 0) { + lastOpt = this.optionFor(args[i - 1]); + } + + if (arg === '--') { + // Honor option terminator + ret = ret.concat(args.slice(i)); + break; + } else if (lastOpt && lastOpt.required) { + ret.push(arg); + } else if (arg.length > 1 && arg[0] === '-' && arg[1] !== '-') { + arg.slice(1).split('').forEach(function(c) { + ret.push('-' + c); + }); + } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { + ret.push(arg.slice(0, index), arg.slice(index + 1)); + } else { + ret.push(arg); + } + } + + return ret; +}; + +/** + * Parse command `args`. + * + * When listener(s) are available those + * callbacks are invoked, otherwise the "*" + * event is emitted and those actions are invoked. + * + * @param {Array} args + * @return {Command} for chaining + * @api private + */ + +Command.prototype.parseArgs = function(args, unknown) { + var name; + + if (args.length) { + name = args[0]; + if (this.listeners('command:' + name).length) { + this.emit('command:' + args.shift(), args, unknown); + } else { + this.emit('command:*', args); + } + } else { + outputHelpIfNecessary(this, unknown); + + // If there were no args and we have unknown options, + // then they are extraneous and we need to error. + if (unknown.length > 0) { + this.unknownOption(unknown[0]); + } + if (this.commands.length === 0 && + this._args.filter(function(a) { return a.required; }).length === 0) { + this.emit('command:*'); + } + } + + return this; +}; + +/** + * Return an option matching `arg` if any. + * + * @param {String} arg + * @return {Option} + * @api private + */ + +Command.prototype.optionFor = function(arg) { + for (var i = 0, len = this.options.length; i < len; ++i) { + if (this.options[i].is(arg)) { + return this.options[i]; + } + } +}; + +/** + * Parse options from `argv` returning `argv` + * void of these options. + * + * @param {Array} argv + * @return {Array} + * @api public + */ + +Command.prototype.parseOptions = function(argv) { + var args = [], + len = argv.length, + literal, + option, + arg; + + var unknownOptions = []; + + // parse options + for (var i = 0; i < len; ++i) { + arg = argv[i]; + + // literal args after -- + if (literal) { + args.push(arg); + continue; + } + + if (arg === '--') { + literal = true; + continue; + } + + // find matching Option + option = this.optionFor(arg); + + // option is defined + if (option) { + // requires arg + if (option.required) { + arg = argv[++i]; + if (arg == null) return this.optionMissingArgument(option); + this.emit('option:' + option.name(), arg); + // optional arg + } else if (option.optional) { + arg = argv[i + 1]; + if (arg == null || (arg[0] === '-' && arg !== '-')) { + arg = null; + } else { + ++i; + } + this.emit('option:' + option.name(), arg); + // bool + } else { + this.emit('option:' + option.name()); + } + continue; + } + + // looks like an option + if (arg.length > 1 && arg[0] === '-') { + unknownOptions.push(arg); + + // If the next argument looks like it might be + // an argument for this option, we pass it on. + // If it isn't, then it'll simply be ignored + if ((i + 1) < argv.length && argv[i + 1][0] !== '-') { + unknownOptions.push(argv[++i]); + } + continue; + } + + // arg + args.push(arg); + } + + return { args: args, unknown: unknownOptions }; +}; + +/** + * Return an object containing options as key-value pairs + * + * @return {Object} + * @api public + */ +Command.prototype.opts = function() { + var result = {}, + len = this.options.length; + + for (var i = 0; i < len; i++) { + var key = this.options[i].attributeName(); + result[key] = key === this._versionOptionName ? this._version : this[key]; + } + return result; +}; + +/** + * Argument `name` is missing. + * + * @param {String} name + * @api private + */ + +Command.prototype.missingArgument = function(name) { + console.error("error: missing required argument `%s'", name); + process.exit(1); +}; + +/** + * `Option` is missing an argument, but received `flag` or nothing. + * + * @param {String} option + * @param {String} flag + * @api private + */ + +Command.prototype.optionMissingArgument = function(option, flag) { + if (flag) { + console.error("error: option `%s' argument missing, got `%s'", option.flags, flag); + } else { + console.error("error: option `%s' argument missing", option.flags); + } + process.exit(1); +}; + +/** + * Unknown option `flag`. + * + * @param {String} flag + * @api private + */ + +Command.prototype.unknownOption = function(flag) { + if (this._allowUnknownOption) return; + console.error("error: unknown option `%s'", flag); + process.exit(1); +}; + +/** + * Variadic argument with `name` is not the last argument as required. + * + * @param {String} name + * @api private + */ + +Command.prototype.variadicArgNotLast = function(name) { + console.error("error: variadic arguments must be last `%s'", name); + process.exit(1); +}; + +/** + * Set the program version to `str`. + * + * This method auto-registers the "-V, --version" flag + * which will print the version number when passed. + * + * @param {String} str + * @param {String} [flags] + * @return {Command} for chaining + * @api public + */ + +Command.prototype.version = function(str, flags) { + if (arguments.length === 0) return this._version; + this._version = str; + flags = flags || '-V, --version'; + var versionOption = new Option(flags, 'output the version number'); + this._versionOptionName = versionOption.long.substr(2) || 'version'; + this.options.push(versionOption); + this.on('option:' + this._versionOptionName, function() { + process.stdout.write(str + '\n'); + process.exit(0); + }); + return this; +}; + +/** + * Set the description to `str`. + * + * @param {String} str + * @param {Object} argsDescription + * @return {String|Command} + * @api public + */ + +Command.prototype.description = function(str, argsDescription) { + if (arguments.length === 0) return this._description; + this._description = str; + this._argsDescription = argsDescription; + return this; +}; + +/** + * Set an alias for the command + * + * @param {String} alias + * @return {String|Command} + * @api public + */ + +Command.prototype.alias = function(alias) { + var command = this; + if (this.commands.length !== 0) { + command = this.commands[this.commands.length - 1]; + } + + if (arguments.length === 0) return command._alias; + + if (alias === command._name) throw new Error('Command alias can\'t be the same as its name'); + + command._alias = alias; + return this; +}; + +/** + * Set / get the command usage `str`. + * + * @param {String} str + * @return {String|Command} + * @api public + */ + +Command.prototype.usage = function(str) { + var args = this._args.map(function(arg) { + return humanReadableArgName(arg); + }); + + var usage = '[options]' + + (this.commands.length ? ' [command]' : '') + + (this._args.length ? ' ' + args.join(' ') : ''); + + if (arguments.length === 0) return this._usage || usage; + this._usage = str; + + return this; +}; + +/** + * Get or set the name of the command + * + * @param {String} str + * @return {String|Command} + * @api public + */ + +Command.prototype.name = function(str) { + if (arguments.length === 0) return this._name; + this._name = str; + return this; +}; + +/** + * Return prepared commands. + * + * @return {Array} + * @api private + */ + +Command.prototype.prepareCommands = function() { + return this.commands.filter(function(cmd) { + return !cmd._noHelp; + }).map(function(cmd) { + var args = cmd._args.map(function(arg) { + return humanReadableArgName(arg); + }).join(' '); + + return [ + cmd._name + + (cmd._alias ? '|' + cmd._alias : '') + + (cmd.options.length ? ' [options]' : '') + + (args ? ' ' + args : ''), + cmd._description + ]; + }); +}; + +/** + * Return the largest command length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestCommandLength = function() { + var commands = this.prepareCommands(); + return commands.reduce(function(max, command) { + return Math.max(max, command[0].length); + }, 0); +}; + +/** + * Return the largest option length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestOptionLength = function() { + var options = [].slice.call(this.options); + options.push({ + flags: '-h, --help' + }); + return options.reduce(function(max, option) { + return Math.max(max, option.flags.length); + }, 0); +}; + +/** + * Return the largest arg length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestArgLength = function() { + return this._args.reduce(function(max, arg) { + return Math.max(max, arg.name.length); + }, 0); +}; + +/** + * Return the pad width. + * + * @return {Number} + * @api private + */ + +Command.prototype.padWidth = function() { + var width = this.largestOptionLength(); + if (this._argsDescription && this._args.length) { + if (this.largestArgLength() > width) { + width = this.largestArgLength(); + } + } + + if (this.commands && this.commands.length) { + if (this.largestCommandLength() > width) { + width = this.largestCommandLength(); + } + } + + return width; +}; + +/** + * Return help for options. + * + * @return {String} + * @api private + */ + +Command.prototype.optionHelp = function() { + var width = this.padWidth(); + + // Append the help information + return this.options.map(function(option) { + return pad(option.flags, width) + ' ' + option.description + + ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : ''); + }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) + .join('\n'); +}; + +/** + * Return command help documentation. + * + * @return {String} + * @api private + */ + +Command.prototype.commandHelp = function() { + if (!this.commands.length) return ''; + + var commands = this.prepareCommands(); + var width = this.padWidth(); + + return [ + 'Commands:', + commands.map(function(cmd) { + var desc = cmd[1] ? ' ' + cmd[1] : ''; + return (desc ? pad(cmd[0], width) : cmd[0]) + desc; + }).join('\n').replace(/^/gm, ' '), + '' + ].join('\n'); +}; + +/** + * Return program help documentation. + * + * @return {String} + * @api private + */ + +Command.prototype.helpInformation = function() { + var desc = []; + if (this._description) { + desc = [ + this._description, + '' + ]; + + var argsDescription = this._argsDescription; + if (argsDescription && this._args.length) { + var width = this.padWidth(); + desc.push('Arguments:'); + desc.push(''); + this._args.forEach(function(arg) { + desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]); + }); + desc.push(''); + } + } + + var cmdName = this._name; + if (this._alias) { + cmdName = cmdName + '|' + this._alias; + } + var usage = [ + 'Usage: ' + cmdName + ' ' + this.usage(), + '' + ]; + + var cmds = []; + var commandHelp = this.commandHelp(); + if (commandHelp) cmds = [commandHelp]; + + var options = [ + 'Options:', + '' + this.optionHelp().replace(/^/gm, ' '), + '' + ]; + + return usage + .concat(desc) + .concat(options) + .concat(cmds) + .join('\n'); +}; + +/** + * Output help information for this command + * + * @api public + */ + +Command.prototype.outputHelp = function(cb) { + if (!cb) { + cb = function(passthru) { + return passthru; + }; + } + process.stdout.write(cb(this.helpInformation())); + this.emit('--help'); +}; + +/** + * Output help information and exit. + * + * @api public + */ + +Command.prototype.help = function(cb) { + this.outputHelp(cb); + process.exit(); +}; + +/** + * Camel-case the given `flag` + * + * @param {String} flag + * @return {String} + * @api private + */ + +function camelcase(flag) { + return flag.split('-').reduce(function(str, word) { + return str + word[0].toUpperCase() + word.slice(1); + }); +} + +/** + * Pad `str` to `width`. + * + * @param {String} str + * @param {Number} width + * @return {String} + * @api private + */ + +function pad(str, width) { + var len = Math.max(0, width - str.length); + return str + Array(len + 1).join(' '); +} + +/** + * Output help information if necessary + * + * @param {Command} command to output help for + * @param {Array} array of options to search for -h or --help + * @api private + */ + +function outputHelpIfNecessary(cmd, options) { + options = options || []; + for (var i = 0; i < options.length; i++) { + if (options[i] === '--help' || options[i] === '-h') { + cmd.outputHelp(); + process.exit(0); + } + } +} + +/** + * Takes an argument an returns its human readable equivalent for help usage. + * + * @param {Object} arg + * @return {String} + * @api private + */ + +function humanReadableArgName(arg) { + var nameOutput = arg.name + (arg.variadic === true ? '...' : ''); + + return arg.required + ? '<' + nameOutput + '>' + : '[' + nameOutput + ']'; +} + +// for versions before node v0.8 when there weren't `fs.existsSync` +function exists(file) { + try { + if (fs.statSync(file).isFile()) { + return true; + } + } catch (e) { + return false; + } +} diff --git a/public/node_modules/_commander@2.20.3@commander/package.json b/public/node_modules/_commander@2.20.3@commander/package.json new file mode 100644 index 000000000..609f618ce --- /dev/null +++ b/public/node_modules/_commander@2.20.3@commander/package.json @@ -0,0 +1,41 @@ +{ + "name": "commander", + "version": "2.20.3", + "description": "the complete solution for node.js command-line programs", + "keywords": [ + "commander", + "command", + "option", + "parser" + ], + "author": "TJ Holowaychuk ", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tj/commander.js.git" + }, + "scripts": { + "lint": "eslint index.js", + "test": "node test/run.js && npm run test-typings", + "test-typings": "tsc -p tsconfig.json" + }, + "main": "index", + "files": [ + "index.js", + "typings/index.d.ts" + ], + "dependencies": {}, + "devDependencies": { + "@types/node": "^12.7.8", + "eslint": "^6.4.0", + "should": "^13.2.3", + "sinon": "^7.5.0", + "standard": "^14.3.1", + "ts-node": "^8.4.1", + "typescript": "^3.6.3" + }, + "typings": "typings/index.d.ts", + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "commander@2.20.3", + "_resolved": "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1573491333242&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_commander@2.20.3@commander/typings/index.d.ts b/public/node_modules/_commander@2.20.3@commander/typings/index.d.ts new file mode 100644 index 000000000..bcda2771e --- /dev/null +++ b/public/node_modules/_commander@2.20.3@commander/typings/index.d.ts @@ -0,0 +1,310 @@ +// Type definitions for commander 2.11 +// Project: https://github.com/visionmedia/commander.js +// Definitions by: Alan Agius , Marcelo Dezem , vvakame , Jules Randolph +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace local { + + class Option { + flags: string; + required: boolean; + optional: boolean; + bool: boolean; + short?: string; + long: string; + description: string; + + /** + * Initialize a new `Option` with the given `flags` and `description`. + * + * @param {string} flags + * @param {string} [description] + */ + constructor(flags: string, description?: string); + } + + class Command extends NodeJS.EventEmitter { + [key: string]: any; + + args: string[]; + + /** + * Initialize a new `Command`. + * + * @param {string} [name] + */ + constructor(name?: string); + + /** + * Set the program version to `str`. + * + * This method auto-registers the "-V, --version" flag + * which will print the version number when passed. + * + * @param {string} str + * @param {string} [flags] + * @returns {Command} for chaining + */ + version(str: string, flags?: string): Command; + + /** + * Add command `name`. + * + * The `.action()` callback is invoked when the + * command `name` is specified via __ARGV__, + * and the remaining arguments are applied to the + * function for access. + * + * When the `name` is "*" an un-matched command + * will be passed as the first arg, followed by + * the rest of __ARGV__ remaining. + * + * @example + * program + * .version('0.0.1') + * .option('-C, --chdir ', 'change the working directory') + * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') + * .option('-T, --no-tests', 'ignore test hook') + * + * program + * .command('setup') + * .description('run remote setup commands') + * .action(function() { + * console.log('setup'); + * }); + * + * program + * .command('exec ') + * .description('run the given remote command') + * .action(function(cmd) { + * console.log('exec "%s"', cmd); + * }); + * + * program + * .command('teardown [otherDirs...]') + * .description('run teardown commands') + * .action(function(dir, otherDirs) { + * console.log('dir "%s"', dir); + * if (otherDirs) { + * otherDirs.forEach(function (oDir) { + * console.log('dir "%s"', oDir); + * }); + * } + * }); + * + * program + * .command('*') + * .description('deploy the given env') + * .action(function(env) { + * console.log('deploying "%s"', env); + * }); + * + * program.parse(process.argv); + * + * @param {string} name + * @param {string} [desc] for git-style sub-commands + * @param {CommandOptions} [opts] command options + * @returns {Command} the new command + */ + command(name: string, desc?: string, opts?: commander.CommandOptions): Command; + + /** + * Define argument syntax for the top-level command. + * + * @param {string} desc + * @returns {Command} for chaining + */ + arguments(desc: string): Command; + + /** + * Parse expected `args`. + * + * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. + * + * @param {string[]} args + * @returns {Command} for chaining + */ + parseExpectedArgs(args: string[]): Command; + + /** + * Register callback `fn` for the command. + * + * @example + * program + * .command('help') + * .description('display verbose help') + * .action(function() { + * // output help here + * }); + * + * @param {(...args: any[]) => void} fn + * @returns {Command} for chaining + */ + action(fn: (...args: any[]) => void): Command; + + /** + * Define option with `flags`, `description` and optional + * coercion `fn`. + * + * The `flags` string should contain both the short and long flags, + * separated by comma, a pipe or space. The following are all valid + * all will output this way when `--help` is used. + * + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" + * + * @example + * // simple boolean defaulting to false + * program.option('-p, --pepper', 'add pepper'); + * + * --pepper + * program.pepper + * // => Boolean + * + * // simple boolean defaulting to true + * program.option('-C, --no-cheese', 'remove cheese'); + * + * program.cheese + * // => true + * + * --no-cheese + * program.cheese + * // => false + * + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); + * + * --chdir /tmp + * program.chdir + * // => "/tmp" + * + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * + * @param {string} flags + * @param {string} [description] + * @param {((arg1: any, arg2: any) => void) | RegExp} [fn] function or default + * @param {*} [defaultValue] + * @returns {Command} for chaining + */ + option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; + option(flags: string, description?: string, defaultValue?: any): Command; + + /** + * Allow unknown options on the command line. + * + * @param {boolean} [arg] if `true` or omitted, no error will be thrown for unknown options. + * @returns {Command} for chaining + */ + allowUnknownOption(arg?: boolean): Command; + + /** + * Parse `argv`, settings options and invoking commands when defined. + * + * @param {string[]} argv + * @returns {Command} for chaining + */ + parse(argv: string[]): Command; + + /** + * Parse options from `argv` returning `argv` void of these options. + * + * @param {string[]} argv + * @returns {ParseOptionsResult} + */ + parseOptions(argv: string[]): commander.ParseOptionsResult; + + /** + * Return an object containing options as key-value pairs + * + * @returns {{[key: string]: any}} + */ + opts(): { [key: string]: any }; + + /** + * Set the description to `str`. + * + * @param {string} str + * @param {{[argName: string]: string}} argsDescription + * @return {(Command | string)} + */ + description(str: string, argsDescription?: {[argName: string]: string}): Command; + description(): string; + + /** + * Set an alias for the command. + * + * @param {string} alias + * @return {(Command | string)} + */ + alias(alias: string): Command; + alias(): string; + + /** + * Set or get the command usage. + * + * @param {string} str + * @return {(Command | string)} + */ + usage(str: string): Command; + usage(): string; + + /** + * Set the name of the command. + * + * @param {string} str + * @return {Command} + */ + name(str: string): Command; + + /** + * Get the name of the command. + * + * @return {string} + */ + name(): string; + + /** + * Output help information for this command. + * + * @param {(str: string) => string} [cb] + */ + outputHelp(cb?: (str: string) => string): void; + + /** Output help information and exit. + * + * @param {(str: string) => string} [cb] + */ + help(cb?: (str: string) => string): never; + } + +} + +declare namespace commander { + + type Command = local.Command + + type Option = local.Option + + interface CommandOptions { + noHelp?: boolean; + isDefault?: boolean; + } + + interface ParseOptionsResult { + args: string[]; + unknown: string[]; + } + + interface CommanderStatic extends Command { + Command: typeof local.Command; + Option: typeof local.Option; + CommandOptions: CommandOptions; + ParseOptionsResult: ParseOptionsResult; + } + +} + +declare const commander: commander.CommanderStatic; +export = commander; diff --git a/public/node_modules/_commondir@1.0.1@commondir/LICENSE b/public/node_modules/_commondir@1.0.1@commondir/LICENSE new file mode 100644 index 000000000..3d59c7330 --- /dev/null +++ b/public/node_modules/_commondir@1.0.1@commondir/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 James Halliday (mail@substack.net) + +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/public/node_modules/_commondir@1.0.1@commondir/example/dir.js b/public/node_modules/_commondir@1.0.1@commondir/example/dir.js new file mode 100644 index 000000000..e86a34648 --- /dev/null +++ b/public/node_modules/_commondir@1.0.1@commondir/example/dir.js @@ -0,0 +1,3 @@ +var commondir = require('../'); +var dir = commondir(process.argv.slice(2)); +console.log(dir); diff --git a/public/node_modules/_commondir@1.0.1@commondir/index.js b/public/node_modules/_commondir@1.0.1@commondir/index.js new file mode 100644 index 000000000..fa77d0452 --- /dev/null +++ b/public/node_modules/_commondir@1.0.1@commondir/index.js @@ -0,0 +1,29 @@ +var path = require('path'); + +module.exports = function (basedir, relfiles) { + if (relfiles) { + var files = relfiles.map(function (r) { + return path.resolve(basedir, r); + }); + } + else { + var files = basedir; + } + + var res = files.slice(1).reduce(function (ps, file) { + if (!file.match(/^([A-Za-z]:)?\/|\\/)) { + throw new Error('relative path without a basedir'); + } + + var xs = file.split(/\/+|\\+/); + for ( + var i = 0; + ps[i] === xs[i] && i < Math.min(ps.length, xs.length); + i++ + ); + return ps.slice(0, i); + }, files[0].split(/\/+|\\+/)); + + // Windows correctly handles paths with forward-slashes + return res.length > 1 ? res.join('/') : '/' +}; diff --git a/public/node_modules/_commondir@1.0.1@commondir/package.json b/public/node_modules/_commondir@1.0.1@commondir/package.json new file mode 100644 index 000000000..7f77d821a --- /dev/null +++ b/public/node_modules/_commondir@1.0.1@commondir/package.json @@ -0,0 +1,37 @@ +{ + "name": "commondir", + "version": "1.0.1", + "description": "compute the closest common parent for file paths", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tape": "^3.5.0" + }, + "scripts": { + "test": "tape test/*.js" + }, + "repository": { + "type": "git", + "url": "http://github.com/substack/node-commondir.git" + }, + "keywords": [ + "common", + "path", + "directory", + "file", + "parent", + "root" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "engine": { + "node": ">=0.4" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "commondir@1.0.1", + "_resolved": "https://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_commondir@1.0.1@commondir/readme.markdown b/public/node_modules/_commondir@1.0.1@commondir/readme.markdown new file mode 100644 index 000000000..6c20607f4 --- /dev/null +++ b/public/node_modules/_commondir@1.0.1@commondir/readme.markdown @@ -0,0 +1,48 @@ +# commondir + +compute the closest common parent directory among an array of directories + +# example + +``` js +var commondir = require('commondir'); +var dir = commondir(process.argv.slice(2)) +console.log(dir); +``` + +output: + +``` +$ node dir.js /x/y/z /x/y /x/y/w/q +/x/y +$ node ../baz ../../foo/quux ./bizzy +/foo +``` + +# methods + +``` js +var commondir = require('commondir'); +``` + +## commondir(absolutePaths) + +Compute the closest common parent directory for an array `absolutePaths`. + +## commondir(basedir, relativePaths) + +Compute the closest common parent directory for an array `relativePaths` which +will be resolved for each `dir` in `relativePaths` according to: +`path.resolve(basedir, dir)`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install commondir +``` + +# license + +MIT diff --git a/public/node_modules/_commondir@1.0.1@commondir/test/dirs.js b/public/node_modules/_commondir@1.0.1@commondir/test/dirs.js new file mode 100644 index 000000000..7e55c9bb8 --- /dev/null +++ b/public/node_modules/_commondir@1.0.1@commondir/test/dirs.js @@ -0,0 +1,55 @@ +var test = require('tape'); +var commondir = require('../'); + +test('common', function (t) { + t.equal( + commondir([ '/foo', '//foo/bar', '/foo//bar/baz' ]), + '/foo' + ); + t.equal( + commondir([ '/a/b/c', '/a/b', '/a/b/c/d/e' ]), + '/a/b' + ); + t.equal( + commondir([ '/x/y/z/w', '/xy/z', '/x/y/z' ]), + '/' + ); + t.equal( + commondir([ 'X:\\foo', 'X:\\\\foo\\bar', 'X://foo/bar/baz' ]), + 'X:/foo' + ); + t.equal( + commondir([ 'X:\\a\\b\\c', 'X:\\a\\b', 'X:\\a\\b\\c\\d\\e' ]), + 'X:/a/b' + ); + t.equal( + commondir([ 'X:\\x\\y\\z\\w', '\\\\xy\\z', '\\x\\y\\z' ]), + '/' + ); + t.throws(function () { + commondir([ '/x/y/z/w', 'qrs', '/x/y/z' ]); + }); + t.end(); +}); + +test('base', function (t) { + t.equal( + commondir('/foo/bar', [ 'baz', './quux', '../bar/bazzy' ]), + '/foo/bar' + ); + t.equal( + commondir('/a/b', [ 'c', '../b/.', '../../a/b/e' ]), + '/a/b' + ); + t.equal( + commondir('/a/b/c', [ '..', '../d', '../../a/z/e' ]), + '/a' + ); + t.equal( + commondir('/foo/bar', [ 'baz', '.\\quux', '..\\bar\\bazzy' ]), + '/foo/bar' + ); + // Tests including X:\ basedirs must wait until path.resolve supports + // Windows-style paths, starting in Node.js v0.5.X + t.end(); +}); diff --git a/public/node_modules/_concat-map@0.0.1@concat-map/.travis.yml b/public/node_modules/_concat-map@0.0.1@concat-map/.travis.yml new file mode 100644 index 000000000..f1d0f13c8 --- /dev/null +++ b/public/node_modules/_concat-map@0.0.1@concat-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.4 + - 0.6 diff --git a/public/node_modules/_concat-map@0.0.1@concat-map/LICENSE b/public/node_modules/_concat-map@0.0.1@concat-map/LICENSE new file mode 100644 index 000000000..ee27ba4b4 --- /dev/null +++ b/public/node_modules/_concat-map@0.0.1@concat-map/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/node_modules/_concat-map@0.0.1@concat-map/README.markdown b/public/node_modules/_concat-map@0.0.1@concat-map/README.markdown new file mode 100644 index 000000000..408f70a1b --- /dev/null +++ b/public/node_modules/_concat-map@0.0.1@concat-map/README.markdown @@ -0,0 +1,62 @@ +concat-map +========== + +Concatenative mapdashery. + +[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) + +[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) + +example +======= + +``` js +var concatMap = require('concat-map'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); +``` + +*** + +``` +[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] +``` + +methods +======= + +``` js +var concatMap = require('concat-map') +``` + +concatMap(xs, fn) +----------------- + +Return an array of concatenated elements by calling `fn(x, i)` for each element +`x` and each index `i` in the array `xs`. + +When `fn(x, i)` returns an array, its result will be concatenated with the +result array. If `fn(x, i)` returns anything else, that value will be pushed +onto the end of the result array. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install concat-map +``` + +license +======= + +MIT + +notes +===== + +This module was written while sitting high above the ground in a tree. diff --git a/public/node_modules/_concat-map@0.0.1@concat-map/example/map.js b/public/node_modules/_concat-map@0.0.1@concat-map/example/map.js new file mode 100644 index 000000000..33656217b --- /dev/null +++ b/public/node_modules/_concat-map@0.0.1@concat-map/example/map.js @@ -0,0 +1,6 @@ +var concatMap = require('../'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); diff --git a/public/node_modules/_concat-map@0.0.1@concat-map/index.js b/public/node_modules/_concat-map@0.0.1@concat-map/index.js new file mode 100644 index 000000000..b29a7812e --- /dev/null +++ b/public/node_modules/_concat-map@0.0.1@concat-map/index.js @@ -0,0 +1,13 @@ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/public/node_modules/_concat-map@0.0.1@concat-map/package.json b/public/node_modules/_concat-map@0.0.1@concat-map/package.json new file mode 100644 index 000000000..fbe2f74dd --- /dev/null +++ b/public/node_modules/_concat-map@0.0.1@concat-map/package.json @@ -0,0 +1,62 @@ +{ + "name": "concat-map", + "description": "concatenative mapdashery", + "version": "0.0.1", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "main": "index.js", + "keywords": [ + "concat", + "concatMap", + "map", + "functional", + "higher-order" + ], + "directories": { + "example": "example", + "test": "test" + }, + "scripts": { + "test": "tape test/*.js" + }, + "devDependencies": { + "tape": "~2.4.0" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "concat-map@0.0.1", + "_resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_concat-map@0.0.1@concat-map/test/map.js b/public/node_modules/_concat-map@0.0.1@concat-map/test/map.js new file mode 100644 index 000000000..fdbd7022f --- /dev/null +++ b/public/node_modules/_concat-map@0.0.1@concat-map/test/map.js @@ -0,0 +1,39 @@ +var concatMap = require('../'); +var test = require('tape'); + +test('empty or not', function (t) { + var xs = [ 1, 2, 3, 4, 5, 6 ]; + var ixes = []; + var ys = concatMap(xs, function (x, ix) { + ixes.push(ix); + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; + }); + t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); + t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); + t.end(); +}); + +test('always something', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('scalars', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : x; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('undefs', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function () {}); + t.same(ys, [ undefined, undefined, undefined, undefined ]); + t.end(); +}); diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/LICENSE b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/LICENSE new file mode 100644 index 000000000..83e7c4c62 --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2017, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/README.md b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/README.md new file mode 100644 index 000000000..3f6f97426 --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/README.md @@ -0,0 +1,128 @@ +# copy-concurrently + +Copy files, directories and symlinks + +``` +const copy = require('copy-concurrently') +copy('/path/to/thing', '/new/path/thing').then(() => { + // this is now copied +}).catch(err => { + // oh noooo +}) +``` + +Copies files, directories and symlinks. Ownership is maintained when +running as root, permissions are always maintained. On Windows, if symlinks +are unavailable then junctions will be used. + +## PUBLIC INTERFACE + +### copy(from, to, [options]) → Promise + +Recursively copies `from` to `to` and resolves its promise when finished. +If `to` already exists then the promise will be rejected with an `EEXIST` +error. + +Options are: + +* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +Options can also include dependency injection: + +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. + +## EXTENSION INTERFACE + +Ordinarily you'd only call `copy` above. But it's possible to use it's +component functions directly. This is useful if, say, you're writing +[move-concurently](https://npmjs.com/package/move-concurrently). + +### copy.file(from, to, options) → Promise + +Copies an ordinary file `from` to destination `to`. Uses +`fs-write-stream-atomic` to ensure that the file is either entirely copied +or not at all. + +Options are: + +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. + +### copy.symlink(from, to, options) → Promise + +Copies a symlink `from` to destination `to`. If you're using Windows and +symlinking fails and what you're linking is a directory then junctions will +be tried instead. + +Options are: + +* top - The top level the copy is being run from. This is used to determine + if the symlink destination is within the set of files we're copying or + outside it. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +### copy.recurse(from, to, options) → Promise + +Reads all of the files in directory `from` and adds them to the `queue` +using `recurseWith` (by default `copy.item`). + +Options are: + +* queue - A [`run-queue`](https://npmjs.com/package/run-queue) object to add files found inside `from` to. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. + +### copy.item(from, to, options) → Promise + +Copies some kind of `from` to destination `to`. This looks at the filetype +and calls `copy.file`, `copy.symlink` or `copy.recurse` as appropriate. + +Symlink copies are queued with a priority such that they happen after all +file and directory copies as you can't create a junction on windows to a +file that doesn't exist yet. + +Options are: + +* top - The top level the copy is being run from. This is used to determine + if the symlink destination is within the set of files we're copying or + outside it. +* queue - The [`run-queue`](https://npmjs.com/package/run-queue) object to + pass to `copy.recurse` if `from` is a directory. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/copy.js b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/copy.js new file mode 100644 index 000000000..36ce9f46f --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/copy.js @@ -0,0 +1,225 @@ +'use strict' +module.exports = copy +module.exports.item = copyItem +module.exports.recurse = recurseDir +module.exports.symlink = copySymlink +module.exports.file = copyFile + +var nodeFs = require('fs') +var path = require('path') +var validate = require('aproba') +var stockWriteStreamAtomic = require('fs-write-stream-atomic') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var isWindows = require('./is-windows') +var RunQueue = require('run-queue') +var extend = Object.assign || require('util')._extend + +function promisify (Promise, fn) { + return function () { + var args = [].slice.call(arguments) + return new Promise(function (resolve, reject) { + return fn.apply(null, args.concat(function (err, value) { + if (err) { + reject(err) + } else { + resolve(value) + } + })) + }) + } +} + +function copy (from, to, opts) { + validate('SSO|SS', arguments) + opts = extend({}, opts || {}) + + var Promise = opts.Promise || global.Promise + var fs = opts.fs || nodeFs + + if (opts.isWindows == null) opts.isWindows = isWindows + if (!opts.Promise) opts.Promise = Promise + if (!opts.fs) opts.fs = fs + if (!opts.recurseWith) opts.recurseWith = copyItem + if (!opts.lstat) opts.lstat = promisify(opts.Promise, fs.lstat) + if (!opts.stat) opts.stat = promisify(opts.Promise, fs.stat) + if (!opts.chown) opts.chown = promisify(opts.Promise, fs.chown) + if (!opts.readdir) opts.readdir = promisify(opts.Promise, fs.readdir) + if (!opts.readlink) opts.readlink = promisify(opts.Promise, fs.readlink) + if (!opts.symlink) opts.symlink = promisify(opts.Promise, fs.symlink) + if (!opts.chmod) opts.chmod = promisify(opts.Promise, fs.chmod) + + opts.top = from + opts.mkdirpAsync = promisify(opts.Promise, mkdirp) + var rimrafAsync = promisify(opts.Promise, rimraf) + + var queue = new RunQueue({ + maxConcurrency: opts.maxConcurrency, + Promise: Promise + }) + opts.queue = queue + + queue.add(0, copyItem, [from, to, opts]) + + return queue.run().catch(function (err) { + // if the target already exists don't clobber it + if (err.code === 'EEXIST' || err.code === 'EPERM') { + return passThroughError() + } else { + return remove(to).then(passThroughError, passThroughError) + } + function passThroughError () { + return Promise.reject(err) + } + }) + + function remove (target) { + var opts = { + unlink: fs.unlink, + chmod: fs.chmod, + stat: fs.stat, + lstat: fs.lstat, + rmdir: fs.rmdir, + readdir: fs.readdir, + glob: false + } + return rimrafAsync(target, opts) + } +} + +function copyItem (from, to, opts) { + validate('SSO', [from, to, opts]) + var fs = opts.fs || nodeFs + var Promise = opts.Promise || global.Promise + var lstat = opts.lstat || promisify(Promise, fs.lstat) + + return lstat(to).then(function () { + return Promise.reject(eexists(from, to)) + }, function (err) { + if (err && err.code !== 'ENOENT') return Promise.reject(err) + return lstat(from) + }).then(function (fromStat) { + var cmdOpts = extend(extend({}, opts), fromStat) + if (fromStat.isDirectory()) { + return recurseDir(from, to, cmdOpts) + } else if (fromStat.isSymbolicLink()) { + opts.queue.add(1, copySymlink, [from, to, cmdOpts]) + } else if (fromStat.isFile()) { + return copyFile(from, to, cmdOpts) + } else if (fromStat.isBlockDevice()) { + return Promise.reject(eunsupported(from + " is a block device, and we don't know how to copy those.")) + } else if (fromStat.isCharacterDevice()) { + return Promise.reject(eunsupported(from + " is a character device, and we don't know how to copy those.")) + } else if (fromStat.isFIFO()) { + return Promise.reject(eunsupported(from + " is a FIFO, and we don't know how to copy those.")) + } else if (fromStat.isSocket()) { + return Promise.reject(eunsupported(from + " is a socket, and we don't know how to copy those.")) + } else { + return Promise.reject(eunsupported("We can't tell what " + from + " is and so we can't copy it.")) + } + }) +} + +function recurseDir (from, to, opts) { + validate('SSO', [from, to, opts]) + var recurseWith = opts.recurseWith || copyItem + var fs = opts.fs || nodeFs + var chown = opts.chown || promisify(Promise, fs.chown) + var readdir = opts.readdir || promisify(Promise, fs.readdir) + var mkdirpAsync = opts.mkdirpAsync || promisify(Promise, mkdirp) + + return mkdirpAsync(to, {fs: fs, mode: opts.mode}).then(function () { + var getuid = opts.getuid || process.getuid + if (getuid && opts.uid != null && getuid() === 0) { + return chown(to, opts.uid, opts.gid) + } + }).then(function () { + return readdir(from) + }).then(function (files) { + files.forEach(function (file) { + opts.queue.add(0, recurseWith, [path.join(from, file), path.join(to, file), opts]) + }) + }) +} + +function copySymlink (from, to, opts) { + validate('SSO', [from, to, opts]) + var fs = opts.fs || nodeFs + var readlink = opts.readlink || promisify(Promise, fs.readlink) + var stat = opts.stat || promisify(Promise, fs.symlink) + var symlink = opts.symlink || promisify(Promise, fs.symlink) + var Promise = opts.Promise || global.Promise + + return readlink(from).then(function (fromDest) { + var absoluteDest = path.resolve(path.dirname(from), fromDest) + // Treat absolute paths that are inside the tree we're + // copying as relative. This necessary to properly support junctions + // on windows (which are always absolute) but is also DWIM with symlinks. + var relativeDest = path.relative(opts.top, absoluteDest) + var linkFrom = relativeDest.substr(0, 2) === '..' ? fromDest : path.relative(path.dirname(from), absoluteDest) + if (opts.isWindows) { + return stat(absoluteDest).catch(function () { return null }).then(function (destStat) { + var isDir = destStat && destStat.isDirectory() + var type = isDir ? 'dir' : 'file' + return symlink(linkFrom, to, type).catch(function (err) { + if (type === 'dir') { + return symlink(linkFrom, to, 'junction') + } else { + return Promise.reject(err) + } + }) + }) + } else { + return symlink(linkFrom, to) + } + }) +} + +function copyFile (from, to, opts) { + validate('SSO', [from, to, opts]) + var fs = opts.fs || nodeFs + var writeStreamAtomic = opts.writeStreamAtomic || stockWriteStreamAtomic + var Promise = opts.Promise || global.Promise + var chmod = opts.chmod || promisify(Promise, fs.chmod) + + var writeOpts = {} + var getuid = opts.getuid || process.getuid + if (getuid && opts.uid != null && getuid() === 0) { + writeOpts.chown = { + uid: opts.uid, + gid: opts.gid + } + } + + return new Promise(function (resolve, reject) { + var errored = false + function onError (err) { + errored = true + reject(err) + } + fs.createReadStream(from) + .once('error', onError) + .pipe(writeStreamAtomic(to, writeOpts)) + .once('error', onError) + .once('close', function () { + if (errored) return + if (opts.mode != null) { + resolve(chmod(to, opts.mode)) + } else { + resolve() + } + }) + }) +} + +function eexists (from, to) { + var err = new Error('Could not move ' + from + ' to ' + to + ': destination already exists.') + err.code = 'EEXIST' + return err +} + +function eunsupported (msg) { + var err = new Error(msg) + err.code = 'EUNSUPPORTED' + return err +} diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/is-windows.js b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/is-windows.js new file mode 100644 index 000000000..8a991d54f --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/is-windows.js @@ -0,0 +1,2 @@ +'use strict' +module.exports = process.platform === 'win32' diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/.bin/mkdirp b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/.bin/mkdirp new file mode 120000 index 000000000..e493ef63c --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../../../_mkdirp@0.5.1@mkdirp/bin/cmd.js \ No newline at end of file diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/.bin/rimraf b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/.bin/rimraf new file mode 120000 index 000000000..cc571a043 --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../../../_rimraf@2.7.1@rimraf/bin.js \ No newline at end of file diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/aproba b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/aproba new file mode 120000 index 000000000..0cd6a4c08 --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/aproba @@ -0,0 +1 @@ +../../_aproba@1.2.0@aproba \ No newline at end of file diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/fs-write-stream-atomic b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/fs-write-stream-atomic new file mode 120000 index 000000000..329ccab12 --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/fs-write-stream-atomic @@ -0,0 +1 @@ +../../_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic \ No newline at end of file diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/iferr b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/iferr new file mode 120000 index 000000000..d0c443f16 --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/iferr @@ -0,0 +1 @@ +../../_iferr@0.1.5@iferr \ No newline at end of file diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/mkdirp b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/mkdirp new file mode 120000 index 000000000..4aa6ce401 --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/mkdirp @@ -0,0 +1 @@ +../../_mkdirp@0.5.1@mkdirp \ No newline at end of file diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/rimraf b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/rimraf new file mode 120000 index 000000000..62e1c056a --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/rimraf @@ -0,0 +1 @@ +../../_rimraf@2.7.1@rimraf \ No newline at end of file diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/run-queue b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/run-queue new file mode 120000 index 000000000..157ccd83b --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/node_modules/run-queue @@ -0,0 +1 @@ +../../_run-queue@1.0.3@run-queue \ No newline at end of file diff --git a/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/package.json b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/package.json new file mode 100644 index 000000000..1f33d750e --- /dev/null +++ b/public/node_modules/_copy-concurrently@1.0.5@copy-concurrently/package.json @@ -0,0 +1,46 @@ +{ + "name": "copy-concurrently", + "version": "1.0.5", + "description": "Promises of copies of files, directories and symlinks, with concurrency controls and win32 junction fallback.", + "main": "copy.js", + "scripts": { + "test": "standard && tap --coverage test" + }, + "keywords": [ + "copy", + "cpr" + ], + "author": "Rebecca Turner (http://re-becca.org/)", + "license": "ISC", + "dependencies": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + }, + "devDependencies": { + "standard": "^8.6.0", + "tacks": "^1.2.6", + "tap": "^10.1.1" + }, + "files": [ + "copy.js", + "is-windows.js" + ], + "directories": { + "test": "test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/copy-concurrently.git" + }, + "bugs": { + "url": "https://github.com/npm/copy-concurrently/issues" + }, + "homepage": "https://www.npmjs.com/package/copy-concurrently", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "copy-concurrently@1.0.5", + "_resolved": "https://registry.npm.taobao.org/copy-concurrently/download/copy-concurrently-1.0.5.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_core-util-is@1.0.2@core-util-is/LICENSE b/public/node_modules/_core-util-is@1.0.2@core-util-is/LICENSE new file mode 100644 index 000000000..d8d7f9437 --- /dev/null +++ b/public/node_modules/_core-util-is@1.0.2@core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/public/node_modules/_core-util-is@1.0.2@core-util-is/README.md b/public/node_modules/_core-util-is@1.0.2@core-util-is/README.md new file mode 100644 index 000000000..5a76b4149 --- /dev/null +++ b/public/node_modules/_core-util-is@1.0.2@core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/public/node_modules/_core-util-is@1.0.2@core-util-is/float.patch b/public/node_modules/_core-util-is@1.0.2@core-util-is/float.patch new file mode 100644 index 000000000..a06d5c05f --- /dev/null +++ b/public/node_modules/_core-util-is@1.0.2@core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.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] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/public/node_modules/_core-util-is@1.0.2@core-util-is/lib/util.js b/public/node_modules/_core-util-is@1.0.2@core-util-is/lib/util.js new file mode 100644 index 000000000..ff4c851c0 --- /dev/null +++ b/public/node_modules/_core-util-is@1.0.2@core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/public/node_modules/_core-util-is@1.0.2@core-util-is/package.json b/public/node_modules/_core-util-is@1.0.2@core-util-is/package.json new file mode 100644 index 000000000..e105974b7 --- /dev/null +++ b/public/node_modules/_core-util-is@1.0.2@core-util-is/package.json @@ -0,0 +1,35 @@ +{ + "name": "core-util-is", + "version": "1.0.2", + "description": "The `util.is*` functions introduced in Node v0.12.", + "main": "lib/util.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is" + }, + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "scripts": { + "test": "tap test.js" + }, + "devDependencies": { + "tap": "^2.3.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "core-util-is@1.0.2", + "_resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_core-util-is@1.0.2@core-util-is/test.js b/public/node_modules/_core-util-is@1.0.2@core-util-is/test.js new file mode 100644 index 000000000..1a490c65a --- /dev/null +++ b/public/node_modules/_core-util-is@1.0.2@core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/LICENSE b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/LICENSE new file mode 100644 index 000000000..7f1543566 --- /dev/null +++ b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/LICENSE @@ -0,0 +1,21 @@ +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/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/README.md b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/README.md new file mode 100644 index 000000000..326bb2a58 --- /dev/null +++ b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/README.md @@ -0,0 +1,58 @@ +# 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 + +Node.js v9.11.1: + +``` +fast-deep-equal x 226,960 ops/sec ±1.55% (86 runs sampled) +nano-equal x 218,210 ops/sec ±0.79% (89 runs sampled) +shallow-equal-fuzzy x 206,762 ops/sec ±0.84% (88 runs sampled) +underscore.isEqual x 128,668 ops/sec ±0.75% (91 runs sampled) +lodash.isEqual x 44,895 ops/sec ±0.67% (85 runs sampled) +deep-equal x 51,616 ops/sec ±0.96% (90 runs sampled) +deep-eql x 28,218 ops/sec ±0.42% (85 runs sampled) +assert.deepStrictEqual x 1,777 ops/sec ±1.05% (86 runs sampled) +ramda.equals x 13,466 ops/sec ±0.82% (86 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/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/index.d.ts b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/index.d.ts new file mode 100644 index 000000000..3c042caa7 --- /dev/null +++ b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/index.d.ts @@ -0,0 +1,4 @@ +declare module 'fast-deep-equal' { + const equal: (a: any, b: any) => boolean; + export = equal; +} diff --git a/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/index.js b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/index.js new file mode 100644 index 000000000..27264f5b2 --- /dev/null +++ b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/index.js @@ -0,0 +1,55 @@ +'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; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + var arrA = isArray(a) + , arrB = isArray(b) + , i + , length + , key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + 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(); + + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) + return false; + + for (i = length; i-- !== 0;) + if (!hasProp.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + key = keys[i]; + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + return a!==a && b!==b; +}; diff --git a/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/package.json b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/package.json new file mode 100644 index 000000000..8adf0adfe --- /dev/null +++ b/public/node_modules/_fast-deep-equal@2.0.1@fast-deep-equal/package.json @@ -0,0 +1,62 @@ +{ + "name": "fast-deep-equal", + "version": "2.0.1", + "description": "Fast deep equal", + "main": "index.js", + "scripts": { + "eslint": "eslint *.js benchmark spec", + "test-spec": "mocha spec/*.spec.js -R spec", + "test-cov": "nyc npm run test-spec", + "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts", + "test": "npm run eslint && npm run test-ts && npm run test-cov" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" + }, + "keywords": [ + "fast", + "equal", + "deep-equal" + ], + "author": "Evgeny Poberezkin", + "license": "MIT", + "bugs": { + "url": "https://github.com/epoberezkin/fast-deep-equal/issues" + }, + "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", + "devDependencies": { + "benchmark": "^2.1.4", + "coveralls": "^2.13.1", + "deep-eql": "latest", + "deep-equal": "latest", + "eslint": "^4.0.0", + "lodash": "latest", + "mocha": "^3.4.2", + "nano-equal": "latest", + "nyc": "^11.0.2", + "pre-commit": "^1.2.2", + "ramda": "latest", + "shallow-equal-fuzzy": "latest", + "typescript": "^2.6.1", + "underscore": "latest" + }, + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "files": [ + "index.js", + "index.d.ts" + ], + "types": "index.d.ts", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "fast-deep-equal@2.0.1", + "_resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.eslintrc.yml b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.eslintrc.yml new file mode 100644 index 000000000..1c77b0d47 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.eslintrc.yml @@ -0,0 +1,26 @@ +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/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.github/FUNDING.yml b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.github/FUNDING.yml new file mode 100644 index 000000000..61f9daa95 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: "npm/fast-json-stable-stringify" diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.travis.yml b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.travis.yml new file mode 100644 index 000000000..b61e8f0dc --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "8" + - "10" + - "12" + - "13" +after_script: + - coveralls < coverage/lcov.info diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/LICENSE b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/LICENSE new file mode 100644 index 000000000..c932223b1 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/LICENSE @@ -0,0 +1,21 @@ +This software is released under the MIT license: + +Copyright (c) 2017 Evgeny Poberezkin +Copyright (c) 2013 James Halliday + +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/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/README.md b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/README.md new file mode 100644 index 000000000..02cf49ff3 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/README.md @@ -0,0 +1,131 @@ +# 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 +``` + + +## Enterprise support + +fast-json-stable-stringify package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-json-stable-stringify?utm_source=npm-fast-json-stable-stringify&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers. + + +## Security contact + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues. + + +# license + +[MIT](https://github.com/epoberezkin/fast-json-stable-stringify/blob/master/LICENSE) diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/benchmark/index.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/benchmark/index.js new file mode 100644 index 000000000..e725f9fc5 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/benchmark/index.js @@ -0,0 +1,31 @@ +'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/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/benchmark/test.json b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/benchmark/test.json new file mode 100644 index 000000000..c9118c11f --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/benchmark/test.json @@ -0,0 +1,137 @@ +[ + { + "_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/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/key_cmp.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/key_cmp.js new file mode 100644 index 000000000..d5f66752d --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/key_cmp.js @@ -0,0 +1,7 @@ +var stringify = require('../'); + +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); diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/nested.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/nested.js new file mode 100644 index 000000000..9a672fc65 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/nested.js @@ -0,0 +1,3 @@ +var stringify = require('../'); +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +console.log(stringify(obj)); diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/str.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/str.js new file mode 100644 index 000000000..9b4b3cd28 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/str.js @@ -0,0 +1,3 @@ +var stringify = require('../'); +var obj = { c: 6, b: [4,5], a: 3 }; +console.log(stringify(obj)); diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/value_cmp.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/value_cmp.js new file mode 100644 index 000000000..09f1c5f79 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/example/value_cmp.js @@ -0,0 +1,7 @@ +var stringify = require('../'); + +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); diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/index.d.ts b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/index.d.ts new file mode 100644 index 000000000..23e46cafc --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/index.d.ts @@ -0,0 +1,4 @@ +declare module 'fast-json-stable-stringify' { + function stringify(obj: any): string; + export = stringify; +} diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/index.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/index.js new file mode 100644 index 000000000..c44e6a413 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/index.js @@ -0,0 +1,59 @@ +'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/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/package.json b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/package.json new file mode 100644 index 000000000..181218546 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/package.json @@ -0,0 +1,55 @@ +{ + "name": "fast-json-stable-stringify", + "version": "2.1.0", + "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify", + "main": "index.js", + "types": "index.d.ts", + "dependencies": {}, + "devDependencies": { + "benchmark": "^2.1.4", + "coveralls": "^3.0.0", + "eslint": "^6.7.0", + "fast-stable-stringify": "latest", + "faster-stable-stringify": "latest", + "json-stable-stringify": "latest", + "nyc": "^14.1.0", + "pre-commit": "^1.2.2", + "tape": "^4.11.0" + }, + "scripts": { + "eslint": "eslint index.js test", + "test-spec": "tape test/*.js", + "test": "npm run eslint && nyc npm run test-spec" + }, + "repository": { + "type": "git", + "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git" + }, + "homepage": "https://github.com/epoberezkin/fast-json-stable-stringify", + "keywords": [ + "json", + "stringify", + "deterministic", + "hash", + "stable" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "nyc": { + "exclude": [ + "test", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "fast-json-stable-stringify@2.1.0", + "_resolved": "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-json-stable-stringify%2Fdownload%2Ffast-json-stable-stringify-2.1.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/cmp.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/cmp.js new file mode 100644 index 000000000..4efd6b597 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/cmp.js @@ -0,0 +1,13 @@ +'use strict'; + +var test = require('tape'); +var stringify = require('../'); + +test('custom comparison function', function (t) { + t.plan(1); + 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; + }); + t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); +}); diff --git a/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/nested.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/nested.js new file mode 100644 index 000000000..167a358e0 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/nested.js @@ -0,0 +1,44 @@ +'use strict'; + +var test = require('tape'); +var stringify = require('../'); + +test('nested', function (t) { + t.plan(1); + var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; + t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); +}); + +test('cyclic (default)', function (t) { + t.plan(1); + var one = { a: 1 }; + var two = { a: 2, one: one }; + one.two = two; + try { + stringify(one); + } catch (ex) { + t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON'); + } +}); + +test('cyclic (specifically allowed)', function (t) { + t.plan(1); + var one = { a: 1 }; + var two = { a: 2, one: one }; + one.two = two; + t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}'); +}); + +test('repeated non-cyclic value', function(t) { + t.plan(1); + var one = { x: 1 }; + 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/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/str.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/str.js new file mode 100644 index 000000000..99a9ade18 --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/str.js @@ -0,0 +1,46 @@ +'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/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/to-json.js b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/to-json.js new file mode 100644 index 000000000..2fb2cfa3e --- /dev/null +++ b/public/node_modules/_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify/test/to-json.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var stringify = require('../'); + +test('toJSON function', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; + t.equal(stringify(obj), '{"one":1}' ); +}); + +test('toJSON returns string', function (t) { + 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"]'); +}); diff --git a/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/CHANGELOG.md b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/CHANGELOG.md new file mode 100644 index 000000000..038f9c065 --- /dev/null +++ b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/CHANGELOG.md @@ -0,0 +1,151 @@ +# 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. + + +## [3.5.1](https://github.com/zkat/figgy-pudding/compare/v3.5.0...v3.5.1) (2018-08-25) + + + + +# [3.5.0](https://github.com/zkat/figgy-pudding/compare/v3.4.1...v3.5.0) (2018-08-25) + + +### Bug Fixes + +* **node:** get rid of Object.entries to add node6 support back ([074f779](https://github.com/zkat/figgy-pudding/commit/074f779)) + + +### Features + +* **node:** add node@10 to CI config ([78b8937](https://github.com/zkat/figgy-pudding/commit/78b8937)) + + + + +## [3.4.1](https://github.com/zkat/figgy-pudding/compare/v3.4.0...v3.4.1) (2018-08-16) + + +### Bug Fixes + +* **forEach:** get forEach to behave like a normal forEach ([c064755](https://github.com/zkat/figgy-pudding/commit/c064755)) +* **has:** get `in` keyword working right ([fafc5a8](https://github.com/zkat/figgy-pudding/commit/fafc5a8)) +* **iteration:** fix and test iteration of opts.other keys ([7a76217](https://github.com/zkat/figgy-pudding/commit/7a76217)) +* **iteration:** use proper args for forEach/toJSON ([974e879](https://github.com/zkat/figgy-pudding/commit/974e879)) +* **proxy:** make sure proxy corner-cases work ok ([8c66e45](https://github.com/zkat/figgy-pudding/commit/8c66e45)) +* **set:** fix and test the exceptions to writing ([206793b](https://github.com/zkat/figgy-pudding/commit/206793b)) + + + + +# [3.4.0](https://github.com/zkat/figgy-pudding/compare/v3.3.0...v3.4.0) (2018-08-16) + + +### Features + +* **iterator:** allow iteration over "other" keys ([3c53323](https://github.com/zkat/figgy-pudding/commit/3c53323)) + + + + +# [3.3.0](https://github.com/zkat/figgy-pudding/compare/v3.2.1...v3.3.0) (2018-08-16) + + +### Bug Fixes + +* **props:** allow symbols to pass through ([97b3464](https://github.com/zkat/figgy-pudding/commit/97b3464)) + + +### Features + +* **pudding:** iteration and serialization support ([0aaa50d](https://github.com/zkat/figgy-pudding/commit/0aaa50d)) + + + + +## [3.2.1](https://github.com/zkat/figgy-pudding/compare/v3.2.0...v3.2.1) (2018-08-15) + + +### Bug Fixes + +* **aliases:** make reverse aliases work correctly ([76a255e](https://github.com/zkat/figgy-pudding/commit/76a255e)) + + + + +# [3.2.0](https://github.com/zkat/figgy-pudding/compare/v3.1.0...v3.2.0) (2018-07-26) + + +### Bug Fixes + +* **concat:** have concat spit out a proxy, too ([64e3495](https://github.com/zkat/figgy-pudding/commit/64e3495)) + + +### Features + +* **default:** pass the pudding itself to default fns ([d9d9e09](https://github.com/zkat/figgy-pudding/commit/d9d9e09)) + + + + +# [3.1.0](https://github.com/zkat/figgy-pudding/compare/v3.0.0...v3.1.0) (2018-04-08) + + +### Features + +* **opts:** allow direct option fetching without .get() ([ca77aad](https://github.com/zkat/figgy-pudding/commit/ca77aad)) + + + + +# [3.0.0](https://github.com/zkat/figgy-pudding/compare/v2.0.1...v3.0.0) (2018-04-06) + + +### Bug Fixes + +* **ci:** oops -- forgot to update CI config ([7a40563](https://github.com/zkat/figgy-pudding/commit/7a40563)) +* **get:** make provider lookup order like Object.assign ([33ff89b](https://github.com/zkat/figgy-pudding/commit/33ff89b)) + + +### Features + +* **concat:** add .concat() method to opts ([d310fce](https://github.com/zkat/figgy-pudding/commit/d310fce)) + + +### meta + +* drop support for node@4 and node@7 ([9f8a61c](https://github.com/zkat/figgy-pudding/commit/9f8a61c)) + + +### BREAKING CHANGES + +* node@4 and node@7 are no longer supported +* **get:** shadow order for properties in providers is reversed + + + + +## [2.0.1](https://github.com/zkat/figgy-pudding/compare/v2.0.0...v2.0.1) (2018-03-16) + + +### Bug Fixes + +* **opts:** ignore non-object providers ([7b9c0f8](https://github.com/zkat/figgy-pudding/commit/7b9c0f8)) + + + + +# [2.0.0](https://github.com/zkat/figgy-pudding/compare/v1.0.0...v2.0.0) (2018-03-16) + + +### Features + +* **api:** overhauled API with new opt handling concept ([e6cc929](https://github.com/zkat/figgy-pudding/commit/e6cc929)) +* **license:** relicense to ISC ([87479aa](https://github.com/zkat/figgy-pudding/commit/87479aa)) + + +### BREAKING CHANGES + +* **license:** the license has been changed from CC0-1.0 to ISC. +* **api:** this is a completely different approach than previously +used by this library. See the readme for the new API and an explanation. diff --git a/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/LICENSE.md b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/LICENSE.md new file mode 100644 index 000000000..8d28acf86 --- /dev/null +++ b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/LICENSE.md @@ -0,0 +1,16 @@ +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/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/README.md b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/README.md new file mode 100644 index 000000000..3d0591c1e --- /dev/null +++ b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/README.md @@ -0,0 +1,260 @@ +# figgy-pudding [![npm version](https://img.shields.io/npm/v/figgy-pudding.svg)](https://npm.im/figgy-pudding) [![license](https://img.shields.io/npm/l/figgy-pudding.svg)](https://npm.im/figgy-pudding) [![Travis](https://img.shields.io/travis/zkat/figgy-pudding.svg)](https://travis-ci.org/zkat/figgy-pudding) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/figgy-pudding?svg=true)](https://ci.appveyor.com/project/zkat/figgy-pudding) [![Coverage Status](https://coveralls.io/repos/github/zkat/figgy-pudding/badge.svg?branch=latest)](https://coveralls.io/github/zkat/figgy-pudding?branch=latest) + +[`figgy-pudding`](https://github.com/zkat/figgy-pudding) is a small JavaScript +library for managing and composing cascading options objects -- hiding what +needs to be hidden from each layer, without having to do a lot of manual munging +and passing of options. + +### The God Object is Dead! +### Now Bring Us Some Figgy Pudding! + +## Install + +`$ npm install figgy-pudding` + +## Table of Contents + +* [Example](#example) +* [Features](#features) +* [API](#api) + * [`figgyPudding(spec)`](#figgy-pudding) + * [`PuddingFactory(values)`](#pudding-factory) + * [`opts.get()`](#opts-get) + * [`opts.concat()`](#opts-concat) + * [`opts.toJSON()`](#opts-to-json) + * [`opts.forEach()`](#opts-for-each) + * [`opts[Symbol.iterator]()`](#opts-symbol-iterator) + * [`opts.entries()`](#opts-entries) + * [`opts.keys()`](#opts-keys) + * [`opts.value()`](#opts-values) + +### Example + +```javascript +// print-package.js +const fetch = require('./fetch.js') +const puddin = require('figgy-pudding') + +const PrintOpts = puddin({ + json: { default: false } +}) + +async function printPkg (name, opts) { + // Expected pattern is to call this in every interface function. If `opts` is + // not passed in, it will automatically create an (empty) object for it. + opts = PrintOpts(opts) + const uri = `https://registry.npmjs.com/${name}` + const res = await fetch(uri, opts.concat({ + // Add or override any passed-in configs and pass them down. + log: customLogger + })) + // The following would throw an error, because it's not in PrintOpts: + // console.log(opts.log) + if (opts.json) { + return res.json() + } else { + return res.text() + } +} + +console.log(await printPkg('figgy', { + // Pass in *all* configs at the toplevel, as a regular object. + json: true, + cache: './tmp-cache' +})) +``` + +```javascript +// fetch.js +const puddin = require('figgy-pudding') + +const FetchOpts = puddin({ + log: { default: require('npmlog') }, + cache: {} +}) + +module.exports = async function (..., opts) { + opts = FetchOpts(opts) +} +``` + +### Features + +* hide options from layer that didn't ask for it +* shared multi-layer options +* make sure `opts` argument is available +* transparent key access like normal keys, through a Proxy. No need for`.get()`! +* default values +* key aliases +* arbitrary key filter functions +* key/value iteration +* serialization +* 100% test coverage using `tap --100` + +### API + +#### `> figgyPudding({ key: { default: val } | String }, [opts]) -> PuddingFactory` + +Defines an Options constructor that can be used to collect only the needed +options. + +An optional `default` property for specs can be used to specify default values +if nothing was passed in. + +If the value for a spec is a string, it will be treated as an alias to that +other key. + +##### Example + +```javascript +const MyAppOpts = figgyPudding({ + lg: 'log', + log: { + default: () => require('npmlog') + }, + cache: {} +}) +``` + +#### `> PuddingFactory(...providers) -> FiggyPudding{}` + +Instantiates an options object defined by `figgyPudding()`, which uses +`providers`, in order, to find requested properties. + +Each provider can be either a plain object, a `Map`-like object (that is, one +with a `.get()` method) or another figgyPudding `Opts` object. + +When nesting `Opts` objects, their properties will not become available to the +new object, but any further nested `Opts` that reference that property _will_ be +able to read from their grandparent, as long as they define that key. Default +values for nested `Opts` parents will be used, if found. + +##### Example + +```javascript +const ReqOpts = figgyPudding({ + follow: {} +}) + +const opts = ReqOpts({ + follow: true, + log: require('npmlog') +}) + +opts.follow // => true +opts.log // => Error: ReqOpts does not define `log` + +const MoreOpts = figgyPudding({ + log: {} +}) +MoreOpts(opts).log // => npmlog object (passed in from original plain obj) +MoreOpts(opts).follow // => Error: MoreOpts does not define `follow` +``` + +#### `> opts.get(key) -> Value` + +Gets a value from the options object. + +##### Example + +```js +const opts = MyOpts(config) +opts.get('foo') // value of `foo` +opts.foo // Proxy-based access through `.get()` +``` + +#### `> opts.concat(...moreProviders) -> FiggyPudding{}` + +Creates a new opts object of the same type as `opts` with additional providers. +Providers further to the right shadow providers to the left, with properties in +the original `opts` being shadows by the new providers. + +##### Example + +```js +const opts = MyOpts({x: 1}) +opts.get('x') // 1 +opts.concat({x: 2}).get('x') // 2 +opts.get('x') // 1 (original opts object left intact) +``` + +#### `> opts.toJSON() -> Value` + +Converts `opts` to a plain, JSON-stringifiable JavaScript value. Used internally +by JavaScript to get `JSON.stringify()` working. + +Only keys that are readable by the current pudding type will be serialized. + +##### Example + +```js +const opts = MyOpts({x: 1}) +opts.toJSON() // {x: 1} +JSON.stringify(opts) // '{"x":1}' +``` + +#### `> opts.forEach((value, key, opts) => {}, thisArg) -> undefined` + +Iterates over the values of `opts`, limited to the keys readable by the current +pudding type. `thisArg` will be used to set the `this` argument when calling the +`fn`. + +##### Example + +```js +const opts = MyOpts({x: 1, y: 2}) +opts.forEach((value, key) => console.log(key, '=', value)) +``` + +#### `> opts.entries() -> Iterator<[[key, value], ...]>` + +Returns an iterator that iterates over the keys and values in `opts`, limited to +the keys readable by the current pudding type. Each iteration returns an array +of `[key, value]`. + +##### Example + +```js +const opts = MyOpts({x: 1, y: 2}) +[...opts({x: 1, y: 2}).entries()] // [['x', 1], ['y', 2]] +``` + +#### `> opts[Symbol.iterator]() -> Iterator<[[key, value], ...]>` + +Returns an iterator that iterates over the keys and values in `opts`, limited to +the keys readable by the current pudding type. Each iteration returns an array +of `[key, value]`. Makes puddings work natively with JS iteration mechanisms. + +##### Example + +```js +const opts = MyOpts({x: 1, y: 2}) +[...opts({x: 1, y: 2})] // [['x', 1], ['y', 2]] +for (let [key, value] of opts({x: 1, y: 2})) { + console.log(key, '=', value) +} +``` + +#### `> opts.keys() -> Iterator<[key, ...]>` + +Returns an iterator that iterates over the keys in `opts`, limited to the keys +readable by the current pudding type. + +##### Example + +```js +const opts = MyOpts({x: 1, y: 2}) +[...opts({x: 1, y: 2}).keys()] // ['x', 'y'] +``` + +#### `> opts.values() -> Iterator<[value, ...]>` + +Returns an iterator that iterates over the values in `opts`, limited to the keys +readable by the current pudding type. + +##### Example +' +```js +const opts = MyOpts({x: 1, y: 2}) +[...opts({x: 1, y: 2}).values()] // [1, 2] +``` diff --git a/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/index.js b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/index.js new file mode 100644 index 000000000..bb7d5711b --- /dev/null +++ b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/index.js @@ -0,0 +1,197 @@ +'use strict' + +class FiggyPudding { + constructor (specs, opts, providers) { + this.__specs = specs || {} + Object.keys(this.__specs).forEach(alias => { + if (typeof this.__specs[alias] === 'string') { + const key = this.__specs[alias] + const realSpec = this.__specs[key] + if (realSpec) { + const aliasArr = realSpec.aliases || [] + aliasArr.push(alias, key) + realSpec.aliases = [...(new Set(aliasArr))] + this.__specs[alias] = realSpec + } else { + throw new Error(`Alias refers to invalid key: ${key} -> ${alias}`) + } + } + }) + this.__opts = opts || {} + this.__providers = reverse((providers).filter( + x => x != null && typeof x === 'object' + )) + this.__isFiggyPudding = true + } + get (key) { + return pudGet(this, key, true) + } + get [Symbol.toStringTag] () { return 'FiggyPudding' } + forEach (fn, thisArg = this) { + for (let [key, value] of this.entries()) { + fn.call(thisArg, value, key, this) + } + } + toJSON () { + const obj = {} + this.forEach((val, key) => { + obj[key] = val + }) + return obj + } + * entries (_matcher) { + for (let key of Object.keys(this.__specs)) { + yield [key, this.get(key)] + } + const matcher = _matcher || this.__opts.other + if (matcher) { + const seen = new Set() + for (let p of this.__providers) { + const iter = p.entries ? p.entries(matcher) : entries(p) + for (let [key, val] of iter) { + if (matcher(key) && !seen.has(key)) { + seen.add(key) + yield [key, val] + } + } + } + } + } + * [Symbol.iterator] () { + for (let [key, value] of this.entries()) { + yield [key, value] + } + } + * keys () { + for (let [key] of this.entries()) { + yield key + } + } + * values () { + for (let [, value] of this.entries()) { + yield value + } + } + concat (...moreConfig) { + return new Proxy(new FiggyPudding( + this.__specs, + this.__opts, + reverse(this.__providers).concat(moreConfig) + ), proxyHandler) + } +} +try { + const util = require('util') + FiggyPudding.prototype[util.inspect.custom] = function (depth, opts) { + return ( + this[Symbol.toStringTag] + ' ' + ) + util.inspect(this.toJSON(), opts) + } +} catch (e) {} + +function BadKeyError (key) { + throw Object.assign(new Error( + `invalid config key requested: ${key}` + ), {code: 'EBADKEY'}) +} + +function pudGet (pud, key, validate) { + let spec = pud.__specs[key] + if (validate && !spec && (!pud.__opts.other || !pud.__opts.other(key))) { + BadKeyError(key) + } else { + if (!spec) { spec = {} } + let ret + for (let p of pud.__providers) { + ret = tryGet(key, p) + if (ret === undefined && spec.aliases && spec.aliases.length) { + for (let alias of spec.aliases) { + if (alias === key) { continue } + ret = tryGet(alias, p) + if (ret !== undefined) { + break + } + } + } + if (ret !== undefined) { + break + } + } + if (ret === undefined && spec.default !== undefined) { + if (typeof spec.default === 'function') { + return spec.default(pud) + } else { + return spec.default + } + } else { + return ret + } + } +} + +function tryGet (key, p) { + let ret + if (p.__isFiggyPudding) { + ret = pudGet(p, key, false) + } else if (typeof p.get === 'function') { + ret = p.get(key) + } else { + ret = p[key] + } + return ret +} + +const proxyHandler = { + has (obj, prop) { + return prop in obj.__specs && pudGet(obj, prop, false) !== undefined + }, + ownKeys (obj) { + return Object.keys(obj.__specs) + }, + get (obj, prop) { + if ( + typeof prop === 'symbol' || + prop.slice(0, 2) === '__' || + prop in FiggyPudding.prototype + ) { + return obj[prop] + } + return obj.get(prop) + }, + set (obj, prop, value) { + if ( + typeof prop === 'symbol' || + prop.slice(0, 2) === '__' + ) { + obj[prop] = value + return true + } else { + throw new Error('figgyPudding options cannot be modified. Use .concat() instead.') + } + }, + deleteProperty () { + throw new Error('figgyPudding options cannot be deleted. Use .concat() and shadow them instead.') + } +} + +module.exports = figgyPudding +function figgyPudding (specs, opts) { + function factory (...providers) { + return new Proxy(new FiggyPudding( + specs, + opts, + providers + ), proxyHandler) + } + return factory +} + +function reverse (arr) { + const ret = [] + arr.forEach(x => ret.unshift(x)) + return ret +} + +function entries (obj) { + return Object.keys(obj).map(k => [k, obj[k]]) +} diff --git a/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/package.json b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/package.json new file mode 100644 index 000000000..23fed0c3b --- /dev/null +++ b/public/node_modules/_figgy-pudding@3.5.1@figgy-pudding/package.json @@ -0,0 +1,38 @@ +{ + "name": "figgy-pudding", + "version": "3.5.1", + "description": "Delicious, festive, cascading config/opts definitions", + "main": "index.js", + "files": [ + "*.js", + "lib" + ], + "scripts": { + "prerelease": "npm t", + "postrelease": "npm publish && git push --follow-tags", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --100 --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'" + }, + "repository": "https://github.com/zkat/figgy-pudding", + "keywords": [ + "config", + "options", + "yummy" + ], + "author": "Kat Marchán ", + "license": "ISC", + "dependencies": {}, + "devDependencies": { + "standard": "^11.0.1", + "standard-version": "^4.4.0", + "tap": "^12.0.1", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "figgy-pudding@3.5.1", + "_resolved": "https://registry.npm.taobao.org/figgy-pudding/download/figgy-pudding-3.5.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/index.js b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/index.js new file mode 100644 index 000000000..a0a252117 --- /dev/null +++ b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/index.js @@ -0,0 +1,50 @@ +'use strict'; +const path = require('path'); +const fs = require('fs'); +const commonDir = require('commondir'); +const pkgDir = require('pkg-dir'); +const makeDir = require('make-dir'); + +const isWritable = path => { + try { + fs.accessSync(path, fs.constants.W_OK); + return true; + } catch (_) { + return false; + } +}; + +module.exports = (options = {}) => { + const {name} = options; + let directory = options.cwd; + + if (options.files) { + directory = commonDir(directory, options.files); + } else { + directory = directory || process.cwd(); + } + + directory = pkgDir.sync(directory); + + if (directory) { + const nodeModules = path.join(directory, 'node_modules'); + if ( + !isWritable(nodeModules) && + (fs.existsSync(nodeModules) || !isWritable(path.join(directory))) + ) { + return undefined; + } + + directory = path.join(directory, 'node_modules', '.cache', name); + + if (directory && options.create) { + makeDir.sync(directory); + } + + if (options.thunk) { + return (...arguments_) => path.join(directory, ...arguments_); + } + } + + return directory; +}; diff --git a/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/license b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/license new file mode 100644 index 000000000..32a380af3 --- /dev/null +++ b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) James Talmage (github.com/jamestalmage) + +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/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/commondir b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/commondir new file mode 120000 index 000000000..4c6c866d0 --- /dev/null +++ b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/commondir @@ -0,0 +1 @@ +../../_commondir@1.0.1@commondir \ No newline at end of file diff --git a/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/make-dir b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/make-dir new file mode 120000 index 000000000..0ead64515 --- /dev/null +++ b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/make-dir @@ -0,0 +1 @@ +../../_make-dir@3.0.0@make-dir \ No newline at end of file diff --git a/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/pkg-dir b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/pkg-dir new file mode 120000 index 000000000..52cbf5010 --- /dev/null +++ b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/node_modules/pkg-dir @@ -0,0 +1 @@ +../../_pkg-dir@4.2.0@pkg-dir \ No newline at end of file diff --git a/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/package.json b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/package.json new file mode 100644 index 000000000..62796ac88 --- /dev/null +++ b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/package.json @@ -0,0 +1,46 @@ +{ + "name": "find-cache-dir", + "version": "3.2.0", + "description": "Finds the common standard cache directory", + "license": "MIT", + "repository": "avajs/find-cache-dir", + "funding": "https://github.com/avajs/find-cache-dir?sponsor=1", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "cache", + "directory", + "dir", + "caching", + "find", + "search" + ], + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.0", + "pkg-dir": "^4.1.0" + }, + "devDependencies": { + "ava": "^2.4.0", + "coveralls": "^3.0.9", + "del": "^4.0.0", + "nyc": "^14.1.1", + "xo": "^0.25.3" + }, + "nyc": { + "reporter": [ + "lcov", + "text" + ] + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "find-cache-dir@3.2.0", + "_resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.2.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/readme.md b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/readme.md new file mode 100644 index 000000000..5e6692ab9 --- /dev/null +++ b/public/node_modules/_find-cache-dir@3.2.0@find-cache-dir/readme.md @@ -0,0 +1,120 @@ +# find-cache-dir [![Build Status](https://travis-ci.org/avajs/find-cache-dir.svg?branch=master)](https://travis-ci.org/avajs/find-cache-dir) [![Coverage Status](https://coveralls.io/repos/github/avajs/find-cache-dir/badge.svg?branch=master)](https://coveralls.io/github/avajs/find-cache-dir?branch=master) + +> Finds the common standard cache directory + +The [`nyc`](https://github.com/istanbuljs/nyc) and [`AVA`](https://ava.li) projects decided to standardize on a common directory structure for storing cache information: + +```sh +# nyc +./node_modules/.cache/nyc + +# ava +./node_modules/.cache/ava + +# your-module +./node_modules/.cache/your-module +``` + +This module makes it easy to correctly locate the cache directory according to this shared spec. If this pattern becomes ubiquitous, clearing the cache for multiple dependencies becomes easy and consistent: + +``` +rm -rf ./node_modules/.cache +``` + +If you decide to adopt this pattern, please file a PR adding your name to the list of adopters below. + +## Install + +``` +$ npm install find-cache-dir +``` + +## Usage + +```js +const findCacheDir = require('find-cache-dir'); + +findCacheDir({name: 'unicorns'}); +//=> '/user/path/node-modules/.cache/unicorns' +``` + +## API + +### findCacheDir(options?) + +Finds the cache directory using the supplied options. The algorithm tries to find a `package.json` file, searching every parent directory of the `cwd` specified (or implied from other options). It returns a `string` containing the absolute path to the cache directory, or `undefined` if `package.json` was never found or if the `node_modules` directory is unwritable. + +#### options + +Type: `object` + +##### name + +*Required*\ +Type: `string` + +Should be the same as your project name in `package.json`. + +##### files + +Type: `string[] | string` + +An array of files that will be searched for a common parent directory. This common parent directory will be used in lieu of the `cwd` option below. + +##### cwd + +Type: `string`\ +Default `process.cwd()` + +Directory to start searching for a `package.json` from. + +##### create + +Type: `boolean`\ +Default `false` + +If `true`, the directory will be created synchronously before returning. + +##### thunk + +Type: `boolean`\ +Default `false` + +If `true`, this modifies the return type to be a function that is a thunk for `path.join(theFoundCacheDirectory)`. + +```js +const thunk = findCacheDir({name: 'foo', thunk: true}); + +thunk(); +//=> '/some/path/node_modules/.cache/foo' + +thunk('bar.js') +//=> '/some/path/node_modules/.cache/foo/bar.js' + +thunk('baz', 'quz.js') +//=> '/some/path/node_modules/.cache/foo/baz/quz.js' +``` + +This is helpful for actually putting actual files in the cache! + +## Adopters + +- [`AVA`](https://ava.li) +- [`nyc`](https://github.com/istanbuljs/nyc) +- [`Storybook`](https://storybook.js.org) +- [`babel-loader`](https://github.com/babel/babel-loader) +- [`eslint-loader`](https://github.com/MoOx/eslint-loader) +- [`Phenomic`](https://phenomic.io) +- [`javascripthon-loader`](https://github.com/Beg-in/javascripthon-loader) + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/public/node_modules/_find-up@4.1.0@find-up/index.d.ts b/public/node_modules/_find-up@4.1.0@find-up/index.d.ts new file mode 100644 index 000000000..41e3192ae --- /dev/null +++ b/public/node_modules/_find-up@4.1.0@find-up/index.d.ts @@ -0,0 +1,137 @@ +import {Options as LocatePathOptions} from 'locate-path'; + +declare const stop: unique symbol; + +declare namespace findUp { + interface Options extends LocatePathOptions {} + + type StopSymbol = typeof stop; + + type Match = string | StopSymbol | undefined; +} + +declare const findUp: { + /** + Find a file or directory by walking up parent directories. + + @param name - Name of the file or directory to find. Can be multiple. + @returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found. + + @example + ``` + // / + // └── Users + // └── sindresorhus + // ├── unicorn.png + // └── foo + // └── bar + // ├── baz + // └── example.js + + // example.js + import findUp = require('find-up'); + + (async () => { + console.log(await findUp('unicorn.png')); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(['rainbow.png', 'unicorn.png'])); + //=> '/Users/sindresorhus/unicorn.png' + })(); + ``` + */ + (name: string | string[], options?: findUp.Options): Promise; + + /** + Find a file or directory by walking up parent directories. + + @param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search. + @returns The first path found or `undefined` if none could be found. + + @example + ``` + import path = require('path'); + import findUp = require('find-up'); + + (async () => { + console.log(await findUp(async directory => { + const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' + })(); + ``` + */ + (matcher: (directory: string) => (findUp.Match | Promise), options?: findUp.Options): Promise; + + sync: { + /** + Synchronously find a file or directory by walking up parent directories. + + @param name - Name of the file or directory to find. Can be multiple. + @returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found. + */ + (name: string | string[], options?: findUp.Options): string | undefined; + + /** + Synchronously find a file or directory by walking up parent directories. + + @param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search. + @returns The first path found or `undefined` if none could be found. + + @example + ``` + import path = require('path'); + import findUp = require('find-up'); + + console.log(findUp.sync(directory => { + const hasUnicorns = findUp.sync.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' + ``` + */ + (matcher: (directory: string) => findUp.Match, options?: findUp.Options): string | undefined; + + /** + Synchronously check if a path exists. + + @param path - Path to the file or directory. + @returns Whether the path exists. + + @example + ``` + import findUp = require('find-up'); + + console.log(findUp.sync.exists('/Users/sindresorhus/unicorn.png')); + //=> true + ``` + */ + exists(path: string): boolean; + } + + /** + Check if a path exists. + + @param path - Path to a file or directory. + @returns Whether the path exists. + + @example + ``` + import findUp = require('find-up'); + + (async () => { + console.log(await findUp.exists('/Users/sindresorhus/unicorn.png')); + //=> true + })(); + ``` + */ + exists(path: string): Promise; + + /** + Return this in a `matcher` function to stop the search and force `findUp` to immediately return `undefined`. + */ + readonly stop: findUp.StopSymbol; +}; + +export = findUp; diff --git a/public/node_modules/_find-up@4.1.0@find-up/index.js b/public/node_modules/_find-up@4.1.0@find-up/index.js new file mode 100644 index 000000000..ce564e5d3 --- /dev/null +++ b/public/node_modules/_find-up@4.1.0@find-up/index.js @@ -0,0 +1,89 @@ +'use strict'; +const path = require('path'); +const locatePath = require('locate-path'); +const pathExists = require('path-exists'); + +const stop = Symbol('findUp.stop'); + +module.exports = async (name, options = {}) => { + let directory = path.resolve(options.cwd || ''); + const {root} = path.parse(directory); + const paths = [].concat(name); + + const runMatcher = async locateOptions => { + if (typeof name !== 'function') { + return locatePath(paths, locateOptions); + } + + const foundPath = await name(locateOptions.cwd); + if (typeof foundPath === 'string') { + return locatePath([foundPath], locateOptions); + } + + return foundPath; + }; + + // eslint-disable-next-line no-constant-condition + while (true) { + // eslint-disable-next-line no-await-in-loop + const foundPath = await runMatcher({...options, cwd: directory}); + + if (foundPath === stop) { + return; + } + + if (foundPath) { + return path.resolve(directory, foundPath); + } + + if (directory === root) { + return; + } + + directory = path.dirname(directory); + } +}; + +module.exports.sync = (name, options = {}) => { + let directory = path.resolve(options.cwd || ''); + const {root} = path.parse(directory); + const paths = [].concat(name); + + const runMatcher = locateOptions => { + if (typeof name !== 'function') { + return locatePath.sync(paths, locateOptions); + } + + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === 'string') { + return locatePath.sync([foundPath], locateOptions); + } + + return foundPath; + }; + + // eslint-disable-next-line no-constant-condition + while (true) { + const foundPath = runMatcher({...options, cwd: directory}); + + if (foundPath === stop) { + return; + } + + if (foundPath) { + return path.resolve(directory, foundPath); + } + + if (directory === root) { + return; + } + + directory = path.dirname(directory); + } +}; + +module.exports.exists = pathExists; + +module.exports.sync.exists = pathExists.sync; + +module.exports.stop = stop; diff --git a/public/node_modules/_find-up@4.1.0@find-up/license b/public/node_modules/_find-up@4.1.0@find-up/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_find-up@4.1.0@find-up/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_find-up@4.1.0@find-up/node_modules/locate-path b/public/node_modules/_find-up@4.1.0@find-up/node_modules/locate-path new file mode 120000 index 000000000..cf5b4bb95 --- /dev/null +++ b/public/node_modules/_find-up@4.1.0@find-up/node_modules/locate-path @@ -0,0 +1 @@ +../../_locate-path@5.0.0@locate-path \ No newline at end of file diff --git a/public/node_modules/_find-up@4.1.0@find-up/node_modules/path-exists b/public/node_modules/_find-up@4.1.0@find-up/node_modules/path-exists new file mode 120000 index 000000000..e1bad9d29 --- /dev/null +++ b/public/node_modules/_find-up@4.1.0@find-up/node_modules/path-exists @@ -0,0 +1 @@ +../../_path-exists@4.0.0@path-exists \ No newline at end of file diff --git a/public/node_modules/_find-up@4.1.0@find-up/package.json b/public/node_modules/_find-up@4.1.0@find-up/package.json new file mode 100644 index 000000000..ab3b27790 --- /dev/null +++ b/public/node_modules/_find-up@4.1.0@find-up/package.json @@ -0,0 +1,56 @@ +{ + "name": "find-up", + "version": "4.1.0", + "description": "Find a file or directory by walking up parent directories", + "license": "MIT", + "repository": "sindresorhus/find-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "walk", + "walking", + "path" + ], + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "devDependencies": { + "ava": "^2.1.0", + "is-path-inside": "^2.1.0", + "tempy": "^0.3.0", + "tsd": "^0.7.3", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "find-up@4.1.0", + "_resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_find-up@4.1.0@find-up/readme.md b/public/node_modules/_find-up@4.1.0@find-up/readme.md new file mode 100644 index 000000000..d6a21e525 --- /dev/null +++ b/public/node_modules/_find-up@4.1.0@find-up/readme.md @@ -0,0 +1,156 @@ +# find-up [![Build Status](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) + +> Find a file or directory by walking up parent directories + + +## Install + +``` +$ npm install find-up +``` + + +## Usage + +``` +/ +└── Users + └── sindresorhus + ├── unicorn.png + └── foo + └── bar + ├── baz + └── example.js +``` + +`example.js` + +```js +const path = require('path'); +const findUp = require('find-up'); + +(async () => { + console.log(await findUp('unicorn.png')); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(['rainbow.png', 'unicorn.png'])); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(async directory => { + const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' +})(); +``` + + +## API + +### findUp(name, options?) +### findUp(matcher, options?) + +Returns a `Promise` for either the path or `undefined` if it couldn't be found. + +### findUp([...name], options?) + +Returns a `Promise` for either the first path found (by respecting the order of the array) or `undefined` if none could be found. + +### findUp.sync(name, options?) +### findUp.sync(matcher, options?) + +Returns a path or `undefined` if it couldn't be found. + +### findUp.sync([...name], options?) + +Returns the first path found (by respecting the order of the array) or `undefined` if none could be found. + +#### name + +Type: `string` + +Name of the file or directory to find. + +#### matcher + +Type: `Function` + +A function that will be called with each directory until it returns a `string` with the path, which stops the search, or the root directory has been reached and nothing was found. Useful if you want to match files with certain patterns, set of permissions, or other advanced use-cases. + +When using async mode, the `matcher` may optionally be an async or promise-returning function that returns the path. + +#### options + +Type: `object` + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Directory to start from. + +##### type + +Type: `string`
+Default: `'file'`
+Values: `'file'` `'directory'` + +The type of paths that can match. + +##### allowSymlinks + +Type: `boolean`
+Default: `true` + +Allow symbolic links to match if they point to the chosen path type. + +### findUp.exists(path) + +Returns a `Promise` of whether the path exists. + +### findUp.sync.exists(path) + +Returns a `boolean` of whether the path exists. + +#### path + +Type: `string` + +Path to a file or directory. + +### findUp.stop + +A [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that can be returned by a `matcher` function to stop the search and cause `findUp` to immediately return `undefined`. Useful as a performance optimization in case the current working directory is deeply nested in the filesystem. + +```js +const path = require('path'); +const findUp = require('find-up'); + +(async () => { + await findUp(directory => { + return path.basename(directory) === 'work' ? findUp.stop : 'logo.png'; + }); +})(); +``` + + +## Related + +- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module +- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file +- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package +- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path + + +--- + +
+ + Get professional support for 'find-up' with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/public/node_modules/_fs-minipass@2.0.0@fs-minipass/LICENSE b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_fs-minipass@2.0.0@fs-minipass/README.md b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/README.md new file mode 100644 index 000000000..1e61241cf --- /dev/null +++ b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/README.md @@ -0,0 +1,70 @@ +# fs-minipass + +Filesystem streams based on [minipass](http://npm.im/minipass). + +4 classes are exported: + +- ReadStream +- ReadStreamSync +- WriteStream +- WriteStreamSync + +When using `ReadStreamSync`, all of the data is made available +immediately upon consuming the stream. Nothing is buffered in memory +when the stream is constructed. If the stream is piped to a writer, +then it will synchronously `read()` and emit data into the writer as +fast as the writer can consume it. (That is, it will respect +backpressure.) If you call `stream.read()` then it will read the +entire file and return the contents. + +When using `WriteStreamSync`, every write is flushed to the file +synchronously. If your writes all come in a single tick, then it'll +write it all out in a single tick. It's as synchronous as you are. + +The async versions work much like their node builtin counterparts, +with the exception of introducing significantly less Stream machinery +overhead. + +## USAGE + +It's just streams, you pipe them or read() them or write() to them. + +```js +const fsm = require('fs-minipass') +const readStream = new fsm.ReadStream('file.txt') +const writeStream = new fsm.WriteStream('output.txt') +writeStream.write('some file header or whatever\n') +readStream.pipe(writeStream) +``` + +## ReadStream(path, options) + +Path string is required, but somewhat irrelevant if an open file +descriptor is passed in as an option. + +Options: + +- `fd` Pass in a numeric file descriptor, if the file is already open. +- `readSize` The size of reads to do, defaults to 16MB +- `size` The size of the file, if known. Prevents zero-byte read() + call at the end. +- `autoClose` Set to `false` to prevent the file descriptor from being + closed when the file is done being read. + +## WriteStream(path, options) + +Path string is required, but somewhat irrelevant if an open file +descriptor is passed in as an option. + +Options: + +- `fd` Pass in a numeric file descriptor, if the file is already open. +- `mode` The mode to create the file with. Defaults to `0o666`. +- `start` The position in the file to start reading. If not + specified, then the file will start writing at position zero, and be + truncated by default. +- `autoClose` Set to `false` to prevent the file descriptor from being + closed when the stream is ended. +- `flags` Flags to use when opening the file. Irrelevant if `fd` is + passed in, since file won't be opened in that case. Defaults to + `'a'` if a `pos` is specified, or `'w'` otherwise. diff --git a/public/node_modules/_fs-minipass@2.0.0@fs-minipass/index.js b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/index.js new file mode 100644 index 000000000..cd585a83c --- /dev/null +++ b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/index.js @@ -0,0 +1,387 @@ +'use strict' +const MiniPass = require('minipass') +const EE = require('events').EventEmitter +const fs = require('fs') + +// for writev +const binding = process.binding('fs') +const writeBuffers = binding.writeBuffers +/* istanbul ignore next */ +const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback + +const _autoClose = Symbol('_autoClose') +const _close = Symbol('_close') +const _ended = Symbol('_ended') +const _fd = Symbol('_fd') +const _finished = Symbol('_finished') +const _flags = Symbol('_flags') +const _flush = Symbol('_flush') +const _handleChunk = Symbol('_handleChunk') +const _makeBuf = Symbol('_makeBuf') +const _mode = Symbol('_mode') +const _needDrain = Symbol('_needDrain') +const _onerror = Symbol('_onerror') +const _onopen = Symbol('_onopen') +const _onread = Symbol('_onread') +const _onwrite = Symbol('_onwrite') +const _open = Symbol('_open') +const _path = Symbol('_path') +const _pos = Symbol('_pos') +const _queue = Symbol('_queue') +const _read = Symbol('_read') +const _readSize = Symbol('_readSize') +const _reading = Symbol('_reading') +const _remain = Symbol('_remain') +const _size = Symbol('_size') +const _write = Symbol('_write') +const _writing = Symbol('_writing') +const _defaultFlag = Symbol('_defaultFlag') + +class ReadStream extends MiniPass { + constructor (path, opt) { + opt = opt || {} + super(opt) + + this.writable = false + + if (typeof path !== 'string') + throw new TypeError('path must be a string') + + this[_fd] = typeof opt.fd === 'number' ? opt.fd : null + this[_path] = path + this[_readSize] = opt.readSize || 16*1024*1024 + this[_reading] = false + this[_size] = typeof opt.size === 'number' ? opt.size : Infinity + this[_remain] = this[_size] + this[_autoClose] = typeof opt.autoClose === 'boolean' ? + opt.autoClose : true + + if (typeof this[_fd] === 'number') + this[_read]() + else + this[_open]() + } + + get fd () { return this[_fd] } + get path () { return this[_path] } + + write () { + throw new TypeError('this is a readable stream') + } + + end () { + throw new TypeError('this is a readable stream') + } + + [_open] () { + fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)) + } + + [_onopen] (er, fd) { + if (er) + this[_onerror](er) + else { + this[_fd] = fd + this.emit('open', fd) + this[_read]() + } + } + + [_makeBuf] () { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])) + } + + [_read] () { + if (!this[_reading]) { + this[_reading] = true + const buf = this[_makeBuf]() + /* istanbul ignore if */ + if (buf.length === 0) return process.nextTick(() => this[_onread](null, 0, buf)) + fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) => + this[_onread](er, br, buf)) + } + } + + [_onread] (er, br, buf) { + this[_reading] = false + if (er) + this[_onerror](er) + else if (this[_handleChunk](br, buf)) + this[_read]() + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + fs.close(this[_fd], _ => this.emit('close')) + this[_fd] = null + } + } + + [_onerror] (er) { + this[_reading] = true + this[_close]() + this.emit('error', er) + } + + [_handleChunk] (br, buf) { + let ret = false + // no effect if infinite + this[_remain] -= br + if (br > 0) + ret = super.write(br < buf.length ? buf.slice(0, br) : buf) + + if (br === 0 || this[_remain] <= 0) { + ret = false + this[_close]() + super.end() + } + + return ret + } + + emit (ev, data) { + switch (ev) { + case 'prefinish': + case 'finish': + break + + case 'drain': + if (typeof this[_fd] === 'number') + this[_read]() + break + + default: + return super.emit(ev, data) + } + } +} + +class ReadStreamSync extends ReadStream { + [_open] () { + let threw = true + try { + this[_onopen](null, fs.openSync(this[_path], 'r')) + threw = false + } finally { + if (threw) + this[_close]() + } + } + + [_read] () { + let threw = true + try { + if (!this[_reading]) { + this[_reading] = true + do { + const buf = this[_makeBuf]() + /* istanbul ignore next */ + const br = buf.length === 0 ? 0 : fs.readSync(this[_fd], buf, 0, buf.length, null) + if (!this[_handleChunk](br, buf)) + break + } while (true) + this[_reading] = false + } + threw = false + } finally { + if (threw) + this[_close]() + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + try { + fs.closeSync(this[_fd]) + } catch (er) {} + this[_fd] = null + this.emit('close') + } + } +} + +class WriteStream extends EE { + constructor (path, opt) { + opt = opt || {} + super(opt) + this.readable = false + this[_writing] = false + this[_ended] = false + this[_needDrain] = false + this[_queue] = [] + this[_path] = path + this[_fd] = typeof opt.fd === 'number' ? opt.fd : null + this[_mode] = opt.mode === undefined ? 0o666 : opt.mode + this[_pos] = typeof opt.start === 'number' ? opt.start : null + this[_autoClose] = typeof opt.autoClose === 'boolean' ? + opt.autoClose : true + + // truncating makes no sense when writing into the middle + const defaultFlag = this[_pos] !== null ? 'r+' : 'w' + this[_defaultFlag] = opt.flags === undefined + this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags + + if (this[_fd] === null) + this[_open]() + } + + get fd () { return this[_fd] } + get path () { return this[_path] } + + [_onerror] (er) { + this[_close]() + this[_writing] = true + this.emit('error', er) + } + + [_open] () { + fs.open(this[_path], this[_flags], this[_mode], + (er, fd) => this[_onopen](er, fd)) + } + + [_onopen] (er, fd) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && er.code === 'ENOENT') { + this[_flags] = 'w' + this[_open]() + } else if (er) + this[_onerror](er) + else { + this[_fd] = fd + this.emit('open', fd) + this[_flush]() + } + } + + end (buf, enc) { + if (buf) + this.write(buf, enc) + + this[_ended] = true + + // synthetic after-write logic, where drain/finish live + if (!this[_writing] && !this[_queue].length && + typeof this[_fd] === 'number') + this[_onwrite](null, 0) + } + + write (buf, enc) { + if (typeof buf === 'string') + buf = new Buffer(buf, enc) + + if (this[_ended]) { + this.emit('error', new Error('write() after end()')) + return false + } + + if (this[_fd] === null || this[_writing] || this[_queue].length) { + this[_queue].push(buf) + this[_needDrain] = true + return false + } + + this[_writing] = true + this[_write](buf) + return true + } + + [_write] (buf) { + fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => + this[_onwrite](er, bw)) + } + + [_onwrite] (er, bw) { + if (er) + this[_onerror](er) + else { + if (this[_pos] !== null) + this[_pos] += bw + if (this[_queue].length) + this[_flush]() + else { + this[_writing] = false + + if (this[_ended] && !this[_finished]) { + this[_finished] = true + this[_close]() + this.emit('finish') + } else if (this[_needDrain]) { + this[_needDrain] = false + this.emit('drain') + } + } + } + } + + [_flush] () { + if (this[_queue].length === 0) { + if (this[_ended]) + this[_onwrite](null, 0) + } else if (this[_queue].length === 1) + this[_write](this[_queue].pop()) + else { + const iovec = this[_queue] + this[_queue] = [] + writev(this[_fd], iovec, this[_pos], + (er, bw) => this[_onwrite](er, bw)) + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + fs.close(this[_fd], _ => this.emit('close')) + this[_fd] = null + } + } +} + +class WriteStreamSync extends WriteStream { + [_open] () { + let fd + try { + fd = fs.openSync(this[_path], this[_flags], this[_mode]) + } catch (er) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && er.code === 'ENOENT') { + this[_flags] = 'w' + return this[_open]() + } else + throw er + } + this[_onopen](null, fd) + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + try { + fs.closeSync(this[_fd]) + } catch (er) {} + this[_fd] = null + this.emit('close') + } + } + + [_write] (buf) { + try { + this[_onwrite](null, + fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])) + } catch (er) { + this[_onwrite](er, 0) + } + } +} + +const writev = (fd, iovec, pos, cb) => { + const done = (er, bw) => cb(er, bw, iovec) + const req = new FSReqWrap() + req.oncomplete = done + binding.writeBuffers(fd, iovec, pos, req) +} + +exports.ReadStream = ReadStream +exports.ReadStreamSync = ReadStreamSync + +exports.WriteStream = WriteStream +exports.WriteStreamSync = WriteStreamSync diff --git a/public/node_modules/_fs-minipass@2.0.0@fs-minipass/node_modules/minipass b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/node_modules/minipass new file mode 120000 index 000000000..a95109227 --- /dev/null +++ b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/node_modules/minipass @@ -0,0 +1 @@ +../../_minipass@3.1.1@minipass \ No newline at end of file diff --git a/public/node_modules/_fs-minipass@2.0.0@fs-minipass/package.json b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/package.json new file mode 100644 index 000000000..e5ff51643 --- /dev/null +++ b/public/node_modules/_fs-minipass@2.0.0@fs-minipass/package.json @@ -0,0 +1,42 @@ +{ + "name": "fs-minipass", + "version": "2.0.0", + "main": "index.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "keywords": [], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fs-minipass.git" + }, + "bugs": { + "url": "https://github.com/npm/fs-minipass/issues" + }, + "homepage": "https://github.com/npm/fs-minipass#readme", + "description": "fs read and write streams based on minipass", + "dependencies": { + "minipass": "^3.0.0" + }, + "devDependencies": { + "mutate-fs": "^2.0.1", + "tap": "^14.6.4" + }, + "files": [ + "index.js" + ], + "tap": { + "check-coverage": true + }, + "engines": { + "node": ">= 8" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "fs-minipass@2.0.0", + "_resolved": "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-2.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/.npmignore b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/.npmignore new file mode 100644 index 000000000..2f24c57c3 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +coverage/ +.nyc_output/ diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/.travis.yml b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/.travis.yml new file mode 100644 index 000000000..689466252 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +sudo: false +before_install: + - "npm -g install npm" +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" + - "4" + - "5" diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/LICENSE b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/README.md b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/README.md new file mode 100644 index 000000000..9a15d0567 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/README.md @@ -0,0 +1,35 @@ +# fs-write-stream-atomic + +Like `fs.createWriteStream(...)`, but atomic. + +Writes to a tmp file and does an atomic `fs.rename` to move it into +place when it's done. + +First rule of debugging: **It's always a race condition.** + +## USAGE + +```javascript +var fsWriteStreamAtomic = require('fs-write-stream-atomic') +// options are optional. +var write = fsWriteStreamAtomic('output.txt', options) +var read = fs.createReadStream('input.txt') +read.pipe(write) + +// When the write stream emits a 'finish' or 'close' event, +// you can be sure that it is moved into place, and contains +// all the bytes that were written to it, even if something else +// was writing to `output.txt` at the same time. +``` + +### `fsWriteStreamAtomic(filename, [options])` + +* `filename` {String} The file we want to write to +* `options` {Object} + * `chown` {Object} User and group to set ownership after write + * `uid` {Number} + * `gid` {Number} + * `encoding` {String} default = 'utf8' + * `mode` {Number} default = `0666` + * `flags` {String} default = `'w'` + diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/index.js b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/index.js new file mode 100644 index 000000000..1690ff5ae --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/index.js @@ -0,0 +1,176 @@ +var fs = require('graceful-fs') +var Writable = require('readable-stream').Writable +var util = require('util') +var MurmurHash3 = require('imurmurhash') +var iferr = require('iferr') +var crypto = require('crypto') + +function murmurhex () { + var hash = MurmurHash3('') + for (var ii = 0; ii < arguments.length; ++ii) { + hash.hash('' + arguments[ii]) + } + return hash.result() +} + +var invocations = 0 +function getTmpname (filename) { + return filename + '.' + murmurhex(__filename, process.pid, ++invocations) +} + +var setImmediate = global.setImmediate || setTimeout + +module.exports = WriteStreamAtomic + +// Requirements: +// 1. Write everything written to the stream to a temp file. +// 2. If there are no errors: +// a. moves the temp file into its final destination +// b. emits `finish` & `closed` ONLY after the file is +// fully flushed and renamed. +// 3. If there's an error, removes the temp file. + +util.inherits(WriteStreamAtomic, Writable) +function WriteStreamAtomic (path, options) { + if (!(this instanceof WriteStreamAtomic)) { + return new WriteStreamAtomic(path, options) + } + Writable.call(this, options) + + this.__isWin = options && options.hasOwnProperty('isWin') ? options.isWin : process.platform === 'win32' + + this.__atomicTarget = path + this.__atomicTmp = getTmpname(path) + + this.__atomicChown = options && options.chown + + this.__atomicClosed = false + + this.__atomicStream = fs.WriteStream(this.__atomicTmp, options) + + this.__atomicStream.once('open', handleOpen(this)) + this.__atomicStream.once('close', handleClose(this)) + this.__atomicStream.once('error', handleError(this)) +} + +// We have to suppress default finish emitting, because ordinarily it +// would happen as soon as `end` is called on us and all of the +// data has been written to our target stream. So we suppress +// finish from being emitted here, and only emit it after our +// target stream is closed and we've moved everything around. +WriteStreamAtomic.prototype.emit = function (event) { + if (event === 'finish') return this.__atomicStream.end() + return Writable.prototype.emit.apply(this, arguments) +} + +WriteStreamAtomic.prototype._write = function (buffer, encoding, cb) { + var flushed = this.__atomicStream.write(buffer, encoding) + if (flushed) return cb() + this.__atomicStream.once('drain', cb) +} + +function handleOpen (writeStream) { + return function (fd) { + writeStream.emit('open', fd) + } +} + +function handleClose (writeStream) { + return function () { + if (writeStream.__atomicClosed) return + writeStream.__atomicClosed = true + if (writeStream.__atomicChown) { + var uid = writeStream.__atomicChown.uid + var gid = writeStream.__atomicChown.gid + return fs.chown(writeStream.__atomicTmp, uid, gid, iferr(cleanup, moveIntoPlace)) + } else { + moveIntoPlace() + } + } + + function moveIntoPlace () { + fs.rename(writeStream.__atomicTmp, writeStream.__atomicTarget, iferr(trapWindowsEPERM, end)) + } + + function trapWindowsEPERM (err) { + if (writeStream.__isWin && + err.syscall && err.syscall === 'rename' && + err.code && err.code === 'EPERM' + ) { + checkFileHashes(err) + } else { + cleanup(err) + } + } + + function checkFileHashes (eperm) { + var inprocess = 2 + var tmpFileHash = crypto.createHash('sha512') + var targetFileHash = crypto.createHash('sha512') + + fs.createReadStream(writeStream.__atomicTmp) + .on('data', function (data, enc) { tmpFileHash.update(data, enc) }) + .on('error', fileHashError) + .on('end', fileHashComplete) + fs.createReadStream(writeStream.__atomicTarget) + .on('data', function (data, enc) { targetFileHash.update(data, enc) }) + .on('error', fileHashError) + .on('end', fileHashComplete) + + function fileHashError () { + if (inprocess === 0) return + inprocess = 0 + cleanup(eperm) + } + + function fileHashComplete () { + if (inprocess === 0) return + if (--inprocess) return + if (tmpFileHash.digest('hex') === targetFileHash.digest('hex')) { + return cleanup() + } else { + return cleanup(eperm) + } + } + } + + function cleanup (err) { + fs.unlink(writeStream.__atomicTmp, function () { + if (err) { + writeStream.emit('error', err) + writeStream.emit('close') + } else { + end() + } + }) + } + + function end () { + // We have to use our parent class directly because we suppress `finish` + // events fired via our own emit method. + Writable.prototype.emit.call(writeStream, 'finish') + + // Delay the close to provide the same temporal separation a physical + // file operation would have– that is, the close event is emitted only + // after the async close operation completes. + setImmediate(function () { + writeStream.emit('close') + }) + } +} + +function handleError (writeStream) { + return function (er) { + cleanupSync() + writeStream.emit('error', er) + writeStream.__atomicClosed = true + writeStream.emit('close') + } + function cleanupSync () { + try { + fs.unlinkSync(writeStream.__atomicTmp) + } finally { + return + } + } +} diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/graceful-fs b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/graceful-fs new file mode 120000 index 000000000..ae23402b1 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/graceful-fs @@ -0,0 +1 @@ +../../_graceful-fs@4.2.3@graceful-fs \ No newline at end of file diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/iferr b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/iferr new file mode 120000 index 000000000..d0c443f16 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/iferr @@ -0,0 +1 @@ +../../_iferr@0.1.5@iferr \ No newline at end of file diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/imurmurhash b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/imurmurhash new file mode 120000 index 000000000..835a44388 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/imurmurhash @@ -0,0 +1 @@ +../../_imurmurhash@0.1.4@imurmurhash \ No newline at end of file diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/readable-stream b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/readable-stream new file mode 120000 index 000000000..71357d05c --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/node_modules/readable-stream @@ -0,0 +1 @@ +../../_readable-stream@2.3.6@readable-stream \ No newline at end of file diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/package.json b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/package.json new file mode 100644 index 000000000..7b82b85ae --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/package.json @@ -0,0 +1,36 @@ +{ + "name": "fs-write-stream-atomic", + "version": "1.0.10", + "description": "Like `fs.createWriteStream(...)`, but atomic.", + "main": "index.js", + "directories": { + "test": "test" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + }, + "devDependencies": { + "rimraf": "^2.4.4", + "standard": "^5.4.1", + "tap": "^2.3.1" + }, + "scripts": { + "test": "standard && tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/fs-write-stream-atomic" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/fs-write-stream-atomic/issues" + }, + "homepage": "https://github.com/npm/fs-write-stream-atomic", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "fs-write-stream-atomic@1.0.10", + "_resolved": "https://registry.npm.taobao.org/fs-write-stream-atomic/download/fs-write-stream-atomic-1.0.10.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/basic.js b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/basic.js new file mode 100644 index 000000000..d0205e15f --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/basic.js @@ -0,0 +1,97 @@ +var fs = require('graceful-fs') +var test = require('tap').test +var path = require('path') +var writeStream = require('../index.js') + +var rename = fs.rename +fs.rename = function (from, to, cb) { + setTimeout(function () { + rename(from, to, cb) + }, 100) +} + +test('basic', function (t) { + // open 10 write streams to the same file. + // then write to each of them, and to the target + // and verify at the end that each of them does their thing + var target = path.resolve(__dirname, 'test.txt') + var n = 10 + + // We run all of our assertions twice: + // once for finish, once for close + // There are 6 assertions, two fixed, plus 4 lines in the file. + t.plan(n * 2 * 6) + + var streams = [] + for (var i = 0; i < n; i++) { + var s = writeStream(target) + s.on('finish', verifier('finish', i)) + s.on('close', verifier('close', i)) + streams.push(s) + } + + function verifier (ev, num) { + return function () { + if (ev === 'close') { + t.equal(this.__emittedFinish, true, num + '. closed only after finish') + } else { + this.__emittedFinish = true + t.equal(ev, 'finish', num + '. finished') + } + + // make sure that one of the atomic streams won. + var res = fs.readFileSync(target, 'utf8') + var lines = res.trim().split(/\n/) + lines.forEach(function (line, lineno) { + var first = lines[0].match(/\d+$/)[0] + var cur = line.match(/\d+$/)[0] + t.equal(cur, first, num + '. line ' + lineno + ' matches') + }) + + var resExpr = /^first write \d+\nsecond write \d+\nthird write \d+\nfinal write \d+\n$/ + t.similar(res, resExpr, num + '. content matches') + } + } + + // now write something to each stream. + streams.forEach(function (stream, i) { + stream.write('first write ' + i + '\n') + }) + + // wait a sec for those writes to go out. + setTimeout(function () { + // write something else to the target. + fs.writeFileSync(target, 'brutality!\n') + + // write some more stuff. + streams.forEach(function (stream, i) { + stream.write('second write ' + i + '\n') + }) + + setTimeout(function () { + // Oops! Deleted the file! + fs.unlinkSync(target) + + // write some more stuff. + streams.forEach(function (stream, i) { + stream.write('third write ' + i + '\n') + }) + + setTimeout(function () { + fs.writeFileSync(target, 'brutality TWO!\n') + streams.forEach(function (stream, i) { + stream.end('final write ' + i + '\n') + }) + }, 50) + }, 50) + }, 50) +}) + +test('cleanup', function (t) { + fs.readdirSync(__dirname).filter(function (f) { + return f.match(/^test.txt/) + }).forEach(function (file) { + fs.unlinkSync(path.resolve(__dirname, file)) + }) + t.end() +}) diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/chown.js b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/chown.js new file mode 100644 index 000000000..1733cf27e --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/chown.js @@ -0,0 +1,44 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') +var test = require('tap').test +var rimraf = require('rimraf') +var writeStream = require('../index.js') + +var target = path.resolve(__dirname, 'test-chown') + +test('chown works', function (t) { + t.plan(1) + var stream = writeStream(target, {chown: {uid: process.getuid(), gid: process.getgid()}}) + var hadError = false + stream.on('error', function (er) { + hadError = true + console.log('#', er) + }) + stream.on('close', function () { + t.is(hadError, false, 'no errors before close') + }) + stream.end() +}) + +test('chown fails', function (t) { + t.plan(1) + fs.chown = function (file, uid, gid, cb) { + cb(new Error('TEST BREAK')) + } + var stream = writeStream(target, {chown: {uid: process.getuid(), gid: process.getgid()}}) + var hadError = false + stream.on('error', function (er) { + hadError = true + console.log('#', er) + }) + stream.on('close', function () { + t.is(hadError, true, 'error before close') + }) + stream.end() +}) + +test('cleanup', function (t) { + rimraf.sync(target) + t.end() +}) diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/rename-eperm.js b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/rename-eperm.js new file mode 100644 index 000000000..b1be0f318 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/rename-eperm.js @@ -0,0 +1,154 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') +var test = require('tap').test +var rimraf = require('rimraf') +var writeStream = require('../index.js') + +var target = path.resolve(__dirname, 'test-rename-eperm1') +var target2 = path.resolve(__dirname, 'test-rename-eperm2') +var target3 = path.resolve(__dirname, 'test-rename-eperm3') + +test('rename eperm none existing file', function (t) { + t.plan(2) + + var _rename = fs.rename + fs.existsSync = function (src) { + return true + } + fs.rename = function (src, dest, cb) { + // simulate a failure during rename where the file + // is renamed successfully but the process encounters + // an EPERM error and the target file does not exist + _rename(src, dest, function (e) { + var err = new Error('TEST BREAK') + err.syscall = 'rename' + err.code = 'EPERM' + cb(err) + }) + } + + var stream = writeStream(target, { isWin: true }) + var hadError = false + var calledFinish = false + stream.on('error', function (er) { + hadError = true + console.log('#', er) + }) + stream.on('finish', function () { + calledFinish = true + }) + stream.on('close', function () { + t.is(hadError, true, 'error was caught') + t.is(calledFinish, false, 'finish was called before close') + }) + stream.end() +}) + +// test existing file with diff. content +test('rename eperm existing file different content', function (t) { + t.plan(2) + + var _rename = fs.rename + fs.existsSync = function (src) { + return true + } + fs.rename = function (src, dest, cb) { + // simulate a failure during rename where the file + // is renamed successfully but the process encounters + // an EPERM error and the target file that has another content than the + // destination + _rename(src, dest, function (e) { + fs.writeFile(src, 'dest', function (writeErr) { + if (writeErr) { + return console.log('WRITEERR: ' + writeErr) + } + + fs.writeFile(target2, 'target', function (writeErr) { + if (writeErr) { + return console.log('WRITEERR: ' + writeErr) + } + + var err = new Error('TEST BREAK') + err.syscall = 'rename' + err.code = 'EPERM' + cb(err) + }) + }) + }) + } + + var stream = writeStream(target2, { isWin: true }) + var hadError = false + var calledFinish = false + stream.on('error', function (er) { + hadError = true + console.log('#', er) + }) + stream.on('finish', function () { + calledFinish = true + }) + stream.on('close', function () { + t.is(hadError, true, 'error was caught') + t.is(calledFinish, false, 'finish was called before close') + }) + stream.end() +}) + +// test existing file with the same content +// test existing file with diff. content +test('rename eperm existing file different content', function (t) { + t.plan(2) + + var _rename = fs.rename + fs.existsSync = function (src) { + return true + } + fs.rename = function (src, dest, cb) { + // simulate a failure during rename where the file + // is renamed successfully but the process encounters + // an EPERM error and the target file that has the same content than the + // destination + _rename(src, dest, function (e) { + fs.writeFile(src, 'target2', function (writeErr) { + if (writeErr) { + return console.log('WRITEERR: ' + writeErr) + } + + fs.writeFile(target3, 'target2', function (writeErr) { + if (writeErr) { + return console.log('WRITEERR: ' + writeErr) + } + + var err = new Error('TEST BREAK') + err.syscall = 'rename' + err.code = 'EPERM' + cb(err) + }) + }) + }) + } + + var stream = writeStream(target3, { isWin: true }) + var hadError = false + var calledFinish = false + stream.on('error', function (er) { + hadError = true + console.log('#', er) + }) + stream.on('finish', function () { + calledFinish = true + }) + stream.on('close', function () { + t.is(hadError, false, 'error was caught') + t.is(calledFinish, true, 'finish was called before close') + }) + stream.end() +}) + +test('cleanup', function (t) { + rimraf.sync(target) + rimraf.sync(target2) + rimraf.sync(target3) + t.end() +}) diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/rename-fail.js b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/rename-fail.js new file mode 100644 index 000000000..7e27f0bfb --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/rename-fail.js @@ -0,0 +1,30 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') +var test = require('tap').test +var rimraf = require('rimraf') +var writeStream = require('../index.js') + +var target = path.resolve(__dirname, 'test-rename') + +test('rename fails', function (t) { + t.plan(1) + fs.rename = function (src, dest, cb) { + cb(new Error('TEST BREAK')) + } + var stream = writeStream(target) + var hadError = false + stream.on('error', function (er) { + hadError = true + console.log('#', er) + }) + stream.on('close', function () { + t.is(hadError, true, 'error before close') + }) + stream.end() +}) + +test('cleanup', function (t) { + rimraf.sync(target) + t.end() +}) diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/slow-close.js b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/slow-close.js new file mode 100644 index 000000000..9840a6ef0 --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/slow-close.js @@ -0,0 +1,40 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') +var test = require('tap').test +var rimraf = require('rimraf') +var writeStream = require('../index.js') + +var target = path.resolve(__dirname, 'test-chown') + +test('slow close', function (t) { + t.plan(2) + // The goal here is to simulate the "file close" step happening so slowly + // that the whole close/rename process could finish before the file is + // actually closed (and thus buffers truely flushed to the OS). In + // previous versions of this module, this would result in the module + // emitting finish & close before the file was fully written and in + // turn, could break other layers that tried to read the new file. + var realEmit = fs.WriteStream.prototype.emit + var reallyClosed = false + fs.WriteStream.prototype.emit = function (event) { + if (event !== 'close') return realEmit.apply(this, arguments) + setTimeout(function () { + reallyClosed = true + realEmit.call(this, 'close') + }.bind(this), 200) + } + var stream = writeStream(target) + stream.on('finish', function () { + t.is(reallyClosed, true, "didn't finish before target was closed") + }) + stream.on('close', function () { + t.is(reallyClosed, true, "didn't close before target was closed") + }) + stream.end() +}) + +test('cleanup', function (t) { + rimraf.sync(target) + t.end() +}) diff --git a/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/toolong.js b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/toolong.js new file mode 100644 index 000000000..f146cc55b --- /dev/null +++ b/public/node_modules/_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic/test/toolong.js @@ -0,0 +1,29 @@ +var path = require('path') +var test = require('tap').test +var writeStream = require('../index.js') + +function repeat (times, string) { + var output = '' + for (var ii = 0; ii < times; ++ii) { + output += string + } + return output +} + +var target = path.resolve(__dirname, repeat(1000, 'test')) + +test('name too long', function (t) { + t.plan(2) + var stream = writeStream(target) + var hadError = false + stream.on('error', function (er) { + if (!hadError) { + t.is(er.code, 'ENAMETOOLONG', target.length + ' character name results in ENAMETOOLONG') + hadError = true + } + }) + stream.on('close', function () { + t.ok(hadError, 'got error before close') + }) + stream.end() +}) diff --git a/public/node_modules/_fs.realpath@1.0.0@fs.realpath/LICENSE b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/LICENSE new file mode 100644 index 000000000..5bd884c25 --- /dev/null +++ b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/LICENSE @@ -0,0 +1,43 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + Copyright Joyent, Inc. and other Node contributors. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. diff --git a/public/node_modules/_fs.realpath@1.0.0@fs.realpath/README.md b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/README.md new file mode 100644 index 000000000..a42ceac62 --- /dev/null +++ b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/README.md @@ -0,0 +1,33 @@ +# fs.realpath + +A backwards-compatible fs.realpath for Node v6 and above + +In Node v6, the JavaScript implementation of fs.realpath was replaced +with a faster (but less resilient) native implementation. That raises +new and platform-specific errors and cannot handle long or excessively +symlink-looping paths. + +This module handles those cases by detecting the new errors and +falling back to the JavaScript implementation. On versions of Node +prior to v6, it has no effect. + +## USAGE + +```js +var rp = require('fs.realpath') + +// async version +rp.realpath(someLongAndLoopingPath, function (er, real) { + // the ELOOP was handled, but it was a bit slower +}) + +// sync version +var real = rp.realpathSync(someLongAndLoopingPath) + +// monkeypatch at your own risk! +// This replaces the fs.realpath/fs.realpathSync builtins +rp.monkeypatch() + +// un-do the monkeypatching +rp.unmonkeypatch() +``` diff --git a/public/node_modules/_fs.realpath@1.0.0@fs.realpath/index.js b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/index.js new file mode 100644 index 000000000..b09c7c7e6 --- /dev/null +++ b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/index.js @@ -0,0 +1,66 @@ +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = require('fs') +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = require('./old.js') + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} diff --git a/public/node_modules/_fs.realpath@1.0.0@fs.realpath/old.js b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/old.js new file mode 100644 index 000000000..b40305e73 --- /dev/null +++ b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/old.js @@ -0,0 +1,303 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var pathModule = require('path'); +var isWindows = process.platform === 'win32'; +var fs = require('fs'); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; diff --git a/public/node_modules/_fs.realpath@1.0.0@fs.realpath/package.json b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/package.json new file mode 100644 index 000000000..03d272218 --- /dev/null +++ b/public/node_modules/_fs.realpath@1.0.0@fs.realpath/package.json @@ -0,0 +1,29 @@ +{ + "name": "fs.realpath", + "version": "1.0.0", + "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "scripts": { + "test": "tap test/*.js --cov" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/fs.realpath.git" + }, + "keywords": [ + "realpath", + "fs", + "polyfill" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "files": [ + "old.js", + "index.js" + ], + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "fs.realpath@1.0.0", + "_resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_glob@7.1.6@glob/LICENSE b/public/node_modules/_glob@7.1.6@glob/LICENSE new file mode 100644 index 000000000..42ca266df --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/LICENSE @@ -0,0 +1,21 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/public/node_modules/_glob@7.1.6@glob/README.md b/public/node_modules/_glob@7.1.6@glob/README.md new file mode 100644 index 000000000..0916a4825 --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/README.md @@ -0,0 +1,375 @@ +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](logo/glob.png) + +## Usage + +Install with npm + +``` +npm i glob +``` + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* `cb` `{Function}` + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* return: `{Array}` filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` `{String}` pattern to search for +* `options` `{Object}` +* `cb` `{Function}` Called when an error occurs, or matches are found + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'FILE'` - Path exists, and is not a directory + * `'DIR'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the specific + thing that matched. It is not deduplicated or resolved to a realpath. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of glob patterns to exclude matches. + Note: `ignore` patterns are *always* in `dot:true` mode, regardless + of any other settings. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) +* `absolute` Set to true to always receive absolute paths for matched + files. Unlike `realpath`, this also affects the values returned in + the `match` event. + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +Previously, this module let you mark a pattern as a "comment" if it +started with a `#` character, or a "negated" pattern if it started +with a `!` character. + +These options were deprecated in version 5, and removed in version 6. + +To specify things that should not match, use the `ignore` option. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Glob Logo +Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). + +The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` + +![](oh-my-glob.gif) diff --git a/public/node_modules/_glob@7.1.6@glob/changelog.md b/public/node_modules/_glob@7.1.6@glob/changelog.md new file mode 100644 index 000000000..41636771e --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/changelog.md @@ -0,0 +1,67 @@ +## 7.0 + +- Raise error if `options.cwd` is specified, and not a directory + +## 6.0 + +- Remove comment and negation pattern support +- Ignore patterns are always in `dot:true` mode + +## 5.0 + +- Deprecate comment and negation patterns +- Fix regression in `mark` and `nodir` options from making all cache + keys absolute path. +- Abort if `fs.readdir` returns an error that's unexpected +- Don't emit `match` events for ignored items +- Treat ENOTSUP like ENOTDIR in readdir + +## 4.5 + +- Add `options.follow` to always follow directory symlinks in globstar +- Add `options.realpath` to call `fs.realpath` on all results +- Always cache based on absolute path + +## 4.4 + +- Add `options.ignore` +- Fix handling of broken symlinks + +## 4.3 + +- Bump minimatch to 2.x +- Pass all tests on Windows + +## 4.2 + +- Add `glob.hasMagic` function +- Add `options.nodir` flag + +## 4.1 + +- Refactor sync and async implementations for performance +- Throw if callback provided to sync glob function +- Treat symbolic links in globstar results the same as Bash 4.3 + +## 4.0 + +- Use `^` for dependency versions (bumped major because this breaks + older npm versions) +- Ensure callbacks are only ever called once +- switch to ISC license + +## 3.x + +- Rewrite in JavaScript +- Add support for setting root, cwd, and windows support +- Cache many fs calls +- Add globstar support +- emit match events + +## 2.x + +- Use `glob.h` and `fnmatch.h` from NetBSD + +## 1.x + +- `glob.h` static binding. diff --git a/public/node_modules/_glob@7.1.6@glob/common.js b/public/node_modules/_glob@7.1.6@glob/common.js new file mode 100644 index 000000000..66651bb3a --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/common.js @@ -0,0 +1,240 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + self.absolute = !!options.absolute + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/public/node_modules/_glob@7.1.6@glob/glob.js b/public/node_modules/_glob@7.1.6@glob/glob.js new file mode 100644 index 000000000..58dec0f6c --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/glob.js @@ -0,0 +1,790 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var rp = require('fs.realpath') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + this._processing = 0 + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + rp.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +} diff --git a/public/node_modules/_glob@7.1.6@glob/node_modules/fs.realpath b/public/node_modules/_glob@7.1.6@glob/node_modules/fs.realpath new file mode 120000 index 000000000..2f449036b --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/node_modules/fs.realpath @@ -0,0 +1 @@ +../../_fs.realpath@1.0.0@fs.realpath \ No newline at end of file diff --git a/public/node_modules/_glob@7.1.6@glob/node_modules/inflight b/public/node_modules/_glob@7.1.6@glob/node_modules/inflight new file mode 120000 index 000000000..b852998f1 --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/node_modules/inflight @@ -0,0 +1 @@ +../../_inflight@1.0.6@inflight \ No newline at end of file diff --git a/public/node_modules/_glob@7.1.6@glob/node_modules/inherits b/public/node_modules/_glob@7.1.6@glob/node_modules/inherits new file mode 120000 index 000000000..969efe69f --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/node_modules/inherits @@ -0,0 +1 @@ +../../_inherits@2.0.4@inherits \ No newline at end of file diff --git a/public/node_modules/_glob@7.1.6@glob/node_modules/minimatch b/public/node_modules/_glob@7.1.6@glob/node_modules/minimatch new file mode 120000 index 000000000..d165b49f4 --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/node_modules/minimatch @@ -0,0 +1 @@ +../../_minimatch@3.0.4@minimatch \ No newline at end of file diff --git a/public/node_modules/_glob@7.1.6@glob/node_modules/once b/public/node_modules/_glob@7.1.6@glob/node_modules/once new file mode 120000 index 000000000..af41050a0 --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/node_modules/once @@ -0,0 +1 @@ +../../_once@1.4.0@once \ No newline at end of file diff --git a/public/node_modules/_glob@7.1.6@glob/node_modules/path-is-absolute b/public/node_modules/_glob@7.1.6@glob/node_modules/path-is-absolute new file mode 120000 index 000000000..cc3d8e9f2 --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/node_modules/path-is-absolute @@ -0,0 +1 @@ +../../_path-is-absolute@1.0.1@path-is-absolute \ No newline at end of file diff --git a/public/node_modules/_glob@7.1.6@glob/package.json b/public/node_modules/_glob@7.1.6@glob/package.json new file mode 100644 index 000000000..d49240b23 --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/package.json @@ -0,0 +1,49 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "glob", + "description": "a little globber", + "version": "7.1.6", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "engines": { + "node": "*" + }, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^12.0.1", + "tick": "0.0.6" + }, + "scripts": { + "prepublish": "npm run benchclean", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" + }, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "glob@7.1.6", + "_resolved": "https://registry.npm.taobao.org/glob/download/glob-7.1.6.tgz?cache=0&sync_timestamp=1573184738008&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob%2Fdownload%2Fglob-7.1.6.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_glob@7.1.6@glob/sync.js b/public/node_modules/_glob@7.1.6@glob/sync.js new file mode 100644 index 000000000..c952134ba --- /dev/null +++ b/public/node_modules/_glob@7.1.6@glob/sync.js @@ -0,0 +1,486 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var rp = require('fs.realpath') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + + var abs = this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) { + e = abs + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/public/node_modules/_graceful-fs@4.2.3@graceful-fs/LICENSE b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/LICENSE new file mode 100644 index 000000000..9d2c80369 --- /dev/null +++ b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_graceful-fs@4.2.3@graceful-fs/README.md b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/README.md new file mode 100644 index 000000000..5273a50ad --- /dev/null +++ b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/README.md @@ -0,0 +1,133 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over [fs module](https://nodejs.org/api/fs.html) + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. + +## USAGE + +```javascript +// use just like fs +var fs = require('graceful-fs') + +// now go and do stuff with it... +fs.readFileSync('some-file-or-whatever') +``` + +## Global Patching + +If you want to patch the global fs module (or any other fs-like +module) you can do this: + +```javascript +// Make sure to read the caveat below. +var realFs = require('fs') +var gracefulFs = require('graceful-fs') +gracefulFs.gracefulify(realFs) +``` + +This should only ever be done at the top-level application layer, in +order to delay on EMFILE errors from any fs-using dependencies. You +should **not** do this in a library, because it can cause unexpected +delays in other parts of the program. + +## Changes + +This module is fairly stable at this point, and used by a lot of +things. That being said, because it implements a subtle behavior +change in a core part of the node API, even modest changes can be +extremely breaking, and the versioning is thus biased towards +bumping the major when in doubt. + +The main change between major versions has been switching between +providing a fully-patched `fs` module vs monkey-patching the node core +builtin, and the approach by which a non-monkey-patched `fs` was +created. + +The goal is to trade `EMFILE` errors for slower fs operations. So, if +you try to open a zillion files, rather than crashing, `open` +operations will be queued up and wait for something else to `close`. + +There are advantages to each approach. Monkey-patching the fs means +that no `EMFILE` errors can possibly occur anywhere in your +application, because everything is using the same core `fs` module, +which is patched. However, it can also obviously cause undesirable +side-effects, especially if the module is loaded multiple times. + +Implementing a separate-but-identical patched `fs` module is more +surgical (and doesn't run the risk of patching multiple times), but +also imposes the challenge of keeping in sync with the core module. + +The current approach loads the `fs` module, and then creates a +lookalike object that has all the same methods, except a few that are +patched. It is safe to use in all versions of Node from 0.8 through +7.0. + +### v4 + +* Do not monkey-patch the fs module. This module may now be used as a + drop-in dep, and users can opt into monkey-patching the fs builtin + if their app requires it. + +### v3 + +* Monkey-patch fs, because the eval approach no longer works on recent + node. +* fixed possible type-error throw if rename fails on windows +* verify that we *never* get EMFILE errors +* Ignore ENOSYS from chmod/chown +* clarify that graceful-fs must be used as a drop-in + +### v2.1.0 + +* Use eval rather than monkey-patching fs. +* readdir: Always sort the results +* win32: requeue a file if error has an OK status + +### v2.0 + +* A return to monkey patching +* wrap process.cwd + +### v1.1 + +* wrap readFile +* Wrap fs.writeFile. +* readdir protection +* Don't clobber the fs builtin +* Handle fs.read EAGAIN errors by trying again +* Expose the curOpen counter +* No-op lchown/lchmod if not implemented +* fs.rename patch only for win32 +* Patch fs.rename to handle AV software on Windows +* Close #4 Chown should not fail on einval or eperm if non-root +* Fix isaacs/fstream#1 Only wrap fs one time +* Fix #3 Start at 1024 max files, then back off on EMFILE +* lutimes that doens't blow up on Linux +* A full on-rewrite using a queue instead of just swallowing the EMFILE error +* Wrap Read/Write streams as well + +### 1.0 + +* Update engines for node 0.6 +* Be lstat-graceful on Windows +* first diff --git a/public/node_modules/_graceful-fs@4.2.3@graceful-fs/clone.js b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/clone.js new file mode 100644 index 000000000..028356c96 --- /dev/null +++ b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/clone.js @@ -0,0 +1,19 @@ +'use strict' + +module.exports = clone + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} diff --git a/public/node_modules/_graceful-fs@4.2.3@graceful-fs/graceful-fs.js b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/graceful-fs.js new file mode 100644 index 000000000..8c75ee259 --- /dev/null +++ b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/graceful-fs.js @@ -0,0 +1,346 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var clone = require('./clone.js') + +var util = require('util') + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!global[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = [] + Object.defineProperty(global, gracefulQueue, { + get: function() { + return queue + } + }) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + retry() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + retry() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(global[gracefulQueue]) + require('assert').equal(global[gracefulQueue].length, 0) + }) + } +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, options, cb) { + var args = [path] + if (typeof options !== 'function') { + args.push(options) + } else { + cb = options + } + args.push(go$readdir$cb) + + return go$readdir(args) + + function go$readdir$cb (err, files) { + if (files && files.sort) + files.sort() + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [args]]) + + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + } + } + + function go$readdir (args) { + return fs$readdir.apply(fs, args) + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + global[gracefulQueue].push(elem) +} + +function retry () { + var elem = global[gracefulQueue].shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} diff --git a/public/node_modules/_graceful-fs@4.2.3@graceful-fs/legacy-streams.js b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/legacy-streams.js new file mode 100644 index 000000000..d617b50fc --- /dev/null +++ b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/legacy-streams.js @@ -0,0 +1,118 @@ +var Stream = require('stream').Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} diff --git a/public/node_modules/_graceful-fs@4.2.3@graceful-fs/package.json b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/package.json new file mode 100644 index 000000000..0c1c52cdf --- /dev/null +++ b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/package.json @@ -0,0 +1,53 @@ +{ + "name": "graceful-fs", + "description": "A drop-in replacement for fs, making various improvements.", + "version": "4.2.3", + "repository": { + "type": "git", + "url": "https://github.com/isaacs/node-graceful-fs" + }, + "main": "graceful-fs.js", + "directories": { + "test": "test" + }, + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags", + "test": "node test.js | tap -" + }, + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "devDependencies": { + "import-fresh": "^2.0.0", + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^12.7.0" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js", + "clone.js" + ], + "dependencies": {}, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "graceful-fs@4.2.3", + "_resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.3.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_graceful-fs@4.2.3@graceful-fs/polyfills.js b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/polyfills.js new file mode 100644 index 000000000..a5808d23f --- /dev/null +++ b/public/node_modules/_graceful-fs@4.2.3@graceful-fs/polyfills.js @@ -0,0 +1,342 @@ +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null + +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) + + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. + + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + }})(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + + // This ensures `util.promisify` works as it does for native `fs.read`. + read.__proto__ = fs$read + return read + })(fs.read) + + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) + + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + } + + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } + + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + return stats; + } + } + + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false + } +} diff --git a/public/node_modules/_has-flag@3.0.0@has-flag/index.js b/public/node_modules/_has-flag@3.0.0@has-flag/index.js new file mode 100644 index 000000000..5139728fb --- /dev/null +++ b/public/node_modules/_has-flag@3.0.0@has-flag/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; diff --git a/public/node_modules/_has-flag@3.0.0@has-flag/license b/public/node_modules/_has-flag@3.0.0@has-flag/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_has-flag@3.0.0@has-flag/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_has-flag@3.0.0@has-flag/package.json b/public/node_modules/_has-flag@3.0.0@has-flag/package.json new file mode 100644 index 000000000..55a569059 --- /dev/null +++ b/public/node_modules/_has-flag@3.0.0@has-flag/package.json @@ -0,0 +1,47 @@ +{ + "name": "has-flag", + "version": "3.0.0", + "description": "Check if argv has a specific flag", + "license": "MIT", + "repository": "sindresorhus/has-flag", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "has", + "check", + "detect", + "contains", + "find", + "flag", + "cli", + "command-line", + "argv", + "process", + "arg", + "args", + "argument", + "arguments", + "getopt", + "minimist", + "optimist" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "has-flag@3.0.0", + "_resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_has-flag@3.0.0@has-flag/readme.md b/public/node_modules/_has-flag@3.0.0@has-flag/readme.md new file mode 100644 index 000000000..677893c27 --- /dev/null +++ b/public/node_modules/_has-flag@3.0.0@has-flag/readme.md @@ -0,0 +1,70 @@ +# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) + +> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag + +Correctly stops looking after an `--` argument terminator. + + +## Install + +``` +$ npm install has-flag +``` + + +## Usage + +```js +// foo.js +const hasFlag = require('has-flag'); + +hasFlag('unicorn'); +//=> true + +hasFlag('--unicorn'); +//=> true + +hasFlag('f'); +//=> true + +hasFlag('-f'); +//=> true + +hasFlag('foo=bar'); +//=> true + +hasFlag('foo'); +//=> false + +hasFlag('rainbow'); +//=> false +``` + +``` +$ node foo.js -f --unicorn --foo=bar -- --rainbow +``` + + +## API + +### hasFlag(flag, [argv]) + +Returns a boolean for whether the flag exists. + +#### flag + +Type: `string` + +CLI flag to look for. The `--` prefix is optional. + +#### argv + +Type: `string[]`
+Default: `process.argv` + +CLI arguments. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_iferr@0.1.5@iferr/.npmignore b/public/node_modules/_iferr@0.1.5@iferr/.npmignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/public/node_modules/_iferr@0.1.5@iferr/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/public/node_modules/_iferr@0.1.5@iferr/LICENSE b/public/node_modules/_iferr@0.1.5@iferr/LICENSE new file mode 100644 index 000000000..19d5f4bce --- /dev/null +++ b/public/node_modules/_iferr@0.1.5@iferr/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Nadav Ivgi + +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/public/node_modules/_iferr@0.1.5@iferr/README.md b/public/node_modules/_iferr@0.1.5@iferr/README.md new file mode 100644 index 000000000..0940763fa --- /dev/null +++ b/public/node_modules/_iferr@0.1.5@iferr/README.md @@ -0,0 +1,40 @@ +# iferr + +Higher-order functions for easier error handling. + +`if (err) return cb(err);` be gone! + +## Install +```bash +npm install iferr +``` + +## Use + +### JavaScript example +```js +var iferr = require('iferr'); + +function get_friends_count(id, cb) { + User.load_user(id, iferr(cb, function(user) { + user.load_friends(iferr(cb, function(friends) { + cb(null, friends.length); + })); + })); +} +``` + +### CoffeeScript example +```coffee +iferr = require 'iferr' + +get_friends_count = (id, cb) -> + User.load_user id, iferr cb, (user) -> + user.load_friends iferr cb, (friends) -> + cb null, friends.length +``` + +(TODO: document tiferr, throwerr and printerr) + +## License +MIT diff --git a/public/node_modules/_iferr@0.1.5@iferr/index.coffee b/public/node_modules/_iferr@0.1.5@iferr/index.coffee new file mode 100644 index 000000000..da6d00719 --- /dev/null +++ b/public/node_modules/_iferr@0.1.5@iferr/index.coffee @@ -0,0 +1,24 @@ +# Delegates to `succ` on sucecss or to `fail` on error +# ex: Thing.load 123, iferr cb, (thing) -> ... +iferr = (fail, succ) -> (err, a...) -> + if err? then fail err + else succ? a... + +# Like iferr, but also catches errors thrown from `succ` and passes to `fail` +tiferr = (fail, succ) -> iferr fail, (a...) -> + try succ a... + catch err then fail err + +# Delegate to the success function on success, or throw the error otherwise +# ex: Thing.load 123, throwerr (thing) -> ... +throwerr = iferr.bind null, (err) -> throw err + +# Prints errors when one is passed, or does nothing otherwise +# ex: thing.save printerr +printerr = iferr (err) -> console.error err.stack or err + +module.exports = exports = iferr +exports.iferr = iferr +exports.tiferr = tiferr +exports.throwerr = throwerr +exports.printerr = printerr diff --git a/public/node_modules/_iferr@0.1.5@iferr/index.js b/public/node_modules/_iferr@0.1.5@iferr/index.js new file mode 100644 index 000000000..78fce3d2b --- /dev/null +++ b/public/node_modules/_iferr@0.1.5@iferr/index.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var exports, iferr, printerr, throwerr, tiferr, + __slice = [].slice; + + iferr = function(fail, succ) { + return function() { + var a, err; + err = arguments[0], a = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (err != null) { + return fail(err); + } else { + return typeof succ === "function" ? succ.apply(null, a) : void 0; + } + }; + }; + + tiferr = function(fail, succ) { + return iferr(fail, function() { + var a, err; + a = 1 <= arguments.length ? __slice.call(arguments, 0) : []; + try { + return succ.apply(null, a); + } catch (_error) { + err = _error; + return fail(err); + } + }); + }; + + throwerr = iferr.bind(null, function(err) { + throw err; + }); + + printerr = iferr(function(err) { + return console.error(err.stack || err); + }); + + module.exports = exports = iferr; + + exports.iferr = iferr; + + exports.tiferr = tiferr; + + exports.throwerr = throwerr; + + exports.printerr = printerr; + +}).call(this); diff --git a/public/node_modules/_iferr@0.1.5@iferr/package.json b/public/node_modules/_iferr@0.1.5@iferr/package.json new file mode 100644 index 000000000..2999ed78e --- /dev/null +++ b/public/node_modules/_iferr@0.1.5@iferr/package.json @@ -0,0 +1,31 @@ +{ + "name": "iferr", + "version": "0.1.5", + "description": "Higher-order functions for easier error handling", + "main": "index.js", + "scripts": { + "test": "mocha", + "prepublish": "coffee -c index.coffee" + }, + "repository": { + "type": "git", + "url": "https://github.com/shesek/iferr" + }, + "keywords": [ + "error", + "errors" + ], + "author": "Nadav Ivgi", + "license": "MIT", + "bugs": { + "url": "https://github.com/shesek/iferr/issues" + }, + "homepage": "https://github.com/shesek/iferr", + "devDependencies": { + "coffee-script": "^1.7.1", + "mocha": "^1.18.2" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "iferr@0.1.5", + "_resolved": "https://registry.npm.taobao.org/iferr/download/iferr-0.1.5.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_iferr@0.1.5@iferr/test/index.coffee b/public/node_modules/_iferr@0.1.5@iferr/test/index.coffee new file mode 100644 index 000000000..be0bc56fd --- /dev/null +++ b/public/node_modules/_iferr@0.1.5@iferr/test/index.coffee @@ -0,0 +1,42 @@ +{ iferr, tiferr, throwerr } = require '../index.coffee' +{ equal: eq, throws } = require 'assert' + +invoke_fail = (cb) -> cb new Error 'callback error' +invoke_succ = (cb) -> cb null +throw_error = -> throw new Error 'thrown' + +describe 'iferr', -> + it 'calls the error callback on errors', (done) -> + invoke_fail iferr( + (err) -> + eq err.message, 'callback error' + do done + -> + done new Error 'shouldn\'t call the success callback' + ) + + it 'calls the success callback on success', (done) -> + invoke_succ iferr( + -> done new Error 'shouldn\'t call the error callback' + done + ) + +describe 'tiferr', -> + it 'catches errors in the success callback', (done) -> + invoke_succ tiferr( + (err) -> + eq err.message, 'thrown' + do done + throw_error + ) + +describe 'throwerr', -> + it 'throws errors passed to the callback', (done)-> + try invoke_fail throwerr -> + done 'shouldn\'t call the success callback' + catch err + eq err.message, 'callback error' + do done + + it 'delegates to the success callback otherwise', (done) -> + invoke_succ throwerr done diff --git a/public/node_modules/_iferr@0.1.5@iferr/test/mocha.opts b/public/node_modules/_iferr@0.1.5@iferr/test/mocha.opts new file mode 100644 index 000000000..019defcf1 --- /dev/null +++ b/public/node_modules/_iferr@0.1.5@iferr/test/mocha.opts @@ -0,0 +1,2 @@ +--compilers coffee:coffee-script/register +--reporter spec diff --git a/public/node_modules/_imurmurhash@0.1.4@imurmurhash/README.md b/public/node_modules/_imurmurhash@0.1.4@imurmurhash/README.md new file mode 100644 index 000000000..f35b20a0e --- /dev/null +++ b/public/node_modules/_imurmurhash@0.1.4@imurmurhash/README.md @@ -0,0 +1,122 @@ +iMurmurHash.js +============== + +An incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js). + +This version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing. + +Installation +------------ + +To use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site. + +```html + + +``` + +--- + +To use iMurmurHash in Node.js, install the module using NPM: + +```bash +npm install imurmurhash +``` + +Then simply include it in your scripts: + +```javascript +MurmurHash3 = require('imurmurhash'); +``` + +Quick Example +------------- + +```javascript +// Create the initial hash +var hashState = MurmurHash3('string'); + +// Incrementally add text +hashState.hash('more strings'); +hashState.hash('even more strings'); + +// All calls can be chained if desired +hashState.hash('and').hash('some').hash('more'); + +// Get a result +hashState.result(); +// returns 0xe4ccfe6b +``` + +Functions +--------- + +### MurmurHash3 ([string], [seed]) +Get a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example: + +```javascript +// Use the cached object, calling the function again will return the same +// object (but reset, so the current state would be lost) +hashState = MurmurHash3(); +... + +// Create a new object that can be safely used however you wish. Calling the +// function again will simply return a new state object, and no state loss +// will occur, at the cost of creating more objects. +hashState = new MurmurHash3(); +``` + +Both methods can be mixed however you like if you have different use cases. + +--- + +### MurmurHash3.prototype.hash (string) +Incrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained. + +--- + +### MurmurHash3.prototype.result () +Get the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`. + +```javascript +// Do the whole string at once +MurmurHash3('this is a test string').result(); +// 0x70529328 + +// Do part of the string, get a result, then the other part +var m = MurmurHash3('this is a'); +m.result(); +// 0xbfc4f834 +m.hash(' test string').result(); +// 0x70529328 (same as above) +``` + +--- + +### MurmurHash3.prototype.reset ([seed]) +Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained. + +--- + +License (MIT) +------------- +Copyright (c) 2013 Gary Court, Jens Taylor + +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/public/node_modules/_imurmurhash@0.1.4@imurmurhash/imurmurhash.js b/public/node_modules/_imurmurhash@0.1.4@imurmurhash/imurmurhash.js new file mode 100644 index 000000000..e63146a2b --- /dev/null +++ b/public/node_modules/_imurmurhash@0.1.4@imurmurhash/imurmurhash.js @@ -0,0 +1,138 @@ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +(function(){ + var cache; + + // Call this function without `new` to use the cached object (good for + // single-threaded environments), or with `new` to create a new object. + // + // @param {string} key A UTF-16 or ASCII string + // @param {number} seed An optional positive integer + // @return {object} A MurmurHash3 object for incremental hashing + function MurmurHash3(key, seed) { + var m = this instanceof MurmurHash3 ? this : cache; + m.reset(seed) + if (typeof key === 'string' && key.length > 0) { + m.hash(key); + } + + if (m !== this) { + return m; + } + }; + + // Incrementally add a string to this hash + // + // @param {string} key A UTF-16 or ASCII string + // @return {object} this + MurmurHash3.prototype.hash = function(key) { + var h1, k1, i, top, len; + + len = key.length; + this.len += len; + + k1 = this.k1; + i = 0; + switch (this.rem) { + case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; + case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; + case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; + case 3: + k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; + k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; + } + + this.rem = (len + this.rem) & 3; // & 3 is same as % 4 + len -= this.rem; + if (len > 0) { + h1 = this.h1; + while (1) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + + h1 ^= k1; + h1 = (h1 << 13) | (h1 >>> 19); + h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; + + if (i >= len) { + break; + } + + k1 = ((key.charCodeAt(i++) & 0xffff)) ^ + ((key.charCodeAt(i++) & 0xffff) << 8) ^ + ((key.charCodeAt(i++) & 0xffff) << 16); + top = key.charCodeAt(i++); + k1 ^= ((top & 0xff) << 24) ^ + ((top & 0xff00) >> 8); + } + + k1 = 0; + switch (this.rem) { + case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; + case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; + case 1: k1 ^= (key.charCodeAt(i) & 0xffff); + } + + this.h1 = h1; + } + + this.k1 = k1; + return this; + }; + + // Get the result of this hash + // + // @return {number} The 32-bit hash + MurmurHash3.prototype.result = function() { + var k1, h1; + + k1 = this.k1; + h1 = this.h1; + + if (k1 > 0) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + h1 ^= k1; + } + + h1 ^= this.len; + + h1 ^= h1 >>> 16; + h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; + h1 ^= h1 >>> 13; + h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; + h1 ^= h1 >>> 16; + + return h1 >>> 0; + }; + + // Reset the hash object for reuse + // + // @param {number} seed An optional positive integer + MurmurHash3.prototype.reset = function(seed) { + this.h1 = typeof seed === 'number' ? seed : 0; + this.rem = this.k1 = this.len = 0; + return this; + }; + + // A cached object to use. This can be safely used if you're in a single- + // threaded environment, otherwise you need to create new hashes to use. + cache = new MurmurHash3(); + + if (typeof(module) != 'undefined') { + module.exports = MurmurHash3; + } else { + this.MurmurHash3 = MurmurHash3; + } +}()); diff --git a/public/node_modules/_imurmurhash@0.1.4@imurmurhash/imurmurhash.min.js b/public/node_modules/_imurmurhash@0.1.4@imurmurhash/imurmurhash.min.js new file mode 100644 index 000000000..dc0ee88d6 --- /dev/null +++ b/public/node_modules/_imurmurhash@0.1.4@imurmurhash/imurmurhash.min.js @@ -0,0 +1,12 @@ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +!function(){function t(h,r){var s=this instanceof t?this:e;return s.reset(r),"string"==typeof h&&h.length>0&&s.hash(h),s!==this?s:void 0}var e;t.prototype.hash=function(t){var e,h,r,s,i;switch(i=t.length,this.len+=i,h=this.k1,r=0,this.rem){case 0:h^=i>r?65535&t.charCodeAt(r++):0;case 1:h^=i>r?(65535&t.charCodeAt(r++))<<8:0;case 2:h^=i>r?(65535&t.charCodeAt(r++))<<16:0;case 3:h^=i>r?(255&t.charCodeAt(r))<<24:0,h^=i>r?(65280&t.charCodeAt(r++))>>8:0}if(this.rem=3&i+this.rem,i-=this.rem,i>0){for(e=this.h1;;){if(h=4294967295&11601*h+3432906752*(65535&h),h=h<<15|h>>>17,h=4294967295&13715*h+461832192*(65535&h),e^=h,e=e<<13|e>>>19,e=4294967295&5*e+3864292196,r>=i)break;h=65535&t.charCodeAt(r++)^(65535&t.charCodeAt(r++))<<8^(65535&t.charCodeAt(r++))<<16,s=t.charCodeAt(r++),h^=(255&s)<<24^(65280&s)>>8}switch(h=0,this.rem){case 3:h^=(65535&t.charCodeAt(r+2))<<16;case 2:h^=(65535&t.charCodeAt(r+1))<<8;case 1:h^=65535&t.charCodeAt(r)}this.h1=e}return this.k1=h,this},t.prototype.result=function(){var t,e;return t=this.k1,e=this.h1,t>0&&(t=4294967295&11601*t+3432906752*(65535&t),t=t<<15|t>>>17,t=4294967295&13715*t+461832192*(65535&t),e^=t),e^=this.len,e^=e>>>16,e=4294967295&51819*e+2246770688*(65535&e),e^=e>>>13,e=4294967295&44597*e+3266445312*(65535&e),e^=e>>>16,e>>>0},t.prototype.reset=function(t){return this.h1="number"==typeof t?t:0,this.rem=this.k1=this.len=0,this},e=new t,"undefined"!=typeof module?module.exports=t:this.MurmurHash3=t}(); \ No newline at end of file diff --git a/public/node_modules/_imurmurhash@0.1.4@imurmurhash/package.json b/public/node_modules/_imurmurhash@0.1.4@imurmurhash/package.json new file mode 100644 index 000000000..6aeb63aee --- /dev/null +++ b/public/node_modules/_imurmurhash@0.1.4@imurmurhash/package.json @@ -0,0 +1,41 @@ +{ + "name": "imurmurhash", + "version": "0.1.4", + "description": "An incremental implementation of MurmurHash3", + "homepage": "https://github.com/jensyt/imurmurhash-js", + "main": "imurmurhash.js", + "files": [ + "imurmurhash.js", + "imurmurhash.min.js", + "package.json", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/jensyt/imurmurhash-js" + }, + "bugs": { + "url": "https://github.com/jensyt/imurmurhash-js/issues" + }, + "keywords": [ + "murmur", + "murmurhash", + "murmurhash3", + "hash", + "incremental" + ], + "author": { + "name": "Jens Taylor", + "email": "jensyt@gmail.com", + "url": "https://github.com/homebrewing" + }, + "license": "MIT", + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.8.19" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "imurmurhash@0.1.4", + "_resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_indent-string@4.0.0@indent-string/index.d.ts b/public/node_modules/_indent-string@4.0.0@indent-string/index.d.ts new file mode 100644 index 000000000..118523115 --- /dev/null +++ b/public/node_modules/_indent-string@4.0.0@indent-string/index.d.ts @@ -0,0 +1,42 @@ +declare namespace indentString { + interface Options { + /** + The string to use for the indent. + + @default ' ' + */ + readonly indent?: string; + + /** + Also indent empty lines. + + @default false + */ + readonly includeEmptyLines?: boolean; + } +} + +/** +Indent each line in a string. + +@param string - The string to indent. +@param count - How many times you want `options.indent` repeated. Default: `1`. + +@example +``` +import indentString = require('indent-string'); + +indentString('Unicorns\nRainbows', 4); +//=> ' Unicorns\n Rainbows' + +indentString('Unicorns\nRainbows', 4, {indent: '♥'}); +//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows' +``` +*/ +declare function indentString( + string: string, + count?: number, + options?: indentString.Options +): string; + +export = indentString; diff --git a/public/node_modules/_indent-string@4.0.0@indent-string/index.js b/public/node_modules/_indent-string@4.0.0@indent-string/index.js new file mode 100644 index 000000000..e1ab804f2 --- /dev/null +++ b/public/node_modules/_indent-string@4.0.0@indent-string/index.js @@ -0,0 +1,35 @@ +'use strict'; + +module.exports = (string, count = 1, options) => { + options = { + indent: ' ', + includeEmptyLines: false, + ...options + }; + + if (typeof string !== 'string') { + throw new TypeError( + `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` + ); + } + + if (typeof count !== 'number') { + throw new TypeError( + `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` + ); + } + + if (typeof options.indent !== 'string') { + throw new TypeError( + `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` + ); + } + + if (count === 0) { + return string; + } + + const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + + return string.replace(regex, options.indent.repeat(count)); +}; diff --git a/public/node_modules/_indent-string@4.0.0@indent-string/license b/public/node_modules/_indent-string@4.0.0@indent-string/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_indent-string@4.0.0@indent-string/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_indent-string@4.0.0@indent-string/package.json b/public/node_modules/_indent-string@4.0.0@indent-string/package.json new file mode 100644 index 000000000..3e395347c --- /dev/null +++ b/public/node_modules/_indent-string@4.0.0@indent-string/package.json @@ -0,0 +1,40 @@ +{ + "name": "indent-string", + "version": "4.0.0", + "description": "Indent each line in a string", + "license": "MIT", + "repository": "sindresorhus/indent-string", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "indent", + "string", + "pad", + "align", + "line", + "text", + "each", + "every" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "indent-string@4.0.0", + "_resolved": "https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_indent-string@4.0.0@indent-string/readme.md b/public/node_modules/_indent-string@4.0.0@indent-string/readme.md new file mode 100644 index 000000000..49967de07 --- /dev/null +++ b/public/node_modules/_indent-string@4.0.0@indent-string/readme.md @@ -0,0 +1,70 @@ +# indent-string [![Build Status](https://travis-ci.org/sindresorhus/indent-string.svg?branch=master)](https://travis-ci.org/sindresorhus/indent-string) + +> Indent each line in a string + + +## Install + +``` +$ npm install indent-string +``` + + +## Usage + +```js +const indentString = require('indent-string'); + +indentString('Unicorns\nRainbows', 4); +//=> ' Unicorns\n Rainbows' + +indentString('Unicorns\nRainbows', 4, {indent: '♥'}); +//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows' +``` + + +## API + +### indentString(string, [count], [options]) + +#### string + +Type: `string` + +The string to indent. + +#### count + +Type: `number`
+Default: `1` + +How many times you want `options.indent` repeated. + +#### options + +Type: `object` + +##### indent + +Type: `string`
+Default: `' '` + +The string to use for the indent. + +##### includeEmptyLines + +Type: `boolean`
+Default: `false` + +Also indent empty lines. + + +## Related + +- [indent-string-cli](https://github.com/sindresorhus/indent-string-cli) - CLI for this module +- [strip-indent](https://github.com/sindresorhus/strip-indent) - Strip leading whitespace from every line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_infer-owner@1.0.4@infer-owner/LICENSE b/public/node_modules/_infer-owner@1.0.4@infer-owner/LICENSE new file mode 100644 index 000000000..20a476254 --- /dev/null +++ b/public/node_modules/_infer-owner@1.0.4@infer-owner/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) npm, Inc. and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_infer-owner@1.0.4@infer-owner/README.md b/public/node_modules/_infer-owner@1.0.4@infer-owner/README.md new file mode 100644 index 000000000..146caf7b8 --- /dev/null +++ b/public/node_modules/_infer-owner@1.0.4@infer-owner/README.md @@ -0,0 +1,41 @@ +# infer-owner + +Infer the owner of a path based on the owner of its nearest existing parent + +## USAGE + +```js +const inferOwner = require('infer-owner') + +inferOwner('/some/cache/folder/file').then(owner => { + // owner is {uid, gid} that should be attached to + // the /some/cache/folder/file, based on ownership + // of /some/cache/folder, /some/cache, /some, or /, + // whichever is the first to exist +}) + +// same, but not async +const owner = inferOwner.sync('/some/cache/folder/file') + +// results are cached! to reset the cache (eg, to change +// permissions for whatever reason), do this: +inferOwner.clearCache() +``` + +This module endeavors to be as performant as possible. Parallel requests +for ownership of the same path will only stat the directories one time. + +## API + +* `inferOwner(path) -> Promise<{ uid, gid }>` + + If the path exists, return its uid and gid. If it does not, look to + its parent, then its grandparent, and so on. + +* `inferOwner(path) -> { uid, gid }` + + Sync form of `inferOwner(path)`. + +* `inferOwner.clearCache()` + + Delete all cached ownership information and in-flight tracking. diff --git a/public/node_modules/_infer-owner@1.0.4@infer-owner/index.js b/public/node_modules/_infer-owner@1.0.4@infer-owner/index.js new file mode 100644 index 000000000..a7bddcbd2 --- /dev/null +++ b/public/node_modules/_infer-owner@1.0.4@infer-owner/index.js @@ -0,0 +1,71 @@ +const cache = new Map() +const fs = require('fs') +const { dirname, resolve } = require('path') + + +const lstat = path => new Promise((res, rej) => + fs.lstat(path, (er, st) => er ? rej(er) : res(st))) + +const inferOwner = path => { + path = resolve(path) + if (cache.has(path)) + return Promise.resolve(cache.get(path)) + + const statThen = st => { + const { uid, gid } = st + cache.set(path, { uid, gid }) + return { uid, gid } + } + const parent = dirname(path) + const parentTrap = parent === path ? null : er => { + return inferOwner(parent).then((owner) => { + cache.set(path, owner) + return owner + }) + } + return lstat(path).then(statThen, parentTrap) +} + +const inferOwnerSync = path => { + path = resolve(path) + if (cache.has(path)) + return cache.get(path) + + const parent = dirname(path) + + // avoid obscuring call site by re-throwing + // "catch" the error by returning from a finally, + // only if we're not at the root, and the parent call works. + let threw = true + try { + const st = fs.lstatSync(path) + threw = false + const { uid, gid } = st + cache.set(path, { uid, gid }) + return { uid, gid } + } finally { + if (threw && parent !== path) { + const owner = inferOwnerSync(parent) + cache.set(path, owner) + return owner // eslint-disable-line no-unsafe-finally + } + } +} + +const inflight = new Map() +module.exports = path => { + path = resolve(path) + if (inflight.has(path)) + return Promise.resolve(inflight.get(path)) + const p = inferOwner(path).then(owner => { + inflight.delete(path) + return owner + }) + inflight.set(path, p) + return p +} +module.exports.sync = inferOwnerSync +module.exports.clearCache = () => { + cache.clear() + inflight.clear() +} diff --git a/public/node_modules/_infer-owner@1.0.4@infer-owner/package.json b/public/node_modules/_infer-owner@1.0.4@infer-owner/package.json new file mode 100644 index 000000000..55cba63f3 --- /dev/null +++ b/public/node_modules/_infer-owner@1.0.4@infer-owner/package.json @@ -0,0 +1,29 @@ +{ + "name": "infer-owner", + "version": "1.0.4", + "description": "Infer the owner of a path based on the owner of its nearest existing parent", + "author": "Isaac Z. Schlueter (https://izs.me)", + "license": "ISC", + "scripts": { + "test": "tap -J test/*.js --100", + "snap": "TAP_SNAPSHOT=1 tap -J test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "devDependencies": { + "mutate-fs": "^2.1.1", + "tap": "^12.4.2" + }, + "main": "index.js", + "repository": "https://github.com/npm/infer-owner", + "publishConfig": { + "access": "public" + }, + "files": [ + "index.js" + ], + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "infer-owner@1.0.4", + "_resolved": "https://registry.npm.taobao.org/infer-owner/download/infer-owner-1.0.4.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_inflight@1.0.6@inflight/LICENSE b/public/node_modules/_inflight@1.0.6@inflight/LICENSE new file mode 100644 index 000000000..05eeeb88c --- /dev/null +++ b/public/node_modules/_inflight@1.0.6@inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_inflight@1.0.6@inflight/README.md b/public/node_modules/_inflight@1.0.6@inflight/README.md new file mode 100644 index 000000000..6dc892917 --- /dev/null +++ b/public/node_modules/_inflight@1.0.6@inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/public/node_modules/_inflight@1.0.6@inflight/inflight.js b/public/node_modules/_inflight@1.0.6@inflight/inflight.js new file mode 100644 index 000000000..48202b3ca --- /dev/null +++ b/public/node_modules/_inflight@1.0.6@inflight/inflight.js @@ -0,0 +1,54 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/public/node_modules/_inflight@1.0.6@inflight/node_modules/once b/public/node_modules/_inflight@1.0.6@inflight/node_modules/once new file mode 120000 index 000000000..af41050a0 --- /dev/null +++ b/public/node_modules/_inflight@1.0.6@inflight/node_modules/once @@ -0,0 +1 @@ +../../_once@1.4.0@once \ No newline at end of file diff --git a/public/node_modules/_inflight@1.0.6@inflight/node_modules/wrappy b/public/node_modules/_inflight@1.0.6@inflight/node_modules/wrappy new file mode 120000 index 000000000..72e78997f --- /dev/null +++ b/public/node_modules/_inflight@1.0.6@inflight/node_modules/wrappy @@ -0,0 +1 @@ +../../_wrappy@1.0.2@wrappy \ No newline at end of file diff --git a/public/node_modules/_inflight@1.0.6@inflight/package.json b/public/node_modules/_inflight@1.0.6@inflight/package.json new file mode 100644 index 000000000..7cfdf046e --- /dev/null +++ b/public/node_modules/_inflight@1.0.6@inflight/package.json @@ -0,0 +1,32 @@ +{ + "name": "inflight", + "version": "1.0.6", + "description": "Add callbacks to requests in flight to avoid async duplication", + "main": "inflight.js", + "files": [ + "inflight.js" + ], + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^7.1.2" + }, + "scripts": { + "test": "tap test.js --100" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/inflight.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "inflight@1.0.6", + "_resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_inherits@2.0.4@inherits/LICENSE b/public/node_modules/_inherits@2.0.4@inherits/LICENSE new file mode 100644 index 000000000..dea3013d6 --- /dev/null +++ b/public/node_modules/_inherits@2.0.4@inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/public/node_modules/_inherits@2.0.4@inherits/README.md b/public/node_modules/_inherits@2.0.4@inherits/README.md new file mode 100644 index 000000000..b1c566585 --- /dev/null +++ b/public/node_modules/_inherits@2.0.4@inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/public/node_modules/_inherits@2.0.4@inherits/inherits.js b/public/node_modules/_inherits@2.0.4@inherits/inherits.js new file mode 100644 index 000000000..f71f2d932 --- /dev/null +++ b/public/node_modules/_inherits@2.0.4@inherits/inherits.js @@ -0,0 +1,9 @@ +try { + var util = require('util'); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = require('./inherits_browser.js'); +} diff --git a/public/node_modules/_inherits@2.0.4@inherits/inherits_browser.js b/public/node_modules/_inherits@2.0.4@inherits/inherits_browser.js new file mode 100644 index 000000000..86bbb3dc2 --- /dev/null +++ b/public/node_modules/_inherits@2.0.4@inherits/inherits_browser.js @@ -0,0 +1,27 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} diff --git a/public/node_modules/_inherits@2.0.4@inherits/package.json b/public/node_modules/_inherits@2.0.4@inherits/package.json new file mode 100644 index 000000000..5be71d913 --- /dev/null +++ b/public/node_modules/_inherits@2.0.4@inherits/package.json @@ -0,0 +1,32 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.4", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": "git://github.com/isaacs/inherits", + "license": "ISC", + "scripts": { + "test": "tap" + }, + "devDependencies": { + "tap": "^14.2.4" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ], + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "inherits@2.0.4", + "_resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_isarray@1.0.0@isarray/.npmignore b/public/node_modules/_isarray@1.0.0@isarray/.npmignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/public/node_modules/_isarray@1.0.0@isarray/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/public/node_modules/_isarray@1.0.0@isarray/.travis.yml b/public/node_modules/_isarray@1.0.0@isarray/.travis.yml new file mode 100644 index 000000000..cc4dba29d --- /dev/null +++ b/public/node_modules/_isarray@1.0.0@isarray/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/public/node_modules/_isarray@1.0.0@isarray/Makefile b/public/node_modules/_isarray@1.0.0@isarray/Makefile new file mode 100644 index 000000000..787d56e1e --- /dev/null +++ b/public/node_modules/_isarray@1.0.0@isarray/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test.js + +.PHONY: test + diff --git a/public/node_modules/_isarray@1.0.0@isarray/README.md b/public/node_modules/_isarray@1.0.0@isarray/README.md new file mode 100644 index 000000000..16d2c59c6 --- /dev/null +++ b/public/node_modules/_isarray@1.0.0@isarray/README.md @@ -0,0 +1,60 @@ + +# isarray + +`Array#isArray` for older browsers. + +[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) +[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) + +[![browser support](https://ci.testling.com/juliangruber/isarray.png) +](https://ci.testling.com/juliangruber/isarray) + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/public/node_modules/_isarray@1.0.0@isarray/component.json b/public/node_modules/_isarray@1.0.0@isarray/component.json new file mode 100644 index 000000000..9e31b6838 --- /dev/null +++ b/public/node_modules/_isarray@1.0.0@isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/public/node_modules/_isarray@1.0.0@isarray/index.js b/public/node_modules/_isarray@1.0.0@isarray/index.js new file mode 100644 index 000000000..a57f63495 --- /dev/null +++ b/public/node_modules/_isarray@1.0.0@isarray/index.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; diff --git a/public/node_modules/_isarray@1.0.0@isarray/package.json b/public/node_modules/_isarray@1.0.0@isarray/package.json new file mode 100644 index 000000000..a235aedd6 --- /dev/null +++ b/public/node_modules/_isarray@1.0.0@isarray/package.json @@ -0,0 +1,48 @@ +{ + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "1.0.0", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tape": "~2.13.4" + }, + "keywords": [ + "browser", + "isarray", + "array" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "scripts": { + "test": "tape test.js" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "isarray@1.0.0", + "_resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz?cache=0&sync_timestamp=1562592125418&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fisarray%2Fdownload%2Fisarray-1.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_isarray@1.0.0@isarray/test.js b/public/node_modules/_isarray@1.0.0@isarray/test.js new file mode 100644 index 000000000..e0c3444d8 --- /dev/null +++ b/public/node_modules/_isarray@1.0.0@isarray/test.js @@ -0,0 +1,20 @@ +var isArray = require('./'); +var test = require('tape'); + +test('is array', function(t){ + t.ok(isArray([])); + t.notOk(isArray({})); + t.notOk(isArray(null)); + t.notOk(isArray(false)); + + var obj = {}; + obj[0] = true; + t.notOk(isArray(obj)); + + var arr = []; + arr.foo = 'bar'; + t.ok(isArray(arr)); + + t.end(); +}); + diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/LICENSE b/public/node_modules/_jest-worker@24.9.0@jest-worker/LICENSE new file mode 100644 index 000000000..b96dcb048 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +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/public/node_modules/_jest-worker@24.9.0@jest-worker/README.md b/public/node_modules/_jest-worker@24.9.0@jest-worker/README.md new file mode 100644 index 000000000..e6ca3a798 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/README.md @@ -0,0 +1,215 @@ +# jest-worker + +Module for executing heavy tasks under forked processes in parallel, by providing a `Promise` based interface, minimum overhead, and bound workers. + +The module works by providing an absolute path of the module to be loaded in all forked processes. Files relative to a node module are also accepted. All methods are exposed on the parent process as promises, so they can be `await`'ed. Child (worker) methods can either be synchronous or asynchronous. + +The module also implements support for bound workers. Binding a worker means that, based on certain parameters, the same task will always be executed by the same worker. The way bound workers work is by using the returned string of the `computeWorkerKey` method. If the string was used before for a task, the call will be queued to the related worker that processed the task earlier; if not, it will be executed by the first available worker, then sticked to the worker that executed it; so the next time it will be processed by the same worker. If you have no preference on the worker executing the task, but you have defined a `computeWorkerKey` method because you want _some_ of the tasks to be sticked, you can return `null` from it. + +The list of exposed methods can be explicitly provided via the `exposedMethods` option. If it is not provided, it will be obtained by requiring the child module into the main process, and analyzed via reflection. Check the "minimal example" section for a valid one. + +## Install + +```sh +$ yarn add jest-worker +``` + +## Example + +This example covers the minimal usage: + +### File `parent.js` + +```javascript +import Worker from 'jest-worker'; + +async function main() { + const worker = new Worker(require.resolve('./Worker')); + const result = await worker.hello('Alice'); // "Hello, Alice" +} + +main(); +``` + +### File `worker.js` + +```javascript +export function hello(param) { + return 'Hello, ' + param; +} +``` + +## Experimental worker + +Node 10 shipped with [worker-threads](https://nodejs.org/api/worker_threads.html), a "threading API" that uses SharedArrayBuffers to communicate between the main process and its child threads. This experimental Node feature can significantly improve the communication time between parent and child processes in `jest-worker`. + +Since `worker_threads` are considered experimental in Node, you have to opt-in to this behavior by passing `enableWorkerThreads: true` when instantiating the worker. While the feature was unflagged in Node 11.7.0, you'll need to run the Node process with the `--experimental-worker` flag for Node 10. + +## API + +The only exposed method is a constructor (`Worker`) that is initialized by passing the worker path, plus an options object. + +### `workerPath: string` (required) + +Node module name or absolute path of the file to be loaded in the child processes. Use `require.resolve` to transform a relative path into an absolute one. + +### `options: Object` (optional) + +#### `exposedMethods: $ReadOnlyArray` (optional) + +List of method names that can be called on the child processes from the parent process. You cannot expose any method named like a public `Worker` method, or starting with `_`. If you use method auto-discovery, then these methods will not be exposed, even if they exist. + +#### `numWorkers: number` (optional) + +Amount of workers to spawn. Defaults to the number of CPUs minus 1. + +#### `maxRetries: number` (optional) + +Maximum amount of times that a dead child can be re-spawned, per call. Defaults to `3`, pass `Infinity` to allow endless retries. + +#### `forkOptions: Object` (optional) + +Allow customizing all options passed to `childProcess.fork`. By default, some values are set (`cwd`, `env` and `execArgv`), but you can override them and customize the rest. For a list of valid values, check [the Node documentation](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options). + +#### `computeWorkerKey: (method: string, ...args: Array) => ?string` (optional) + +Every time a method exposed via the API is called, `computeWorkerKey` is also called in order to bound the call to a worker. This is useful for workers that are able to cache the result or part of it. You bound calls to a worker by making `computeWorkerKey` return the same identifier for all different calls. If you do not want to bind the call to any worker, return `null`. + +The callback you provide is called with the method name, plus all the rest of the arguments of the call. Thus, you have full control to decide what to return. Check a practical example on bound workers under the "bound worker usage" section. + +By default, no process is bound to any worker. + +#### `setupArgs: Array` (optional) + +The arguments that will be passed to the `setup` method during initialization. + +#### `workerPool: (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface` (optional) + +Provide a custom worker pool to be used for spawning child processes. By default, Jest will use a node thread pool if available and fall back to child process threads. + +The arguments that will be passed to the `setup` method during initialization. + +#### `enableWorkerThreads: boolean` (optional) + +`jest-worker` will automatically detect if `worker_threads` are available, but will not use them unless passed `enableWorkerThreads: true`. + +## Worker + +The returned `Worker` instance has all the exposed methods, plus some additional ones to interact with the workers itself: + +### `getStdout(): Readable` + +Returns a `ReadableStream` where the standard output of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`. + +### `getStderr(): Readable` + +Returns a `ReadableStream` where the standard error of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`. + +### `end()` + +Finishes the workers by killing all workers. No further calls can be done to the `Worker` instance. + +**Note:** Each worker has a unique id (index that starts with `1`) which is available on `process.env.JEST_WORKER_ID` + +## Setting up and tearing down the child process + +The child process can define two special methods (both of them can be asynchronous): + +- `setup()`: If defined, it's executed before the first call to any method in the child. +- `teardown()`: If defined, it's executed when the farm ends. + +# More examples + +## Standard usage + +This example covers the standard usage: + +### File `parent.js` + +```javascript +import Worker from 'jest-worker'; + +async function main() { + const myWorker = new Worker(require.resolve('./Worker'), { + exposedMethods: ['foo', 'bar', 'getWorkerId'], + numWorkers: 4, + }); + + console.log(await myWorker.foo('Alice')); // "Hello from foo: Alice" + console.log(await myWorker.bar('Bob')); // "Hello from bar: Bob" + console.log(await myWorker.getWorkerId()); // "3" -> this message has sent from the 3rd worker + + myWorker.end(); +} + +main(); +``` + +### File `worker.js` + +```javascript +export function foo(param) { + return 'Hello from foo: ' + param; +} + +export function bar(param) { + return 'Hello from bar: ' + param; +} + +export function getWorkerId() { + return process.env.JEST_WORKER_ID; +} +``` + +## Bound worker usage: + +This example covers the usage with a `computeWorkerKey` method: + +### File `parent.js` + +```javascript +import Worker from 'jest-worker'; + +async function main() { + const myWorker = new Worker(require.resolve('./Worker'), { + computeWorkerKey: (method, filename) => filename, + }); + + // Transform the given file, within the first available worker. + console.log(await myWorker.transform('/tmp/foo.js')); + + // Wait a bit. + await sleep(10000); + + // Transform the same file again. Will immediately return because the + // transformed file is cached in the worker, and `computeWorkerKey` ensures + // the same worker that processed the file the first time will process it now. + console.log(await myWorker.transform('/tmp/foo.js')); + + myWorker.end(); +} + +main(); +``` + +### File `worker.js` + +```javascript +import babel from '@babel/core'; + +const cache = Object.create(null); + +export function transform(filename) { + if (cache[filename]) { + return cache[filename]; + } + + // jest-worker can handle both immediate results and thenables. If a + // thenable is returned, it will be await'ed until it resolves. + return babel.transformFileAsync(filename).then(result => { + cache[filename] = result; + + return result; + }); +} +``` diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.d.ts new file mode 100644 index 000000000..fbdaea0f2 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.d.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import { FarmOptions } from './types'; +export default class Farm { + private _computeWorkerKey; + private _cacheKeys; + private _callback; + private _last; + private _locks; + private _numOfWorkers; + private _offset; + private _queue; + constructor(numOfWorkers: number, callback: Function, computeWorkerKey?: FarmOptions['computeWorkerKey']); + doWork(method: string, ...args: Array): Promise; + private _getNextTask; + private _process; + private _enqueue; + private _push; + private _lock; + private _unlock; + private _isLocked; +} +//# sourceMappingURL=Farm.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.d.ts.map new file mode 100644 index 000000000..95d95412a --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Farm.d.ts","sourceRoot":"","sources":["../src/Farm.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,WAAW,EAOZ,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,OAAO,CAAC,iBAAiB,CAAkC;IAC3D,OAAO,CAAC,UAAU,CAAkC;IACpD,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAA0B;gBAGtC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;IAepD,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAqC7D,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,QAAQ;IA0BhB,OAAO,CAAC,QAAQ;IAmBhB,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,SAAS;CAGlB"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.js new file mode 100644 index 000000000..64a586546 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/Farm.js @@ -0,0 +1,179 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = void 0; + +var _types = require('./types'); + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +class Farm { + constructor(numOfWorkers, callback, computeWorkerKey) { + _defineProperty(this, '_computeWorkerKey', void 0); + + _defineProperty(this, '_cacheKeys', void 0); + + _defineProperty(this, '_callback', void 0); + + _defineProperty(this, '_last', void 0); + + _defineProperty(this, '_locks', void 0); + + _defineProperty(this, '_numOfWorkers', void 0); + + _defineProperty(this, '_offset', void 0); + + _defineProperty(this, '_queue', void 0); + + this._cacheKeys = Object.create(null); + this._callback = callback; + this._last = []; + this._locks = []; + this._numOfWorkers = numOfWorkers; + this._offset = 0; + this._queue = []; + + if (computeWorkerKey) { + this._computeWorkerKey = computeWorkerKey; + } + } + + doWork(method, ...args) { + return new Promise((resolve, reject) => { + const computeWorkerKey = this._computeWorkerKey; + const request = [_types.CHILD_MESSAGE_CALL, false, method, args]; + let worker = null; + let hash = null; + + if (computeWorkerKey) { + hash = computeWorkerKey.call(this, method, ...args); + worker = hash == null ? null : this._cacheKeys[hash]; + } + + const onStart = worker => { + if (hash != null) { + this._cacheKeys[hash] = worker; + } + }; + + const onEnd = (error, result) => { + if (error) { + reject(error); + } else { + resolve(result); + } + }; + + const task = { + onEnd, + onStart, + request + }; + + if (worker) { + this._enqueue(task, worker.getWorkerId()); + } else { + this._push(task); + } + }); + } + + _getNextTask(workerId) { + let queueHead = this._queue[workerId]; + + while (queueHead && queueHead.task.request[1]) { + queueHead = queueHead.next || null; + } + + this._queue[workerId] = queueHead; + return queueHead && queueHead.task; + } + + _process(workerId) { + if (this._isLocked(workerId)) { + return this; + } + + const task = this._getNextTask(workerId); + + if (!task) { + return this; + } + + const onEnd = (error, result) => { + task.onEnd(error, result); + + this._unlock(workerId); + + this._process(workerId); + }; + + task.request[1] = true; + + this._lock(workerId); + + this._callback(workerId, task.request, task.onStart, onEnd); + + return this; + } + + _enqueue(task, workerId) { + const item = { + next: null, + task + }; + + if (task.request[1]) { + return this; + } + + if (this._queue[workerId]) { + this._last[workerId].next = item; + } else { + this._queue[workerId] = item; + } + + this._last[workerId] = item; + + this._process(workerId); + + return this; + } + + _push(task) { + for (let i = 0; i < this._numOfWorkers; i++) { + this._enqueue(task, (this._offset + i) % this._numOfWorkers); + } + + this._offset++; + return this; + } + + _lock(workerId) { + this._locks[workerId] = true; + } + + _unlock(workerId) { + this._locks[workerId] = false; + } + + _isLocked(workerId) { + return this._locks[workerId]; + } +} + +exports.default = Farm; diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.d.ts new file mode 100644 index 000000000..21ee66088 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import BaseWorkerPool from './base/BaseWorkerPool'; +import { ChildMessage, WorkerOptions, OnStart, OnEnd, WorkerPoolInterface, WorkerInterface } from './types'; +declare class WorkerPool extends BaseWorkerPool implements WorkerPoolInterface { + send(workerId: number, request: ChildMessage, onStart: OnStart, onEnd: OnEnd): void; + createWorker(workerOptions: WorkerOptions): WorkerInterface; +} +export default WorkerPool; +//# sourceMappingURL=WorkerPool.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.d.ts.map new file mode 100644 index 000000000..49bc9cee9 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WorkerPool.d.ts","sourceRoot":"","sources":["../src/WorkerPool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACL,YAAY,EACZ,aAAa,EACb,OAAO,EACP,KAAK,EACL,mBAAmB,EACnB,eAAe,EAChB,MAAM,SAAS,CAAC;AAWjB,cAAM,UAAW,SAAQ,cAAe,YAAW,mBAAmB;IACpE,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACX,IAAI;IAIP,YAAY,CAAC,aAAa,EAAE,aAAa,GAAG,eAAe;CAU5D;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.js new file mode 100644 index 000000000..752ea5b11 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/WorkerPool.js @@ -0,0 +1,49 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = void 0; + +var _BaseWorkerPool = _interopRequireDefault(require('./base/BaseWorkerPool')); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +const canUseWorkerThreads = () => { + try { + require('worker_threads'); + + return true; + } catch (_) { + return false; + } +}; + +class WorkerPool extends _BaseWorkerPool.default { + send(workerId, request, onStart, onEnd) { + this.getWorkerById(workerId).send(request, onStart, onEnd); + } + + createWorker(workerOptions) { + let Worker; + + if (this._options.enableWorkerThreads && canUseWorkerThreads()) { + Worker = require('./workers/NodeThreadsWorker').default; + } else { + Worker = require('./workers/ChildProcessWorker').default; + } + + return new Worker(workerOptions); + } +} + +var _default = WorkerPool; +exports.default = _default; diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.d.ts new file mode 100644 index 000000000..26f0e0f00 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import { WorkerPoolOptions, WorkerOptions, WorkerInterface } from '../types'; +export default class BaseWorkerPool { + private readonly _stderr; + private readonly _stdout; + protected readonly _options: WorkerPoolOptions; + private readonly _workers; + constructor(workerPath: string, options: WorkerPoolOptions); + getStderr(): NodeJS.ReadableStream; + getStdout(): NodeJS.ReadableStream; + getWorkers(): Array; + getWorkerById(workerId: number): WorkerInterface; + createWorker(_workerOptions: WorkerOptions): WorkerInterface; + end(): void; +} +//# sourceMappingURL=BaseWorkerPool.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.d.ts.map new file mode 100644 index 000000000..2d3e1c648 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BaseWorkerPool.d.ts","sourceRoot":"","sources":["../../src/base/BaseWorkerPool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAKH,OAAO,EAEL,iBAAiB,EACjB,aAAa,EACb,eAAe,EAChB,MAAM,UAAU,CAAC;AAKlB,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAChD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IAC/C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;gBAEtC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB;IAyC1D,SAAS,IAAI,MAAM,CAAC,cAAc;IAIlC,SAAS,IAAI,MAAM,CAAC,cAAc;IAIlC,UAAU,IAAI,KAAK,CAAC,eAAe,CAAC;IAIpC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe;IAIhD,YAAY,CAAC,cAAc,EAAE,aAAa,GAAG,eAAe;IAI5D,GAAG,IAAI,IAAI;CAWZ"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.js new file mode 100644 index 000000000..119600177 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/base/BaseWorkerPool.js @@ -0,0 +1,134 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = void 0; + +function _path() { + const data = _interopRequireDefault(require('path')); + + _path = function _path() { + return data; + }; + + return data; +} + +function _mergeStream() { + const data = _interopRequireDefault(require('merge-stream')); + + _mergeStream = function _mergeStream() { + return data; + }; + + return data; +} + +var _types = require('../types'); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +/* istanbul ignore next */ +const emptyMethod = () => {}; + +class BaseWorkerPool { + constructor(workerPath, options) { + _defineProperty(this, '_stderr', void 0); + + _defineProperty(this, '_stdout', void 0); + + _defineProperty(this, '_options', void 0); + + _defineProperty(this, '_workers', void 0); + + this._options = options; + this._workers = new Array(options.numWorkers); + + if (!_path().default.isAbsolute(workerPath)) { + workerPath = require.resolve(workerPath); + } + + const stdout = (0, _mergeStream().default)(); + const stderr = (0, _mergeStream().default)(); + const forkOptions = options.forkOptions, + maxRetries = options.maxRetries, + setupArgs = options.setupArgs; + + for (let i = 0; i < options.numWorkers; i++) { + const workerOptions = { + forkOptions, + maxRetries, + setupArgs, + workerId: i, + workerPath + }; + const worker = this.createWorker(workerOptions); + const workerStdout = worker.getStdout(); + const workerStderr = worker.getStderr(); + + if (workerStdout) { + stdout.add(workerStdout); + } + + if (workerStderr) { + stderr.add(workerStderr); + } + + this._workers[i] = worker; + } + + this._stdout = stdout; + this._stderr = stderr; + } + + getStderr() { + return this._stderr; + } + + getStdout() { + return this._stdout; + } + + getWorkers() { + return this._workers; + } + + getWorkerById(workerId) { + return this._workers[workerId]; + } + + createWorker(_workerOptions) { + throw Error('Missing method createWorker in WorkerPool'); + } + + end() { + // We do not cache the request object here. If so, it would only be only + // processed by one of the workers, and we want them all to close. + for (let i = 0; i < this._workers.length; i++) { + this._workers[i].send( + [_types.CHILD_MESSAGE_END, false], + emptyMethod, + emptyMethod + ); + } + } +} + +exports.default = BaseWorkerPool; diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.d.ts new file mode 100644 index 000000000..e931617fd --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.d.ts @@ -0,0 +1,46 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import { FarmOptions } from './types'; +/** + * The Jest farm (publicly called "Worker") is a class that allows you to queue + * methods across multiple child processes, in order to parallelize work. This + * is done by providing an absolute path to a module that will be loaded on each + * of the child processes, and bridged to the main process. + * + * Bridged methods are specified by using the "exposedMethods" property of the + * "options" object. This is an array of strings, where each of them corresponds + * to the exported name in the loaded module. + * + * You can also control the amount of workers by using the "numWorkers" property + * of the "options" object, and the settings passed to fork the process through + * the "forkOptions" property. The amount of workers defaults to the amount of + * CPUS minus one. + * + * Queueing calls can be done in two ways: + * - Standard method: calls will be redirected to the first available worker, + * so they will get executed as soon as they can. + * + * - Sticky method: if a "computeWorkerKey" method is provided within the + * config, the resulting string of this method will be used as a key. + * Every time this key is returned, it is guaranteed that your job will be + * processed by the same worker. This is specially useful if your workers + * are caching results. + */ +export default class JestWorker { + private _ending; + private _farm; + private _options; + private _workerPool; + constructor(workerPath: string, options?: FarmOptions); + private _bindExposedWorkerMethods; + private _callFunctionWithArgs; + getStderr(): NodeJS.ReadableStream; + getStdout(): NodeJS.ReadableStream; + end(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.d.ts.map new file mode 100644 index 000000000..b3158491c --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAKH,OAAO,EAAyC,WAAW,EAAC,MAAM,SAAS,CAAC;AAyB5E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,KAAK,CAAO;IACpB,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,WAAW,CAAsB;gBAE7B,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW;IA+BrD,OAAO,CAAC,yBAAyB;IAkBjC,OAAO,CAAC,qBAAqB;IAW7B,SAAS,IAAI,MAAM,CAAC,cAAc;IAIlC,SAAS,IAAI,MAAM,CAAC,cAAc;IAIlC,GAAG,IAAI,IAAI;CASZ"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.js new file mode 100644 index 000000000..18d4f5671 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/index.js @@ -0,0 +1,184 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = void 0; + +function _os() { + const data = _interopRequireDefault(require('os')); + + _os = function _os() { + return data; + }; + + return data; +} + +var _WorkerPool = _interopRequireDefault(require('./WorkerPool')); + +var _Farm = _interopRequireDefault(require('./Farm')); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + ownKeys.forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +function getExposedMethods(workerPath, options) { + let exposedMethods = options.exposedMethods; // If no methods list is given, try getting it by auto-requiring the module. + + if (!exposedMethods) { + const module = require(workerPath); + + exposedMethods = Object.keys(module).filter( + // @ts-ignore: no index + name => typeof module[name] === 'function' + ); + + if (typeof module === 'function') { + exposedMethods = [...exposedMethods, 'default']; + } + } + + return exposedMethods; +} +/** + * The Jest farm (publicly called "Worker") is a class that allows you to queue + * methods across multiple child processes, in order to parallelize work. This + * is done by providing an absolute path to a module that will be loaded on each + * of the child processes, and bridged to the main process. + * + * Bridged methods are specified by using the "exposedMethods" property of the + * "options" object. This is an array of strings, where each of them corresponds + * to the exported name in the loaded module. + * + * You can also control the amount of workers by using the "numWorkers" property + * of the "options" object, and the settings passed to fork the process through + * the "forkOptions" property. The amount of workers defaults to the amount of + * CPUS minus one. + * + * Queueing calls can be done in two ways: + * - Standard method: calls will be redirected to the first available worker, + * so they will get executed as soon as they can. + * + * - Sticky method: if a "computeWorkerKey" method is provided within the + * config, the resulting string of this method will be used as a key. + * Every time this key is returned, it is guaranteed that your job will be + * processed by the same worker. This is specially useful if your workers + * are caching results. + */ + +class JestWorker { + constructor(workerPath, options) { + _defineProperty(this, '_ending', void 0); + + _defineProperty(this, '_farm', void 0); + + _defineProperty(this, '_options', void 0); + + _defineProperty(this, '_workerPool', void 0); + + this._options = _objectSpread({}, options); + this._ending = false; + const workerPoolOptions = { + enableWorkerThreads: this._options.enableWorkerThreads || false, + forkOptions: this._options.forkOptions || {}, + maxRetries: this._options.maxRetries || 3, + numWorkers: + this._options.numWorkers || + Math.max(_os().default.cpus().length - 1, 1), + setupArgs: this._options.setupArgs || [] + }; + + if (this._options.WorkerPool) { + // @ts-ignore: constructor target any? + this._workerPool = new this._options.WorkerPool( + workerPath, + workerPoolOptions + ); + } else { + this._workerPool = new _WorkerPool.default(workerPath, workerPoolOptions); + } + + this._farm = new _Farm.default( + workerPoolOptions.numWorkers, + this._workerPool.send.bind(this._workerPool), + this._options.computeWorkerKey + ); + + this._bindExposedWorkerMethods(workerPath, this._options); + } + + _bindExposedWorkerMethods(workerPath, options) { + getExposedMethods(workerPath, options).forEach(name => { + if (name.startsWith('_')) { + return; + } + + if (this.constructor.prototype.hasOwnProperty(name)) { + throw new TypeError('Cannot define a method called ' + name); + } // @ts-ignore: dynamic extension of the class instance is expected. + + this[name] = this._callFunctionWithArgs.bind(this, name); + }); + } + + _callFunctionWithArgs(method, ...args) { + if (this._ending) { + throw new Error('Farm is ended, no more calls can be done to it'); + } + + return this._farm.doWork(method, ...args); + } + + getStderr() { + return this._workerPool.getStderr(); + } + + getStdout() { + return this._workerPool.getStdout(); + } + + end() { + if (this._ending) { + throw new Error('Farm is ended, no more calls can be done to it'); + } + + this._workerPool.end(); + + this._ending = true; + } +} + +exports.default = JestWorker; diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.d.ts new file mode 100644 index 000000000..e25cf11d5 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.d.ts @@ -0,0 +1,98 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import { EventEmitter } from 'events'; +import { ForkOptions } from 'child_process'; +export declare const CHILD_MESSAGE_INITIALIZE: 0; +export declare const CHILD_MESSAGE_CALL: 1; +export declare const CHILD_MESSAGE_END: 2; +export declare const PARENT_MESSAGE_OK: 0; +export declare const PARENT_MESSAGE_CLIENT_ERROR: 1; +export declare const PARENT_MESSAGE_SETUP_ERROR: 2; +export declare type PARENT_MESSAGE_ERROR = typeof PARENT_MESSAGE_CLIENT_ERROR | typeof PARENT_MESSAGE_SETUP_ERROR; +export { ForkOptions }; +export interface WorkerPoolInterface { + getStderr(): NodeJS.ReadableStream; + getStdout(): NodeJS.ReadableStream; + getWorkers(): Array; + createWorker(options: WorkerOptions): WorkerInterface; + send(workerId: number, request: ChildMessage, onStart: OnStart, onEnd: OnEnd): void; + end(): void; +} +export interface WorkerInterface { + send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd): void; + getWorkerId(): number; + getStderr(): NodeJS.ReadableStream | null; + getStdout(): NodeJS.ReadableStream | null; + onExit(exitCode: number): void; + onMessage(message: ParentMessage): void; +} +export declare type FarmOptions = { + computeWorkerKey?: (method: string, ...args: Array) => string | null; + exposedMethods?: ReadonlyArray; + forkOptions?: ForkOptions; + setupArgs?: Array; + maxRetries?: number; + numWorkers?: number; + WorkerPool?: (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface; + enableWorkerThreads?: boolean; +}; +export declare type WorkerPoolOptions = { + setupArgs: Array; + forkOptions: ForkOptions; + maxRetries: number; + numWorkers: number; + enableWorkerThreads: boolean; +}; +export declare type WorkerOptions = { + forkOptions: ForkOptions; + setupArgs: Array; + maxRetries: number; + workerId: number; + workerPath: string; +}; +export declare type MessagePort = typeof EventEmitter & { + postMessage(message: unknown): void; +}; +export declare type MessageChannel = { + port1: MessagePort; + port2: MessagePort; +}; +export declare type ChildMessageInitialize = [typeof CHILD_MESSAGE_INITIALIZE, // type +boolean, // processed +string, // file +// file +Array | undefined, // setupArgs +// setupArgs +MessagePort | undefined]; +export declare type ChildMessageCall = [typeof CHILD_MESSAGE_CALL, // type +boolean, // processed +string, // method +Array]; +export declare type ChildMessageEnd = [typeof CHILD_MESSAGE_END, // type +boolean]; +export declare type ChildMessage = ChildMessageInitialize | ChildMessageCall | ChildMessageEnd; +export declare type ParentMessageOk = [typeof PARENT_MESSAGE_OK, // type +unknown]; +export declare type ParentMessageError = [PARENT_MESSAGE_ERROR, // type +string, // constructor +string, // message +string, // stack +unknown]; +export declare type ParentMessage = ParentMessageOk | ParentMessageError; +export declare type OnStart = (worker: WorkerInterface) => void; +export declare type OnEnd = (err: Error | null, result: unknown) => void; +export declare type QueueChildMessage = { + request: ChildMessage; + onStart: OnStart; + onEnd: OnEnd; +}; +export declare type QueueItem = { + task: QueueChildMessage; + next: QueueItem | null; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.d.ts.map new file mode 100644 index 000000000..ba9855381 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAM1C,eAAO,MAAM,wBAAwB,EAAE,CAAK,CAAC;AAC7C,eAAO,MAAM,kBAAkB,EAAE,CAAK,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CAC7B,OAAO,kBAAkB,EAAE,OAAO;AAClC,OAAO,EAAE,YAAY;AACrB,MAAM,EAAE,SAAS;AACjB,KAAK,CAAC,OAAO,CAAC,CACf,CAAC;AAEF,oBAAY,eAAe,GAAG,CAC5B,OAAO,iBAAiB,EAAE,OAAO;AACjC,OAAO,CACR,CAAC;AAEF,oBAAY,YAAY,GACpB,sBAAsB,GACtB,gBAAgB,GAChB,eAAe,CAAC;AAIpB,oBAAY,eAAe,GAAG,CAC5B,OAAO,iBAAiB,EAAE,OAAO;AACjC,OAAO,CACR,CAAC;AAEF,oBAAY,kBAAkB,GAAG,CAC/B,oBAAoB,EAAE,OAAO;AAC7B,MAAM,EAAE,cAAc;AACtB,MAAM,EAAE,UAAU;AAClB,MAAM,EAAE,QAAQ;AAChB,OAAO,CACR,CAAC;AAEF,oBAAY,aAAa,GAAG,eAAe,GAAG,kBAAkB,CAAC;AAIjE,oBAAY,OAAO,GAAG,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;AACxD,oBAAY,KAAK,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;AAEjE,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.js new file mode 100644 index 000000000..f4b65de99 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/types.js @@ -0,0 +1,43 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +Object.defineProperty(exports, 'ForkOptions', { + enumerable: true, + get: function get() { + return _child_process().ForkOptions; + } +}); +exports.PARENT_MESSAGE_SETUP_ERROR = exports.PARENT_MESSAGE_CLIENT_ERROR = exports.PARENT_MESSAGE_OK = exports.CHILD_MESSAGE_END = exports.CHILD_MESSAGE_CALL = exports.CHILD_MESSAGE_INITIALIZE = void 0; + +function _child_process() { + const data = require('child_process'); + + _child_process = function _child_process() { + return data; + }; + + return data; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +// Because of the dynamic nature of a worker communication process, all messages +// coming from any of the other processes cannot be typed. Thus, many types +const CHILD_MESSAGE_INITIALIZE = 0; +exports.CHILD_MESSAGE_INITIALIZE = CHILD_MESSAGE_INITIALIZE; +const CHILD_MESSAGE_CALL = 1; +exports.CHILD_MESSAGE_CALL = CHILD_MESSAGE_CALL; +const CHILD_MESSAGE_END = 2; +exports.CHILD_MESSAGE_END = CHILD_MESSAGE_END; +const PARENT_MESSAGE_OK = 0; +exports.PARENT_MESSAGE_OK = PARENT_MESSAGE_OK; +const PARENT_MESSAGE_CLIENT_ERROR = 1; +exports.PARENT_MESSAGE_CLIENT_ERROR = PARENT_MESSAGE_CLIENT_ERROR; +const PARENT_MESSAGE_SETUP_ERROR = 2; +exports.PARENT_MESSAGE_SETUP_ERROR = PARENT_MESSAGE_SETUP_ERROR; diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.d.ts new file mode 100644 index 000000000..850d6adec --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.d.ts @@ -0,0 +1,47 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import { WorkerInterface, ChildMessage, OnEnd, OnStart, WorkerOptions, ParentMessage } from '../types'; +/** + * This class wraps the child process and provides a nice interface to + * communicate with. It takes care of: + * + * - Re-spawning the process if it dies. + * - Queues calls while the worker is busy. + * - Re-sends the requests if the worker blew up. + * + * The reason for queueing them here (since childProcess.send also has an + * internal queue) is because the worker could be doing asynchronous work, and + * this would lead to the child process to read its receiving buffer and start a + * second call. By queueing calls here, we don't send the next call to the + * children until we receive the result of the previous one. + * + * As soon as a request starts to be processed by a worker, its "processed" + * field is changed to "true", so that other workers which might encounter the + * same call skip it. + */ +export default class ChildProcessWorker implements WorkerInterface { + private _child; + private _options; + private _onProcessEnd; + private _fakeStream; + private _request; + private _retries; + private _stderr; + private _stdout; + constructor(options: WorkerOptions); + initialize(): void; + private _shutdown; + onMessage(response: ParentMessage): void; + onExit(exitCode: number): void; + send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd): void; + getWorkerId(): number; + getStdout(): NodeJS.ReadableStream | null; + getStderr(): NodeJS.ReadableStream | null; + private _getFakeStream; +} +//# sourceMappingURL=ChildProcessWorker.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.d.ts.map new file mode 100644 index 000000000..52f534943 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChildProcessWorker.d.ts","sourceRoot":"","sources":["../../src/workers/ChildProcessWorker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,OAAO,EAKL,eAAe,EACf,YAAY,EACZ,KAAK,EACL,OAAO,EACP,aAAa,EACb,aAAa,EACd,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,eAAe;IAChE,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,OAAO,CAAwC;gBAE3C,OAAO,EAAE,aAAa;IAUlC,UAAU;IAiEV,OAAO,CAAC,SAAS;IAQjB,SAAS,CAAC,QAAQ,EAAE,aAAa;IA6CjC,MAAM,CAAC,QAAQ,EAAE,MAAM;IAYvB,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK;IAcxE,WAAW;IAIX,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI;IAIzC,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI;IAIzC,OAAO,CAAC,cAAc;CAMvB"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.js new file mode 100644 index 000000000..7632297f3 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/ChildProcessWorker.js @@ -0,0 +1,310 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = void 0; + +function _child_process() { + const data = _interopRequireDefault(require('child_process')); + + _child_process = function _child_process() { + return data; + }; + + return data; +} + +function _stream() { + const data = require('stream'); + + _stream = function _stream() { + return data; + }; + + return data; +} + +function _mergeStream() { + const data = _interopRequireDefault(require('merge-stream')); + + _mergeStream = function _mergeStream() { + return data; + }; + + return data; +} + +function _supportsColor() { + const data = _interopRequireDefault(require('supports-color')); + + _supportsColor = function _supportsColor() { + return data; + }; + + return data; +} + +var _types = require('../types'); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + ownKeys.forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +/** + * This class wraps the child process and provides a nice interface to + * communicate with. It takes care of: + * + * - Re-spawning the process if it dies. + * - Queues calls while the worker is busy. + * - Re-sends the requests if the worker blew up. + * + * The reason for queueing them here (since childProcess.send also has an + * internal queue) is because the worker could be doing asynchronous work, and + * this would lead to the child process to read its receiving buffer and start a + * second call. By queueing calls here, we don't send the next call to the + * children until we receive the result of the previous one. + * + * As soon as a request starts to be processed by a worker, its "processed" + * field is changed to "true", so that other workers which might encounter the + * same call skip it. + */ +class ChildProcessWorker { + constructor(options) { + _defineProperty(this, '_child', void 0); + + _defineProperty(this, '_options', void 0); + + _defineProperty(this, '_onProcessEnd', void 0); + + _defineProperty(this, '_fakeStream', void 0); + + _defineProperty(this, '_request', void 0); + + _defineProperty(this, '_retries', void 0); + + _defineProperty(this, '_stderr', void 0); + + _defineProperty(this, '_stdout', void 0); + + this._options = options; + this._fakeStream = null; + this._request = null; + this._stderr = null; + this._stdout = null; + this.initialize(); + } + + initialize() { + const forceColor = _supportsColor().default.stdout + ? { + FORCE_COLOR: '1' + } + : {}; + + const child = _child_process().default.fork( + require.resolve('./processChild'), + [], + _objectSpread( + { + cwd: process.cwd(), + env: _objectSpread( + {}, + process.env, + { + JEST_WORKER_ID: String(this._options.workerId + 1) + }, + forceColor + ), + // Suppress --debug / --inspect flags while preserving others (like --harmony). + execArgv: process.execArgv.filter(v => !/^--(debug|inspect)/.test(v)), + silent: true + }, + this._options.forkOptions + ) + ); + + if (child.stdout) { + if (!this._stdout) { + // We need to add a permanent stream to the merged stream to prevent it + // from ending when the subprocess stream ends + this._stdout = (0, _mergeStream().default)(this._getFakeStream()); + } + + this._stdout.add(child.stdout); + } + + if (child.stderr) { + if (!this._stderr) { + // We need to add a permanent stream to the merged stream to prevent it + // from ending when the subprocess stream ends + this._stderr = (0, _mergeStream().default)(this._getFakeStream()); + } + + this._stderr.add(child.stderr); + } + + child.on('message', this.onMessage.bind(this)); + child.on('exit', this.onExit.bind(this)); + child.send([ + _types.CHILD_MESSAGE_INITIALIZE, + false, + this._options.workerPath, + this._options.setupArgs + ]); + this._child = child; + this._retries++; // If we exceeded the amount of retries, we will emulate an error reply + // coming from the child. This avoids code duplication related with cleaning + // the queue, and scheduling the next call. + + if (this._retries > this._options.maxRetries) { + const error = new Error('Call retries were exceeded'); + this.onMessage([ + _types.PARENT_MESSAGE_CLIENT_ERROR, + error.name, + error.message, + error.stack, + { + type: 'WorkerError' + } + ]); + } + } + + _shutdown() { + // End the temporary streams so the merged streams end too + if (this._fakeStream) { + this._fakeStream.end(); + + this._fakeStream = null; + } + } + + onMessage(response) { + let error; + + switch (response[0]) { + case _types.PARENT_MESSAGE_OK: + this._onProcessEnd(null, response[1]); + + break; + + case _types.PARENT_MESSAGE_CLIENT_ERROR: + error = response[4]; + + if (error != null && typeof error === 'object') { + const extra = error; // @ts-ignore: no index + + const NativeCtor = global[response[1]]; + const Ctor = typeof NativeCtor === 'function' ? NativeCtor : Error; + error = new Ctor(response[2]); + error.type = response[1]; + error.stack = response[3]; + + for (const key in extra) { + // @ts-ignore: adding custom properties to errors. + error[key] = extra[key]; + } + } + + this._onProcessEnd(error, null); + + break; + + case _types.PARENT_MESSAGE_SETUP_ERROR: + error = new Error('Error when calling setup: ' + response[2]); // @ts-ignore: adding custom properties to errors. + + error.type = response[1]; + error.stack = response[3]; + + this._onProcessEnd(error, null); + + break; + + default: + throw new TypeError('Unexpected response from worker: ' + response[0]); + } + } + + onExit(exitCode) { + if (exitCode !== 0) { + this.initialize(); + + if (this._request) { + this._child.send(this._request); + } + } else { + this._shutdown(); + } + } + + send(request, onProcessStart, onProcessEnd) { + onProcessStart(this); + + this._onProcessEnd = (...args) => { + // Clean the request to avoid sending past requests to workers that fail + // while waiting for a new request (timers, unhandled rejections...) + this._request = null; + return onProcessEnd(...args); + }; + + this._request = request; + this._retries = 0; + + this._child.send(request); + } + + getWorkerId() { + return this._options.workerId; + } + + getStdout() { + return this._stdout; + } + + getStderr() { + return this._stderr; + } + + _getFakeStream() { + if (!this._fakeStream) { + this._fakeStream = new (_stream()).PassThrough(); + } + + return this._fakeStream; + } +} + +exports.default = ChildProcessWorker; diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.d.ts new file mode 100644 index 000000000..f6e39b293 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import { ChildMessage, OnEnd, OnStart, WorkerOptions, WorkerInterface, ParentMessage } from '../types'; +export default class ExperimentalWorker implements WorkerInterface { + private _worker; + private _options; + private _onProcessEnd; + private _request; + private _retries; + private _stderr; + private _stdout; + private _fakeStream; + constructor(options: WorkerOptions); + initialize(): void; + private _shutdown; + onMessage(response: ParentMessage): void; + onExit(exitCode: number): void; + send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd): void; + getWorkerId(): number; + getStdout(): NodeJS.ReadableStream | null; + getStderr(): NodeJS.ReadableStream | null; + private _getFakeStream; +} +//# sourceMappingURL=NodeThreadsWorker.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.d.ts.map new file mode 100644 index 000000000..b44fb3748 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NodeThreadsWorker.d.ts","sourceRoot":"","sources":["../../src/workers/NodeThreadsWorker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AASH,OAAO,EAKL,YAAY,EACZ,KAAK,EACL,OAAO,EACP,aAAa,EACb,eAAe,EACf,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,eAAe;IAChE,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,WAAW,CAAqB;gBAE5B,OAAO,EAAE,aAAa;IAUlC,UAAU;IAkEV,OAAO,CAAC,SAAS;IAQjB,SAAS,CAAC,QAAQ,EAAE,aAAa;IA2CjC,MAAM,CAAC,QAAQ,EAAE,MAAM;IAYvB,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK;IAexE,WAAW;IAIX,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI;IAIzC,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI;IAIzC,OAAO,CAAC,cAAc;CAMvB"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.js new file mode 100644 index 000000000..5c1b7f8b7 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/NodeThreadsWorker.js @@ -0,0 +1,289 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = void 0; + +function _path() { + const data = _interopRequireDefault(require('path')); + + _path = function _path() { + return data; + }; + + return data; +} + +function _stream() { + const data = require('stream'); + + _stream = function _stream() { + return data; + }; + + return data; +} + +function _worker_threads() { + const data = require('worker_threads'); + + _worker_threads = function _worker_threads() { + return data; + }; + + return data; +} + +function _mergeStream() { + const data = _interopRequireDefault(require('merge-stream')); + + _mergeStream = function _mergeStream() { + return data; + }; + + return data; +} + +var _types = require('../types'); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + ownKeys.forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +class ExperimentalWorker { + constructor(options) { + _defineProperty(this, '_worker', void 0); + + _defineProperty(this, '_options', void 0); + + _defineProperty(this, '_onProcessEnd', void 0); + + _defineProperty(this, '_request', void 0); + + _defineProperty(this, '_retries', void 0); + + _defineProperty(this, '_stderr', void 0); + + _defineProperty(this, '_stdout', void 0); + + _defineProperty(this, '_fakeStream', void 0); + + this._options = options; + this._request = null; + this._stderr = null; + this._stdout = null; + this._fakeStream = null; + this.initialize(); + } + + initialize() { + this._worker = new (_worker_threads()).Worker( + _path().default.resolve(__dirname, './threadChild.js'), + { + eval: false, + stderr: true, + stdout: true, + workerData: _objectSpread( + { + cwd: process.cwd(), + env: _objectSpread({}, process.env, { + JEST_WORKER_ID: String(this._options.workerId + 1) // 0-indexed workerId, 1-indexed JEST_WORKER_ID + }), + // Suppress --debug / --inspect flags while preserving others (like --harmony). + execArgv: process.execArgv.filter( + v => !/^--(debug|inspect)/.test(v) + ), + silent: true + }, + this._options.forkOptions + ) + } + ); + + if (this._worker.stdout) { + if (!this._stdout) { + // We need to add a permanent stream to the merged stream to prevent it + // from ending when the subprocess stream ends + this._stdout = (0, _mergeStream().default)(this._getFakeStream()); + } + + this._stdout.add(this._worker.stdout); + } + + if (this._worker.stderr) { + if (!this._stderr) { + // We need to add a permanent stream to the merged stream to prevent it + // from ending when the subprocess stream ends + this._stderr = (0, _mergeStream().default)(this._getFakeStream()); + } + + this._stderr.add(this._worker.stderr); + } + + this._worker.on('message', this.onMessage.bind(this)); + + this._worker.on('exit', this.onExit.bind(this)); + + this._worker.postMessage([ + _types.CHILD_MESSAGE_INITIALIZE, + false, + this._options.workerPath, + this._options.setupArgs + ]); + + this._retries++; // If we exceeded the amount of retries, we will emulate an error reply + // coming from the child. This avoids code duplication related with cleaning + // the queue, and scheduling the next call. + + if (this._retries > this._options.maxRetries) { + const error = new Error('Call retries were exceeded'); + this.onMessage([ + _types.PARENT_MESSAGE_CLIENT_ERROR, + error.name, + error.message, + error.stack, + { + type: 'WorkerError' + } + ]); + } + } + + _shutdown() { + // End the permanent stream so the merged stream end too + if (this._fakeStream) { + this._fakeStream.end(); + + this._fakeStream = null; + } + } + + onMessage(response) { + let error; + + switch (response[0]) { + case _types.PARENT_MESSAGE_OK: + this._onProcessEnd(null, response[1]); + + break; + + case _types.PARENT_MESSAGE_CLIENT_ERROR: + error = response[4]; + + if (error != null && typeof error === 'object') { + const extra = error; // @ts-ignore: no index + + const NativeCtor = global[response[1]]; + const Ctor = typeof NativeCtor === 'function' ? NativeCtor : Error; + error = new Ctor(response[2]); + error.type = response[1]; + error.stack = response[3]; + + for (const key in extra) { + // @ts-ignore: no index + error[key] = extra[key]; + } + } + + this._onProcessEnd(error, null); + + break; + + case _types.PARENT_MESSAGE_SETUP_ERROR: + error = new Error('Error when calling setup: ' + response[2]); // @ts-ignore: adding custom properties to errors. + + error.type = response[1]; + error.stack = response[3]; + + this._onProcessEnd(error, null); + + break; + + default: + throw new TypeError('Unexpected response from worker: ' + response[0]); + } + } + + onExit(exitCode) { + if (exitCode !== 0) { + this.initialize(); + + if (this._request) { + this._worker.postMessage(this._request); + } + } else { + this._shutdown(); + } + } + + send(request, onProcessStart, onProcessEnd) { + onProcessStart(this); + + this._onProcessEnd = (...args) => { + // Clean the request to avoid sending past requests to workers that fail + // while waiting for a new request (timers, unhandled rejections...) + this._request = null; + return onProcessEnd(...args); + }; + + this._request = request; + this._retries = 0; + + this._worker.postMessage(request); + } + + getWorkerId() { + return this._options.workerId; + } + + getStdout() { + return this._stdout; + } + + getStderr() { + return this._stderr; + } + + _getFakeStream() { + if (!this._fakeStream) { + this._fakeStream = new (_stream()).PassThrough(); + } + + return this._fakeStream; + } +} + +exports.default = ExperimentalWorker; diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.d.ts new file mode 100644 index 000000000..9763cb5a9 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.d.ts @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export {}; +//# sourceMappingURL=processChild.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.d.ts.map new file mode 100644 index 000000000..62ae3de0c --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"processChild.d.ts","sourceRoot":"","sources":["../../src/workers/processChild.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.js new file mode 100644 index 000000000..252b7383e --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/processChild.js @@ -0,0 +1,166 @@ +'use strict'; + +var _types = require('../types'); + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + ownKeys.forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +let file = null; +let setupArgs = []; +let initialized = false; +/** + * This file is a small bootstrapper for workers. It sets up the communication + * between the worker and the parent process, interpreting parent messages and + * sending results back. + * + * The file loaded will be lazily initialized the first time any of the workers + * is called. This is done for optimal performance: if the farm is initialized, + * but no call is made to it, child Node processes will be consuming the least + * possible amount of memory. + * + * If an invalid message is detected, the child will exit (by throwing) with a + * non-zero exit code. + */ + +process.on('message', request => { + switch (request[0]) { + case _types.CHILD_MESSAGE_INITIALIZE: + const init = request; + file = init[2]; + setupArgs = request[3]; + break; + + case _types.CHILD_MESSAGE_CALL: + const call = request; + execMethod(call[2], call[3]); + break; + + case _types.CHILD_MESSAGE_END: + end(); + break; + + default: + throw new TypeError( + 'Unexpected request from parent process: ' + request[0] + ); + } +}); + +function reportSuccess(result) { + if (!process || !process.send) { + throw new Error('Child can only be used on a forked process'); + } + + process.send([_types.PARENT_MESSAGE_OK, result]); +} + +function reportClientError(error) { + return reportError(error, _types.PARENT_MESSAGE_CLIENT_ERROR); +} + +function reportInitializeError(error) { + return reportError(error, _types.PARENT_MESSAGE_SETUP_ERROR); +} + +function reportError(error, type) { + if (!process || !process.send) { + throw new Error('Child can only be used on a forked process'); + } + + if (error == null) { + error = new Error('"null" or "undefined" thrown'); + } + + process.send([ + type, + error.constructor && error.constructor.name, + error.message, + error.stack, + typeof error === 'object' ? _objectSpread({}, error) : error + ]); +} + +function end() { + const main = require(file); + + if (!main.teardown) { + exitProcess(); + return; + } + + execFunction(main.teardown, main, [], exitProcess, exitProcess); +} + +function exitProcess() { + process.exit(0); +} + +function execMethod(method, args) { + const main = require(file); + + let fn; + + if (method === 'default') { + fn = main.__esModule ? main['default'] : main; + } else { + fn = main[method]; + } + + function execHelper() { + execFunction(fn, main, args, reportSuccess, reportClientError); + } + + if (initialized || !main.setup) { + execHelper(); + return; + } + + initialized = true; + execFunction(main.setup, main, setupArgs, execHelper, reportInitializeError); +} + +function execFunction(fn, ctx, args, onResult, onError) { + let result; + + try { + result = fn.apply(ctx, args); + } catch (err) { + onError(err); + return; + } + + if (result && typeof result.then === 'function') { + result.then(onResult, onError); + } else { + onResult(result); + } +} diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.d.ts b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.d.ts new file mode 100644 index 000000000..e83f4432f --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.d.ts @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export {}; +//# sourceMappingURL=threadChild.d.ts.map \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.d.ts.map b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.d.ts.map new file mode 100644 index 000000000..5e405bd9f --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"threadChild.d.ts","sourceRoot":"","sources":["../../src/workers/threadChild.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.js b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.js new file mode 100644 index 000000000..941c69992 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/build/workers/threadChild.js @@ -0,0 +1,176 @@ +'use strict'; + +function _worker_threads() { + const data = require('worker_threads'); + + _worker_threads = function _worker_threads() { + return data; + }; + + return data; +} + +var _types = require('../types'); + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + ownKeys.forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +let file = null; +let setupArgs = []; +let initialized = false; +/** + * This file is a small bootstrapper for workers. It sets up the communication + * between the worker and the parent process, interpreting parent messages and + * sending results back. + * + * The file loaded will be lazily initialized the first time any of the workers + * is called. This is done for optimal performance: if the farm is initialized, + * but no call is made to it, child Node processes will be consuming the least + * possible amount of memory. + * + * If an invalid message is detected, the child will exit (by throwing) with a + * non-zero exit code. + */ + +_worker_threads().parentPort.on('message', request => { + switch (request[0]) { + case _types.CHILD_MESSAGE_INITIALIZE: + const init = request; + file = init[2]; + setupArgs = request[3]; + break; + + case _types.CHILD_MESSAGE_CALL: + const call = request; + execMethod(call[2], call[3]); + break; + + case _types.CHILD_MESSAGE_END: + end(); + break; + + default: + throw new TypeError( + 'Unexpected request from parent process: ' + request[0] + ); + } +}); + +function reportSuccess(result) { + if (_worker_threads().isMainThread) { + throw new Error('Child can only be used on a forked process'); + } + + _worker_threads().parentPort.postMessage([_types.PARENT_MESSAGE_OK, result]); +} + +function reportClientError(error) { + return reportError(error, _types.PARENT_MESSAGE_CLIENT_ERROR); +} + +function reportInitializeError(error) { + return reportError(error, _types.PARENT_MESSAGE_SETUP_ERROR); +} + +function reportError(error, type) { + if (_worker_threads().isMainThread) { + throw new Error('Child can only be used on a forked process'); + } + + if (error == null) { + error = new Error('"null" or "undefined" thrown'); + } + + _worker_threads().parentPort.postMessage([ + type, + error.constructor && error.constructor.name, + error.message, + error.stack, + typeof error === 'object' ? _objectSpread({}, error) : error + ]); +} + +function end() { + const main = require(file); + + if (!main.teardown) { + exitProcess(); + return; + } + + execFunction(main.teardown, main, [], exitProcess, exitProcess); +} + +function exitProcess() { + process.exit(0); +} + +function execMethod(method, args) { + const main = require(file); + + let fn; + + if (method === 'default') { + fn = main.__esModule ? main['default'] : main; + } else { + fn = main[method]; + } + + function execHelper() { + execFunction(fn, main, args, reportSuccess, reportClientError); + } + + if (initialized || !main.setup) { + execHelper(); + return; + } + + initialized = true; + execFunction(main.setup, main, setupArgs, execHelper, reportInitializeError); +} + +function execFunction(fn, ctx, args, onResult, onError) { + let result; + + try { + result = fn.apply(ctx, args); + } catch (err) { + onError(err); + return; + } + + if (result && typeof result.then === 'function') { + result.then(onResult, onError); + } else { + onResult(result); + } +} diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/node_modules/merge-stream b/public/node_modules/_jest-worker@24.9.0@jest-worker/node_modules/merge-stream new file mode 120000 index 000000000..4b24719c6 --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/node_modules/merge-stream @@ -0,0 +1 @@ +../../_merge-stream@2.0.0@merge-stream \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/node_modules/supports-color b/public/node_modules/_jest-worker@24.9.0@jest-worker/node_modules/supports-color new file mode 120000 index 000000000..c15e012bf --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/node_modules/supports-color @@ -0,0 +1 @@ +../../_supports-color@6.1.0@supports-color \ No newline at end of file diff --git a/public/node_modules/_jest-worker@24.9.0@jest-worker/package.json b/public/node_modules/_jest-worker@24.9.0@jest-worker/package.json new file mode 100644 index 000000000..0cd3f1c0d --- /dev/null +++ b/public/node_modules/_jest-worker@24.9.0@jest-worker/package.json @@ -0,0 +1,32 @@ +{ + "name": "jest-worker", + "version": "24.9.0", + "repository": { + "type": "git", + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-worker" + }, + "license": "MIT", + "main": "build/index.js", + "types": "build/index.d.ts", + "dependencies": { + "merge-stream": "^2.0.0", + "supports-color": "^6.1.0" + }, + "devDependencies": { + "@types/merge-stream": "^1.1.2", + "@types/supports-color": "^5.3.0", + "get-stream": "^4.1.0", + "worker-farm": "^1.6.0" + }, + "engines": { + "node": ">= 6" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "jest-worker@24.9.0", + "_resolved": "https://registry.npm.taobao.org/jest-worker/download/jest-worker-24.9.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/.eslintrc.yml b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/.eslintrc.yml new file mode 100644 index 000000000..ab1762da9 --- /dev/null +++ b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/.eslintrc.yml @@ -0,0 +1,27 @@ +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/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/.travis.yml b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/.travis.yml new file mode 100644 index 000000000..7ddce74b8 --- /dev/null +++ b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "4" + - "6" + - "7" + - "8" +after_script: + - coveralls < coverage/lcov.info diff --git a/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/LICENSE b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/LICENSE new file mode 100644 index 000000000..7f1543566 --- /dev/null +++ b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/LICENSE @@ -0,0 +1,21 @@ +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/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/README.md b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/README.md new file mode 100644 index 000000000..d5ccaf450 --- /dev/null +++ b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/README.md @@ -0,0 +1,83 @@ +# 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'} + +// Or: + +traverse(schema, {cb: {pre, post}}); +// pre is called 3 times with: +// 1. root schema +// 2. {type: 'string'} +// 3. {type: 'integer'} +// +// post is called 3 times with: +// 1. {type: 'string'} +// 2. {type: 'integer'} +// 3. root schema + +``` + +Callback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed. + +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/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/index.js b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/index.js new file mode 100644 index 000000000..d4a18dfc7 --- /dev/null +++ b/public/node_modules/_json-schema-traverse@0.4.1@json-schema-traverse/index.js @@ -0,0 +1,89 @@ +'use strict'; + +var traverse = module.exports = function (schema, opts, cb) { + // Legacy support for v0.3.1 and earlier. + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + + cb = opts.cb || cb; + var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; + var post = cb.post || function() {}; + + _traverse(opts, pre, post, 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 = { + default: true, + 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, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + pre(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 { + console(await locatePath(files)); + //=> 'rainbow' + })(); + ``` + */ + (paths: Iterable, options?: locatePath.AsyncOptions): Promise< + string | undefined + >; + + /** + Synchronously get the first path that exists on disk of multiple paths. + + @param paths - Paths to check. + @returns The first path that exists or `undefined` if none exists. + */ + sync( + paths: Iterable, + options?: locatePath.Options + ): string | undefined; +}; + +export = locatePath; diff --git a/public/node_modules/_locate-path@5.0.0@locate-path/index.js b/public/node_modules/_locate-path@5.0.0@locate-path/index.js new file mode 100644 index 000000000..4604bbf40 --- /dev/null +++ b/public/node_modules/_locate-path@5.0.0@locate-path/index.js @@ -0,0 +1,65 @@ +'use strict'; +const path = require('path'); +const fs = require('fs'); +const {promisify} = require('util'); +const pLocate = require('p-locate'); + +const fsStat = promisify(fs.stat); +const fsLStat = promisify(fs.lstat); + +const typeMappings = { + directory: 'isDirectory', + file: 'isFile' +}; + +function checkType({type}) { + if (type in typeMappings) { + return; + } + + throw new Error(`Invalid type specified: ${type}`); +} + +const matchType = (type, stat) => type === undefined || stat[typeMappings[type]](); + +module.exports = async (paths, options) => { + options = { + cwd: process.cwd(), + type: 'file', + allowSymlinks: true, + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fsStat : fsLStat; + + return pLocate(paths, async path_ => { + try { + const stat = await statFn(path.resolve(options.cwd, path_)); + return matchType(options.type, stat); + } catch (_) { + return false; + } + }, options); +}; + +module.exports.sync = (paths, options) => { + options = { + cwd: process.cwd(), + allowSymlinks: true, + type: 'file', + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync; + + for (const path_ of paths) { + try { + const stat = statFn(path.resolve(options.cwd, path_)); + + if (matchType(options.type, stat)) { + return path_; + } + } catch (_) { + } + } +}; diff --git a/public/node_modules/_locate-path@5.0.0@locate-path/license b/public/node_modules/_locate-path@5.0.0@locate-path/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_locate-path@5.0.0@locate-path/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_locate-path@5.0.0@locate-path/node_modules/p-locate b/public/node_modules/_locate-path@5.0.0@locate-path/node_modules/p-locate new file mode 120000 index 000000000..10f23bbc0 --- /dev/null +++ b/public/node_modules/_locate-path@5.0.0@locate-path/node_modules/p-locate @@ -0,0 +1 @@ +../../_p-locate@4.1.0@p-locate \ No newline at end of file diff --git a/public/node_modules/_locate-path@5.0.0@locate-path/package.json b/public/node_modules/_locate-path@5.0.0@locate-path/package.json new file mode 100644 index 000000000..f32cb90dd --- /dev/null +++ b/public/node_modules/_locate-path@5.0.0@locate-path/package.json @@ -0,0 +1,48 @@ +{ + "name": "locate-path", + "version": "5.0.0", + "description": "Get the first path that exists on disk of multiple paths", + "license": "MIT", + "repository": "sindresorhus/locate-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "locate", + "path", + "paths", + "file", + "files", + "exists", + "find", + "finder", + "search", + "searcher", + "array", + "iterable", + "iterator" + ], + "dependencies": { + "p-locate": "^4.1.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "locate-path@5.0.0", + "_resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_locate-path@5.0.0@locate-path/readme.md b/public/node_modules/_locate-path@5.0.0@locate-path/readme.md new file mode 100644 index 000000000..2184c6f30 --- /dev/null +++ b/public/node_modules/_locate-path@5.0.0@locate-path/readme.md @@ -0,0 +1,122 @@ +# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) + +> Get the first path that exists on disk of multiple paths + + +## Install + +``` +$ npm install locate-path +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const locatePath = require('locate-path'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + console(await locatePath(files)); + //=> 'rainbow' +})(); +``` + + +## API + +### locatePath(paths, [options]) + +Returns a `Promise` for the first path that exists or `undefined` if none exists. + +#### paths + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises. + +##### preserveOrder + +Type: `boolean`
+Default: `true` + +Preserve `paths` order when searching. + +Disable this to improve performance if you don't care about the order. + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory. + +##### type + +Type: `string`
+Default: `file`
+Values: `file` `directory` + +The type of paths that can match. + +##### allowSymlinks + +Type: `boolean`
+Default: `true` + +Allow symbolic links to match if they point to the chosen path type. + +### locatePath.sync(paths, [options]) + +Returns the first path that exists or `undefined` if none exists. + +#### paths + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### cwd + +Same as above. + +##### type + +Same as above. + +##### allowSymlinks + +Same as above. + + +## Related + +- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_lru-cache@5.1.1@lru-cache/LICENSE b/public/node_modules/_lru-cache@5.1.1@lru-cache/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_lru-cache@5.1.1@lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_lru-cache@5.1.1@lru-cache/README.md b/public/node_modules/_lru-cache@5.1.1@lru-cache/README.md new file mode 100644 index 000000000..435dfebb7 --- /dev/null +++ b/public/node_modules/_lru-cache@5.1.1@lru-cache/README.md @@ -0,0 +1,166 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) + +## Installation: + +```javascript +npm install lru-cache --save +``` + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = new LRU(options) + , otherCache = new LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +// but note that it must be THE SAME object, not +// just a JSON-equivalent object. +var someObject = { a: 1 } +cache.set(someObject, 'a value') +// Object keys are not toString()-ed +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') +// A similar object with same keys/values won't work, +// because it's a different object identity +assert.equal(cache.get({ a: 1 }), undefined) + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. Setting it to a non-number or negative number will + throw a `TypeError`. Setting it to 0 makes it be `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. + Setting this to a negative value will make everything seem old! + Setting it to a non-number will throw a `TypeError`. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. The item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. +* `noDisposeOnSet` By default, if you set a `dispose()` method, then + it'll be called whenever a `set()` operation overwrites an existing + key. If you set this option, `dispose()` will only be called when a + key falls out of the cache, not when it is overwritten. +* `updateAgeOnGet` When using time-expiring entries with `maxAge`, + setting this to `true` will make each item's effective time update + to the current time whenever it is retrieved from cache, causing it + to not expire. (It can still fall out of cache based on recency of + use, of course.) + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `maxAge` is optional and overrides the + cache `maxAge` option if provided. + + If the key is not found, `get()` will return `undefined`. + + The key and val can be any value. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries + +* `prune()` + + Manually iterates over the entire cache proactively pruning old entries diff --git a/public/node_modules/_lru-cache@5.1.1@lru-cache/index.js b/public/node_modules/_lru-cache@5.1.1@lru-cache/index.js new file mode 100644 index 000000000..573b6b85b --- /dev/null +++ b/public/node_modules/_lru-cache@5.1.1@lru-cache/index.js @@ -0,0 +1,334 @@ +'use strict' + +// A linked list to keep track of recently-used-ness +const Yallist = require('yallist') + +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + +const naiveLength = () => 1 + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity + + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } + + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') + + this[MAX] = mL || Infinity + trim(this) + } + get max () { + return this[MAX] + } + + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] + } + + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') + + this[MAX_AGE] = mA + trim(this) + } + get maxAge () { + return this[MAX_AGE] + } + + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') + lC = naiveLength + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(hit => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator () { return this[LENGTH_CALCULATOR] } + + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } + + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } + + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } + + keys () { + return this[LRU_LIST].toArray().map(k => k.key) + } + + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } + + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list + } + + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter(h => h) + } + + dumpLru () { + return this[LRU_LIST] + } + + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') + + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + const node = this[CACHE].get(key) + const item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + const hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) + + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } + + get (key) { + return get(this, key, true) + } + + peek (key) { + return get(this, key, false) + } + + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null + + del(this, node) + return node.value + } + + del (key) { + del(this, this[CACHE].get(key)) + } + + load (arr) { + // reset the cache + this.reset() + + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } + + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } +} + +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + return undefined + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() + self[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } +} + +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) + return false + + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) +} + +const trim = self => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + const prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +const del = (self, node) => { + if (node) { + const hit = node.value + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value) + + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} + +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) +} + +module.exports = LRUCache diff --git a/public/node_modules/_lru-cache@5.1.1@lru-cache/node_modules/yallist b/public/node_modules/_lru-cache@5.1.1@lru-cache/node_modules/yallist new file mode 120000 index 000000000..9d478f7ca --- /dev/null +++ b/public/node_modules/_lru-cache@5.1.1@lru-cache/node_modules/yallist @@ -0,0 +1 @@ +../../_yallist@3.1.1@yallist \ No newline at end of file diff --git a/public/node_modules/_lru-cache@5.1.1@lru-cache/package.json b/public/node_modules/_lru-cache@5.1.1@lru-cache/package.json new file mode 100644 index 000000000..e7f2699dd --- /dev/null +++ b/public/node_modules/_lru-cache@5.1.1@lru-cache/package.json @@ -0,0 +1,35 @@ +{ + "name": "lru-cache", + "description": "A cache object that deletes the least-recently-used items.", + "version": "5.1.1", + "author": "Isaac Z. Schlueter ", + "keywords": [ + "mru", + "lru", + "cache" + ], + "scripts": { + "test": "tap test/*.js --100 -J", + "snap": "TAP_SNAPSHOT=1 tap test/*.js -J", + "coveragerport": "tap --coverage-report=html", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "main": "index.js", + "repository": "git://github.com/isaacs/node-lru-cache.git", + "devDependencies": { + "benchmark": "^2.1.4", + "tap": "^12.1.0" + }, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + }, + "files": [ + "index.js" + ], + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "lru-cache@5.1.1", + "_resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_make-dir@3.0.0@make-dir/index.d.ts b/public/node_modules/_make-dir@3.0.0@make-dir/index.d.ts new file mode 100644 index 000000000..f9fe70419 --- /dev/null +++ b/public/node_modules/_make-dir@3.0.0@make-dir/index.d.ts @@ -0,0 +1,66 @@ +/// +import * as fs from 'fs'; + +declare namespace makeDir { + interface Options { + /** + Directory [permissions](https://x-team.com/blog/file-system-permissions-umask-node-js/). + + @default 0o777 & (~process.umask()) + */ + readonly mode?: number; + + /** + Use a custom `fs` implementation. For example [`graceful-fs`](https://github.com/isaacs/node-graceful-fs). + + Using a custom `fs` implementation will block the use of the native `recursive` option if `fs.mkdir` or `fs.mkdirSync` is not the native function. + + @default require('fs') + */ + readonly fs?: typeof fs; + } +} + +declare const makeDir: { + /** + Make a directory and its parents if needed - Think `mkdir -p`. + + @param path - Directory to create. + @returns The path to the created directory. + + @example + ``` + import makeDir = require('make-dir'); + + (async () => { + const path = await makeDir('unicorn/rainbow/cake'); + + console.log(path); + //=> '/Users/sindresorhus/fun/unicorn/rainbow/cake' + + // Multiple directories: + const paths = await Promise.all([ + makeDir('unicorn/rainbow'), + makeDir('foo/bar') + ]); + + console.log(paths); + // [ + // '/Users/sindresorhus/fun/unicorn/rainbow', + // '/Users/sindresorhus/fun/foo/bar' + // ] + })(); + ``` + */ + (path: string, options?: makeDir.Options): Promise; + + /** + Synchronously make a directory and its parents if needed - Think `mkdir -p`. + + @param path - Directory to create. + @returns The path to the created directory. + */ + sync(path: string, options?: makeDir.Options): string; +}; + +export = makeDir; diff --git a/public/node_modules/_make-dir@3.0.0@make-dir/index.js b/public/node_modules/_make-dir@3.0.0@make-dir/index.js new file mode 100644 index 000000000..17490c116 --- /dev/null +++ b/public/node_modules/_make-dir@3.0.0@make-dir/index.js @@ -0,0 +1,150 @@ +'use strict'; +const fs = require('fs'); +const path = require('path'); +const {promisify} = require('util'); +const semver = require('semver'); + +const defaults = { + mode: 0o777 & (~process.umask()), + fs +}; + +const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0'); + +// https://github.com/nodejs/node/issues/8987 +// https://github.com/libuv/libuv/pull/1088 +const checkPath = pth => { + if (process.platform === 'win32') { + const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, '')); + + if (pathHasInvalidWinCharacters) { + const error = new Error(`Path contains invalid characters: ${pth}`); + error.code = 'EINVAL'; + throw error; + } + } +}; + +const permissionError = pth => { + // This replicates the exception of `fs.mkdir` with native the + // `recusive` option when run on an invalid drive under Windows. + const error = new Error(`operation not permitted, mkdir '${pth}'`); + error.code = 'EPERM'; + error.errno = -4048; + error.path = pth; + error.syscall = 'mkdir'; + return error; +}; + +const makeDir = async (input, options) => { + checkPath(input); + options = { + ...defaults, + ...options + }; + + const mkdir = promisify(options.fs.mkdir); + const stat = promisify(options.fs.stat); + + if (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) { + const pth = path.resolve(input); + + await mkdir(pth, { + mode: options.mode, + recursive: true + }); + + return pth; + } + + const make = async pth => { + try { + await mkdir(pth, options.mode); + + return pth; + } catch (error) { + if (error.code === 'EPERM') { + throw error; + } + + if (error.code === 'ENOENT') { + if (path.dirname(pth) === pth) { + throw permissionError(pth); + } + + if (error.message.includes('null bytes')) { + throw error; + } + + await make(path.dirname(pth)); + + return make(pth); + } + + const stats = await stat(pth); + if (!stats.isDirectory()) { + throw error; + } + + return pth; + } + }; + + return make(path.resolve(input)); +}; + +module.exports = makeDir; + +module.exports.sync = (input, options) => { + checkPath(input); + options = { + ...defaults, + ...options + }; + + if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) { + const pth = path.resolve(input); + + fs.mkdirSync(pth, { + mode: options.mode, + recursive: true + }); + + return pth; + } + + const make = pth => { + try { + options.fs.mkdirSync(pth, options.mode); + } catch (error) { + if (error.code === 'EPERM') { + throw error; + } + + if (error.code === 'ENOENT') { + if (path.dirname(pth) === pth) { + throw permissionError(pth); + } + + if (error.message.includes('null bytes')) { + throw error; + } + + make(path.dirname(pth)); + return make(pth); + } + + try { + if (!options.fs.statSync(pth).isDirectory()) { + throw new Error('The path is not a directory'); + } + } catch (_) { + throw error; + } + } + + return pth; + }; + + return make(path.resolve(input)); +}; diff --git a/public/node_modules/_make-dir@3.0.0@make-dir/license b/public/node_modules/_make-dir@3.0.0@make-dir/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_make-dir@3.0.0@make-dir/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_make-dir@3.0.0@make-dir/node_modules/.bin/semver b/public/node_modules/_make-dir@3.0.0@make-dir/node_modules/.bin/semver new file mode 120000 index 000000000..4a4c90da6 --- /dev/null +++ b/public/node_modules/_make-dir@3.0.0@make-dir/node_modules/.bin/semver @@ -0,0 +1 @@ +../../../_semver@6.3.0@semver/bin/semver.js \ No newline at end of file diff --git a/public/node_modules/_make-dir@3.0.0@make-dir/node_modules/semver b/public/node_modules/_make-dir@3.0.0@make-dir/node_modules/semver new file mode 120000 index 000000000..4d4f60cce --- /dev/null +++ b/public/node_modules/_make-dir@3.0.0@make-dir/node_modules/semver @@ -0,0 +1 @@ +../../_semver@6.3.0@semver \ No newline at end of file diff --git a/public/node_modules/_make-dir@3.0.0@make-dir/package.json b/public/node_modules/_make-dir@3.0.0@make-dir/package.json new file mode 100644 index 000000000..3c515bc6c --- /dev/null +++ b/public/node_modules/_make-dir@3.0.0@make-dir/package.json @@ -0,0 +1,61 @@ +{ + "name": "make-dir", + "version": "3.0.0", + "description": "Make a directory and its parents if needed - Think `mkdir -p`", + "license": "MIT", + "repository": "sindresorhus/make-dir", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && nyc ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "mkdir", + "mkdirp", + "make", + "directories", + "dir", + "dirs", + "folders", + "directory", + "folder", + "path", + "parent", + "parents", + "intermediate", + "recursively", + "recursive", + "create", + "fs", + "filesystem", + "file-system" + ], + "dependencies": { + "semver": "^6.0.0" + }, + "devDependencies": { + "@types/graceful-fs": "^4.1.3", + "@types/node": "^11.12.2", + "ava": "^1.4.0", + "codecov": "^3.2.0", + "graceful-fs": "^4.1.15", + "nyc": "^13.3.0", + "path-type": "^4.0.0", + "tempy": "^0.2.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "make-dir@3.0.0", + "_resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_make-dir@3.0.0@make-dir/readme.md b/public/node_modules/_make-dir@3.0.0@make-dir/readme.md new file mode 100644 index 000000000..8c225c1f6 --- /dev/null +++ b/public/node_modules/_make-dir@3.0.0@make-dir/readme.md @@ -0,0 +1,123 @@ +# make-dir [![Build Status](https://travis-ci.org/sindresorhus/make-dir.svg?branch=master)](https://travis-ci.org/sindresorhus/make-dir) [![codecov](https://codecov.io/gh/sindresorhus/make-dir/branch/master/graph/badge.svg)](https://codecov.io/gh/sindresorhus/make-dir) + +> Make a directory and its parents if needed - Think `mkdir -p` + + +## Advantages over [`mkdirp`](https://github.com/substack/node-mkdirp) + +- Promise API *(Async/await ready!)* +- Fixes many `mkdirp` issues: [#96](https://github.com/substack/node-mkdirp/pull/96) [#70](https://github.com/substack/node-mkdirp/issues/70) [#66](https://github.com/substack/node-mkdirp/issues/66) +- 100% test coverage +- CI-tested on macOS, Linux, and Windows +- Actively maintained +- Doesn't bundle a CLI +- Uses native the `fs.mkdir/mkdirSync` [`recursive` option](https://nodejs.org/dist/latest/docs/api/fs.html#fs_fs_mkdir_path_options_callback) in Node.js >=10.12.0 unless [overridden](#fs) + + +## Install + +``` +$ npm install make-dir +``` + + +## Usage + +``` +$ pwd +/Users/sindresorhus/fun +$ tree +. +``` + +```js +const makeDir = require('make-dir'); + +(async () => { + const path = await makeDir('unicorn/rainbow/cake'); + + console.log(path); + //=> '/Users/sindresorhus/fun/unicorn/rainbow/cake' +})(); +``` + +``` +$ tree +. +└── unicorn + └── rainbow + └── cake +``` + +Multiple directories: + +```js +const makeDir = require('make-dir'); + +(async () => { + const paths = await Promise.all([ + makeDir('unicorn/rainbow'), + makeDir('foo/bar') + ]); + + console.log(paths); + /* + [ + '/Users/sindresorhus/fun/unicorn/rainbow', + '/Users/sindresorhus/fun/foo/bar' + ] + */ +})(); +``` + + +## API + +### makeDir(path, [options]) + +Returns a `Promise` for the path to the created directory. + +### makeDir.sync(path, [options]) + +Returns the path to the created directory. + +#### path + +Type: `string` + +Directory to create. + +#### options + +Type: `Object` + +##### mode + +Type: `integer`
+Default: `0o777 & (~process.umask())` + +Directory [permissions](https://x-team.com/blog/file-system-permissions-umask-node-js/). + +##### fs + +Type: `Object`
+Default: `require('fs')` + +Use a custom `fs` implementation. For example [`graceful-fs`](https://github.com/isaacs/node-graceful-fs). + +Using a custom `fs` implementation will block the use of the native `recursive` option if `fs.mkdir` or `fs.mkdirSync` is not the native function. + + +## Related + +- [make-dir-cli](https://github.com/sindresorhus/make-dir-cli) - CLI for this module +- [del](https://github.com/sindresorhus/del) - Delete files and directories +- [globby](https://github.com/sindresorhus/globby) - User-friendly glob matching +- [cpy](https://github.com/sindresorhus/cpy) - Copy files +- [cpy-cli](https://github.com/sindresorhus/cpy-cli) - Copy files on the command-line +- [move-file](https://github.com/sindresorhus/move-file) - Move a file + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_merge-stream@2.0.0@merge-stream/LICENSE b/public/node_modules/_merge-stream@2.0.0@merge-stream/LICENSE new file mode 100644 index 000000000..94a4c0a07 --- /dev/null +++ b/public/node_modules/_merge-stream@2.0.0@merge-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Stephen Sugden (stephensugden.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/public/node_modules/_merge-stream@2.0.0@merge-stream/README.md b/public/node_modules/_merge-stream@2.0.0@merge-stream/README.md new file mode 100644 index 000000000..0d5484115 --- /dev/null +++ b/public/node_modules/_merge-stream@2.0.0@merge-stream/README.md @@ -0,0 +1,78 @@ +# merge-stream + +Merge (interleave) a bunch of streams. + +[![build status](https://secure.travis-ci.org/grncdr/merge-stream.svg?branch=master)](http://travis-ci.org/grncdr/merge-stream) + +## Synopsis + +```javascript +var stream1 = new Stream(); +var stream2 = new Stream(); + +var merged = mergeStream(stream1, stream2); + +var stream3 = new Stream(); +merged.add(stream3); +merged.isEmpty(); +//=> false +``` + +## Description + +This is adapted from [event-stream](https://github.com/dominictarr/event-stream) separated into a new module, using Streams3. + +## API + +### `mergeStream` + +Type: `function` + +Merges an arbitrary number of streams. Returns a merged stream. + +#### `merged.add` + +A method to dynamically add more sources to the stream. The argument supplied to `add` can be either a source or an array of sources. + +#### `merged.isEmpty` + +A method that tells you if the merged stream is empty. + +When a stream is "empty" (aka. no sources were added), it could not be returned to a gulp task. + +So, we could do something like this: + +```js +stream = require('merge-stream')(); +// Something like a loop to add some streams to the merge stream +// stream.add(streamA); +// stream.add(streamB); +return stream.isEmpty() ? null : stream; +``` + +## Gulp example + +An example use case for **merge-stream** is to combine parts of a task in a project's **gulpfile.js** like this: + +```js +const gulp = require('gulp'); +const htmlValidator = require('gulp-w3c-html-validator'); +const jsHint = require('gulp-jshint'); +const mergeStream = require('merge-stream'); + +function lint() { + return mergeStream( + gulp.src('src/*.html') + .pipe(htmlValidator()) + .pipe(htmlValidator.reporter()), + gulp.src('src/*.js') + .pipe(jsHint()) + .pipe(jsHint.reporter()) + ); +} +gulp.task('lint', lint); +``` + +## License + +MIT diff --git a/public/node_modules/_merge-stream@2.0.0@merge-stream/index.js b/public/node_modules/_merge-stream@2.0.0@merge-stream/index.js new file mode 100644 index 000000000..b1a9e1a02 --- /dev/null +++ b/public/node_modules/_merge-stream@2.0.0@merge-stream/index.js @@ -0,0 +1,41 @@ +'use strict'; + +const { PassThrough } = require('stream'); + +module.exports = function (/*streams...*/) { + var sources = [] + var output = new PassThrough({objectMode: true}) + + output.setMaxListeners(0) + + output.add = add + output.isEmpty = isEmpty + + output.on('unpipe', remove) + + Array.prototype.slice.call(arguments).forEach(add) + + return output + + function add (source) { + if (Array.isArray(source)) { + source.forEach(add) + return this + } + + sources.push(source); + source.once('end', remove.bind(null, source)) + source.once('error', output.emit.bind(output, 'error')) + source.pipe(output, {end: false}) + return this + } + + function isEmpty () { + return sources.length == 0; + } + + function remove (source) { + sources = sources.filter(function (it) { return it !== source }) + if (!sources.length && output.readable) { output.end() } + } +} diff --git a/public/node_modules/_merge-stream@2.0.0@merge-stream/package.json b/public/node_modules/_merge-stream@2.0.0@merge-stream/package.json new file mode 100644 index 000000000..b1943dd29 --- /dev/null +++ b/public/node_modules/_merge-stream@2.0.0@merge-stream/package.json @@ -0,0 +1,22 @@ +{ + "name": "merge-stream", + "version": "2.0.0", + "description": "Create a stream that emits events from multiple other streams", + "files": [ + "index.js" + ], + "scripts": { + "test": "istanbul cover test.js && istanbul check-cover --statements 100 --branches 100" + }, + "repository": "grncdr/merge-stream", + "author": "Stephen Sugden ", + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "from2": "^2.0.3", + "istanbul": "^0.4.5" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "merge-stream@2.0.0", + "_resolved": "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_minimatch@3.0.4@minimatch/LICENSE b/public/node_modules/_minimatch@3.0.4@minimatch/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_minimatch@3.0.4@minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_minimatch@3.0.4@minimatch/README.md b/public/node_modules/_minimatch@3.0.4@minimatch/README.md new file mode 100644 index 000000000..ad72b8133 --- /dev/null +++ b/public/node_modules/_minimatch@3.0.4@minimatch/README.md @@ -0,0 +1,209 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/public/node_modules/_minimatch@3.0.4@minimatch/minimatch.js b/public/node_modules/_minimatch@3.0.4@minimatch/minimatch.js new file mode 100644 index 000000000..5b5f8cf44 --- /dev/null +++ b/public/node_modules/_minimatch@3.0.4@minimatch/minimatch.js @@ -0,0 +1,923 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/public/node_modules/_minimatch@3.0.4@minimatch/node_modules/brace-expansion b/public/node_modules/_minimatch@3.0.4@minimatch/node_modules/brace-expansion new file mode 120000 index 000000000..9b0b86536 --- /dev/null +++ b/public/node_modules/_minimatch@3.0.4@minimatch/node_modules/brace-expansion @@ -0,0 +1 @@ +../../_brace-expansion@1.1.11@brace-expansion \ No newline at end of file diff --git a/public/node_modules/_minimatch@3.0.4@minimatch/package.json b/public/node_modules/_minimatch@3.0.4@minimatch/package.json new file mode 100644 index 000000000..6e925fc5a --- /dev/null +++ b/public/node_modules/_minimatch@3.0.4@minimatch/package.json @@ -0,0 +1,33 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.0.4", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap test/*.js --cov", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "devDependencies": { + "tap": "^10.3.2" + }, + "license": "ISC", + "files": [ + "minimatch.js" + ], + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "minimatch@3.0.4", + "_resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimatch%2Fdownload%2Fminimatch-3.0.4.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_minimist@0.0.8@minimist/.travis.yml b/public/node_modules/_minimist@0.0.8@minimist/.travis.yml new file mode 100644 index 000000000..cc4dba29d --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/public/node_modules/_minimist@0.0.8@minimist/LICENSE b/public/node_modules/_minimist@0.0.8@minimist/LICENSE new file mode 100644 index 000000000..ee27ba4b4 --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/node_modules/_minimist@0.0.8@minimist/example/parse.js b/public/node_modules/_minimist@0.0.8@minimist/example/parse.js new file mode 100644 index 000000000..abff3e8ee --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.dir(argv); diff --git a/public/node_modules/_minimist@0.0.8@minimist/index.js b/public/node_modules/_minimist@0.0.8@minimist/index.js new file mode 100644 index 000000000..584f551a6 --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/index.js @@ -0,0 +1,187 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + }); + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function setArg (key, val) { + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + setArg(m[1], m[2]); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + } + else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + notFlags.forEach(function(key) { + argv._.push(key); + }); + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +function longest (xs) { + return Math.max.apply(null, xs.map(function (x) { return x.length })); +} diff --git a/public/node_modules/_minimist@0.0.8@minimist/package.json b/public/node_modules/_minimist@0.0.8@minimist/package.json new file mode 100644 index 000000000..baf7be30a --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/package.json @@ -0,0 +1,46 @@ +{ + "name": "minimist", + "version": "0.0.8", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "tape": "~1.0.4", + "tap": "~0.4.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "minimist@0.0.8", + "_resolved": "https://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimist%2Fdownload%2Fminimist-0.0.8.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_minimist@0.0.8@minimist/readme.markdown b/public/node_modules/_minimist@0.0.8@minimist/readme.markdown new file mode 100644 index 000000000..c25635323 --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/readme.markdown @@ -0,0 +1,73 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) + +[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.dir(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a string or array of strings to always treat as booleans +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/public/node_modules/_minimist@0.0.8@minimist/test/dash.js b/public/node_modules/_minimist@0.0.8@minimist/test/dash.js new file mode 100644 index 000000000..8b034b99a --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/test/dash.js @@ -0,0 +1,24 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); diff --git a/public/node_modules/_minimist@0.0.8@minimist/test/default_bool.js b/public/node_modules/_minimist@0.0.8@minimist/test/default_bool.js new file mode 100644 index 000000000..f0041ee40 --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/test/default_bool.js @@ -0,0 +1,20 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); diff --git a/public/node_modules/_minimist@0.0.8@minimist/test/dotted.js b/public/node_modules/_minimist@0.0.8@minimist/test/dotted.js new file mode 100644 index 000000000..ef0ae349b --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/test/dotted.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); diff --git a/public/node_modules/_minimist@0.0.8@minimist/test/long.js b/public/node_modules/_minimist@0.0.8@minimist/test/long.js new file mode 100644 index 000000000..5d3a1e09d --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/public/node_modules/_minimist@0.0.8@minimist/test/parse.js b/public/node_modules/_minimist@0.0.8@minimist/test/parse.js new file mode 100644 index 000000000..8a9064669 --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/test/parse.js @@ -0,0 +1,318 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); + +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); diff --git a/public/node_modules/_minimist@0.0.8@minimist/test/parse_modified.js b/public/node_modules/_minimist@0.0.8@minimist/test/parse_modified.js new file mode 100644 index 000000000..21851b036 --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: ['123'] }); +}); diff --git a/public/node_modules/_minimist@0.0.8@minimist/test/short.js b/public/node_modules/_minimist@0.0.8@minimist/test/short.js new file mode 100644 index 000000000..d513a1c25 --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/test/short.js @@ -0,0 +1,67 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); diff --git a/public/node_modules/_minimist@0.0.8@minimist/test/whitespace.js b/public/node_modules/_minimist@0.0.8@minimist/test/whitespace.js new file mode 100644 index 000000000..8a52a58ce --- /dev/null +++ b/public/node_modules/_minimist@0.0.8@minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/public/node_modules/_minipass-collect@1.0.2@minipass-collect/LICENSE b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_minipass-collect@1.0.2@minipass-collect/README.md b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/README.md new file mode 100644 index 000000000..ae1c3daca --- /dev/null +++ b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/README.md @@ -0,0 +1,48 @@ +# minipass-collect + +A Minipass stream that collects all the data into a single chunk + +Note that this buffers ALL data written to it, so it's only good for +situations where you are sure the entire stream fits in memory. + +Note: this is primarily useful for the `Collect.PassThrough` class, since +Minipass streams already have a `.collect()` method which returns a promise +that resolves to the array of chunks, and a `.concat()` method that returns +the data concatenated into a single Buffer or String. + +## USAGE + +```js +const Collect = require('minipass-collect') + +const collector = new Collect() +collector.on('data', allTheData => { + console.log('all the data!', allTheData) +}) + +someSourceOfData.pipe(collector) + +// note that you can also simply do: +someSourceOfData.pipe(new Minipass()).concat().then(data => ...) +// or even, if someSourceOfData is a Minipass: +someSourceOfData.concat().then(data => ...) +// but you might prefer to have it stream-shaped rather than +// Promise-shaped in some scenarios. +``` + +If you want to collect the data, but _also_ act as a passthrough stream, +then use `Collect.PassThrough` instead (for example to memoize streaming +responses), and listen on the `collect` event. + +```js +const Collect = require('minipass-collect') + +const collector = new Collect.PassThrough() +collector.on('collect', allTheData => { + console.log('all the data!', allTheData) +}) + +someSourceOfData.pipe(collector).pipe(someOtherStream) +``` + +All [minipass options](http://npm.im/minipass) are supported. diff --git a/public/node_modules/_minipass-collect@1.0.2@minipass-collect/index.js b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/index.js new file mode 100644 index 000000000..2fe68c0b5 --- /dev/null +++ b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/index.js @@ -0,0 +1,71 @@ +const Minipass = require('minipass') +const _data = Symbol('_data') +const _length = Symbol('_length') +class Collect extends Minipass { + constructor (options) { + super(options) + this[_data] = [] + this[_length] = 0 + } + write (chunk, encoding, cb) { + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (!encoding) + encoding = 'utf8' + + const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding) + this[_data].push(c) + this[_length] += c.length + if (cb) + cb() + return true + } + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + const result = Buffer.concat(this[_data], this[_length]) + super.write(result) + return super.end(cb) + } +} +module.exports = Collect + +// it would be possible to DRY this a bit by doing something like +// this.collector = new Collect() and listening on its data event, +// but it's not much code, and we may as well save the extra obj +class CollectPassThrough extends Minipass { + constructor (options) { + super(options) + this[_data] = [] + this[_length] = 0 + } + write (chunk, encoding, cb) { + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (!encoding) + encoding = 'utf8' + + const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding) + this[_data].push(c) + this[_length] += c.length + return super.write(chunk, encoding, cb) + } + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + const result = Buffer.concat(this[_data], this[_length]) + this.emit('collect', result) + return super.end(cb) + } +} +module.exports.PassThrough = CollectPassThrough diff --git a/public/node_modules/_minipass-collect@1.0.2@minipass-collect/node_modules/minipass b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/node_modules/minipass new file mode 120000 index 000000000..a95109227 --- /dev/null +++ b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/node_modules/minipass @@ -0,0 +1 @@ +../../_minipass@3.1.1@minipass \ No newline at end of file diff --git a/public/node_modules/_minipass-collect@1.0.2@minipass-collect/package.json b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/package.json new file mode 100644 index 000000000..a30874784 --- /dev/null +++ b/public/node_modules/_minipass-collect@1.0.2@minipass-collect/package.json @@ -0,0 +1,32 @@ +{ + "name": "minipass-collect", + "version": "1.0.2", + "description": "A Minipass stream that collects all the data into a single chunk", + "author": "Isaac Z. Schlueter (https://izs.me)", + "license": "ISC", + "scripts": { + "test": "tap", + "snap": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "tap": { + "check-coverage": true + }, + "devDependencies": { + "tap": "^14.6.9" + }, + "dependencies": { + "minipass": "^3.0.0" + }, + "files": [ + "index.js" + ], + "engines": { + "node": ">= 8" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "minipass-collect@1.0.2", + "_resolved": "https://registry.npm.taobao.org/minipass-collect/download/minipass-collect-1.0.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_minipass-flush@1.0.5@minipass-flush/LICENSE b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_minipass-flush@1.0.5@minipass-flush/README.md b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/README.md new file mode 100644 index 000000000..7eea40013 --- /dev/null +++ b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/README.md @@ -0,0 +1,47 @@ +# minipass-flush + +A Minipass stream that calls a flush function before emitting 'end' + +## USAGE + +```js +const Flush = require('minipass-flush') +cons f = new Flush({ + flush (cb) { + // call the cb when done, or return a promise + // the 'end' event will wait for it, along with + // close, finish, and prefinish. + // call the cb with an error, or return a rejecting + // promise to emit 'error' instead of doing the 'end' + return rerouteAllEncryptions().then(() => clearAllChannels()) + }, + // all other minipass options accepted as well +}) + +someDataSource.pipe(f).on('end', () => { + // proper flushing has been accomplished +}) + +// Or as a subclass implementing a 'flush' method: +class MyFlush extends Flush { + flush (cb) { + // old fashioned callback style! + rerouteAllEncryptions(er => { + if (er) + return cb(er) + clearAllChannels(er => { + if (er) + cb(er) + cb() + }) + }) + } +} +``` + +That's about it. + +If your `flush` method doesn't have to do anything asynchronous, then it's +better to call the callback right away in this tick, rather than returning +`Promise.resolve()`, so that the `end` event can happen as soon as +possible. diff --git a/public/node_modules/_minipass-flush@1.0.5@minipass-flush/index.js b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/index.js new file mode 100644 index 000000000..cb2537fa6 --- /dev/null +++ b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/index.js @@ -0,0 +1,39 @@ +const Minipass = require('minipass') +const _flush = Symbol('_flush') +const _flushed = Symbol('_flushed') +const _flushing = Symbol('_flushing') +class Flush extends Minipass { + constructor (opt = {}) { + if (typeof opt === 'function') + opt = { flush: opt } + + super(opt) + + // or extend this class and provide a 'flush' method in your subclass + if (typeof opt.flush !== 'function' && typeof this.flush !== 'function') + throw new TypeError('must provide flush function in options') + + this[_flush] = opt.flush || this.flush + } + + emit (ev, ...data) { + if ((ev !== 'end' && ev !== 'finish') || this[_flushed]) + return super.emit(ev, ...data) + + if (this[_flushing]) + return + + this[_flushing] = true + + const afterFlush = er => { + this[_flushed] = true + er ? super.emit('error', er) : super.emit('end') + } + + const ret = this[_flush](afterFlush) + if (ret && ret.then) + ret.then(() => afterFlush(), er => afterFlush(er)) + } +} + +module.exports = Flush diff --git a/public/node_modules/_minipass-flush@1.0.5@minipass-flush/node_modules/minipass b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/node_modules/minipass new file mode 120000 index 000000000..a95109227 --- /dev/null +++ b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/node_modules/minipass @@ -0,0 +1 @@ +../../_minipass@3.1.1@minipass \ No newline at end of file diff --git a/public/node_modules/_minipass-flush@1.0.5@minipass-flush/package.json b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/package.json new file mode 100644 index 000000000..8a33c4818 --- /dev/null +++ b/public/node_modules/_minipass-flush@1.0.5@minipass-flush/package.json @@ -0,0 +1,42 @@ +{ + "name": "minipass-flush", + "version": "1.0.5", + "description": "A Minipass stream that calls a flush function before emitting 'end'", + "author": "Isaac Z. Schlueter (https://izs.me)", + "license": "ISC", + "scripts": { + "test": "tap", + "snap": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "tap": { + "check-coverage": true + }, + "devDependencies": { + "tap": "^14.6.9" + }, + "dependencies": { + "minipass": "^3.0.0" + }, + "files": [ + "index.js" + ], + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/minipass-flush.git" + }, + "keywords": [ + "minipass", + "flush", + "stream" + ], + "engines": { + "node": ">= 8" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "minipass-flush@1.0.5", + "_resolved": "https://registry.npm.taobao.org/minipass-flush/download/minipass-flush-1.0.5.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/LICENSE b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/README.md b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/README.md new file mode 100644 index 000000000..12daa99f0 --- /dev/null +++ b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/README.md @@ -0,0 +1,69 @@ +# minipass-pipeline + +Create a pipeline of streams using Minipass. + +Calls `.pipe()` on all the streams in the list. Returns a stream where +writes got to the first pipe in the chain, and reads are from the last. + +Errors are proxied along the chain and emitted on the Pipeline stream. + +## USAGE + +```js +const Pipeline = require('minipass-pipeline') + +// the list of streams to pipeline together, +// a bit like `input | transform | output` in bash +const p = new Pipeline(input, transform, output) + +p.write('foo') // writes to input +p.on('data', chunk => doSomething()) // reads from output stream + +// less contrived example (but still pretty contrived)... +const decode = new bunzipDecoder() +const unpack = tar.extract({ cwd: 'target-dir' }) +const tbz = new Pipeline(decode, unpack) + +fs.createReadStream('archive.tbz').pipe(tbz) + +// specify any minipass options if you like, as the first argument +// it'll only try to pipeline event emitters with a .pipe() method +const p = new Pipeline({ objectMode: true }, input, transform, output) + +// If you don't know the things to pipe in right away, that's fine. +// use p.push(stream) to add to the end, or p.unshift(stream) to the front +const databaseDecoderStreamDoohickey = (connectionInfo) => { + const p = new Pipeline() + logIntoDatabase(connectionInfo).then(connection => { + initializeDecoderRing(connectionInfo).then(decoderRing => { + p.push(connection, decoderRing) + getUpstreamSource(upstream => { + p.unshift(upstream) + }) + }) + }) + // return to caller right away + // emitted data will be upstream -> connection -> decoderRing pipeline + return p +} +``` + +Pipeline is a [minipass](http://npm.im/minipass) stream, so it's as +synchronous as the streams it wraps. It will buffer data until there is a +reader, but no longer, so make sure to attach your listeners before you +pipe it somewhere else. + +## `new Pipeline(opts = {}, ...streams)` + +Create a new Pipeline with the specified Minipass options and any streams +provided. + +## `pipeline.push(stream, ...)` + +Attach one or more streams to the pipeline at the end (read) side of the +pipe chain. + +## `pipeline.unshift(stream, ...)` + +Attach one or more streams to the pipeline at the start (write) side of the +pipe chain. diff --git a/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/index.js b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/index.js new file mode 100644 index 000000000..019362196 --- /dev/null +++ b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/index.js @@ -0,0 +1,127 @@ +const Minipass = require('minipass') +const EE = require('events') +const isStream = s => s && s instanceof EE && ( + typeof s.pipe === 'function' || // readable + (typeof s.write === 'function' && typeof s.end === 'function') // writable +) + +const _head = Symbol('_head') +const _tail = Symbol('_tail') +const _linkStreams = Symbol('_linkStreams') +const _setHead = Symbol('_setHead') +const _setTail = Symbol('_setTail') +const _onError = Symbol('_onError') +const _onData = Symbol('_onData') +const _onEnd = Symbol('_onEnd') +const _onDrain = Symbol('_onDrain') +const _streams = Symbol('_streams') +class Pipeline extends Minipass { + constructor (opts, ...streams) { + if (isStream(opts)) { + streams.unshift(opts) + opts = {} + } + + super(opts) + this[_streams] = [] + if (streams.length) + this.push(...streams) + } + + [_linkStreams] (streams) { + // reduce takes (left,right), and we return right to make it the + // new left value. + return streams.reduce((src, dest) => { + src.on('error', er => dest.emit('error', er)) + src.pipe(dest) + return dest + }) + } + + push (...streams) { + this[_streams].push(...streams) + if (this[_tail]) + streams.unshift(this[_tail]) + + const linkRet = this[_linkStreams](streams) + + this[_setTail](linkRet) + if (!this[_head]) + this[_setHead](streams[0]) + } + + unshift (...streams) { + this[_streams].unshift(...streams) + if (this[_head]) + streams.push(this[_head]) + + const linkRet = this[_linkStreams](streams) + this[_setHead](streams[0]) + if (!this[_tail]) + this[_setTail](linkRet) + } + + destroy (er) { + // set fire to the whole thing. + this[_streams].forEach(s => + typeof s.destroy === 'function' && s.destroy()) + return super.destroy(er) + } + + // readable interface -> tail + [_setTail] (stream) { + this[_tail] = stream + stream.on('error', er => this[_onError](stream, er)) + stream.on('data', chunk => this[_onData](stream, chunk)) + stream.on('end', () => this[_onEnd](stream)) + stream.on('finish', () => this[_onEnd](stream)) + } + + // errors proxied down the pipeline + // they're considered part of the "read" interface + [_onError] (stream, er) { + if (stream === this[_tail]) + this.emit('error', er) + } + [_onData] (stream, chunk) { + if (stream === this[_tail]) + super.write(chunk) + } + [_onEnd] (stream) { + if (stream === this[_tail]) + super.end() + } + pause () { + super.pause() + return this[_tail] && this[_tail].pause && this[_tail].pause() + } + + // NB: Minipass calls its internal private [RESUME] method during + // pipe drains, to avoid hazards where stream.resume() is overridden. + // Thus, we need to listen to the resume *event*, not override the + // resume() method, and proxy *that* to the tail. + emit (ev, ...args) { + if (ev === 'resume' && this[_tail] && this[_tail].resume) + this[_tail].resume() + return super.emit(ev, ...args) + } + + // writable interface -> head + [_setHead] (stream) { + this[_head] = stream + stream.on('drain', () => this[_onDrain](stream)) + } + [_onDrain] (stream) { + if (stream === this[_head]) + this.emit('drain') + } + write (chunk, enc, cb) { + return this[_head].write(chunk, enc, cb) + } + end (chunk, enc, cb) { + this[_head].end(chunk, enc, cb) + return this + } +} + +module.exports = Pipeline diff --git a/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/node_modules/minipass b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/node_modules/minipass new file mode 120000 index 000000000..a95109227 --- /dev/null +++ b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/node_modules/minipass @@ -0,0 +1 @@ +../../_minipass@3.1.1@minipass \ No newline at end of file diff --git a/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/package.json b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/package.json new file mode 100644 index 000000000..1fb3d601b --- /dev/null +++ b/public/node_modules/_minipass-pipeline@1.2.2@minipass-pipeline/package.json @@ -0,0 +1,32 @@ +{ + "name": "minipass-pipeline", + "version": "1.2.2", + "description": "create a pipeline of streams using Minipass", + "author": "Isaac Z. Schlueter (https://izs.me)", + "license": "ISC", + "scripts": { + "test": "tap", + "snap": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "tap": { + "check-coverage": true + }, + "devDependencies": { + "tap": "^14.6.4" + }, + "dependencies": { + "minipass": "^3.0.0" + }, + "files": [ + "index.js" + ], + "engines": { + "node": ">=8" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "minipass-pipeline@1.2.2", + "_resolved": "https://registry.npm.taobao.org/minipass-pipeline/download/minipass-pipeline-1.2.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_minipass@3.1.1@minipass/LICENSE b/public/node_modules/_minipass@3.1.1@minipass/LICENSE new file mode 100644 index 000000000..20a476254 --- /dev/null +++ b/public/node_modules/_minipass@3.1.1@minipass/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) npm, Inc. and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_minipass@3.1.1@minipass/README.md b/public/node_modules/_minipass@3.1.1@minipass/README.md new file mode 100644 index 000000000..32ace2fb9 --- /dev/null +++ b/public/node_modules/_minipass@3.1.1@minipass/README.md @@ -0,0 +1,606 @@ +# minipass + +A _very_ minimal implementation of a [PassThrough +stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough) + +[It's very +fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0) +for objects, strings, and buffers. + +Supports pipe()ing (including multi-pipe() and backpressure transmission), +buffering data until either a `data` event handler or `pipe()` is added (so +you don't lose the first chunk), and most other cases where PassThrough is +a good idea. + +There is a `read()` method, but it's much more efficient to consume data +from this stream via `'data'` events or by calling `pipe()` into some other +stream. Calling `read()` requires the buffer to be flattened in some +cases, which requires copying memory. + +There is also no `unpipe()` method. Once you start piping, there is no +stopping it! + +If you set `objectMode: true` in the options, then whatever is written will +be emitted. Otherwise, it'll do a minimal amount of Buffer copying to +ensure proper Streams semantics when `read(n)` is called. + +`objectMode` can also be set by doing `stream.objectMode = true`, or by +writing any non-string/non-buffer data. `objectMode` cannot be set to +false once it is set. + +This is not a `through` or `through2` stream. It doesn't transform the +data, it just passes it right through. If you want to transform the data, +extend the class, and override the `write()` method. Once you're done +transforming the data however you want, call `super.write()` with the +transform output. + +For some examples of streams that extend Minipass in various ways, check +out: + +- [minizlib](http://npm.im/minizlib) +- [fs-minipass](http://npm.im/fs-minipass) +- [tar](http://npm.im/tar) +- [minipass-collect](http://npm.im/minipass-collect) +- [minipass-flush](http://npm.im/minipass-flush) +- [minipass-pipeline](http://npm.im/minipass-pipeline) +- [tap](http://npm.im/tap) +- [tap-parser](http://npm.im/tap) +- [treport](http://npm.im/tap) +- [minipass-fetch](http://npm.im/minipass-fetch) + +## Differences from Node.js Streams + +There are several things that make Minipass streams different from (and in +some ways superior to) Node.js core streams. + +Please read these caveats if you are familiar with noode-core streams and +intend to use Minipass streams in your programs. + +### Timing + +Minipass streams are designed to support synchronous use-cases. Thus, data +is emitted as soon as it is available, always. It is buffered until read, +but no longer. Another way to look at it is that Minipass streams are +exactly as synchronous as the logic that writes into them. + +This can be surprising if your code relies on `PassThrough.write()` always +providing data on the next tick rather than the current one, or being able +to call `resume()` and not have the entire buffer disappear immediately. + +However, without this synchronicity guarantee, there would be no way for +Minipass to achieve the speeds it does, or support the synchronous use +cases that it does. Simply put, waiting takes time. + +This non-deferring approach makes Minipass streams much easier to reason +about, especially in the context of Promises and other flow-control +mechanisms. + +### No High/Low Water Marks + +Node.js core streams will optimistically fill up a buffer, returning `true` +on all writes until the limit is hit, even if the data has nowhere to go. +Then, they will not attempt to draw more data in until the buffer size dips +below a minimum value. + +Minipass streams are much simpler. The `write()` method will return `true` +if the data has somewhere to go (which is to say, given the timing +guarantees, that the data is already there by the time `write()` returns). + +If the data has nowhere to go, then `write()` returns false, and the data +sits in a buffer, to be drained out immediately as soon as anyone consumes +it. + +### Hazards of Buffering (or: Why Minipass Is So Fast) + +Since data written to a Minipass stream is immediately written all the way +through the pipeline, and `write()` always returns true/false based on +whether the data was fully flushed, backpressure is communicated +immediately to the upstream caller. This minimizes buffering. + +Consider this case: + +```js +const {PassThrough} = require('stream') +const p1 = new PassThrough({ highWaterMark: 1024 }) +const p2 = new PassThrough({ highWaterMark: 1024 }) +const p3 = new PassThrough({ highWaterMark: 1024 }) +const p4 = new PassThrough({ highWaterMark: 1024 }) + +p1.pipe(p2).pipe(p3).pipe(p4) +p4.on('data', () => console.log('made it through')) + +// this returns false and buffers, then writes to p2 on next tick (1) +// p2 returns false and buffers, pausing p1, then writes to p3 on next tick (2) +// p3 returns false and buffers, pausing p2, then writes to p4 on next tick (3) +// p4 returns false and buffers, pausing p3, then emits 'data' and 'drain' +// on next tick (4) +// p3 sees p4's 'drain' event, and calls resume(), emitting 'resume' and +// 'drain' on next tick (5) +// p2 sees p3's 'drain', calls resume(), emits 'resume' and 'drain' on next tick (6) +// p1 sees p2's 'drain', calls resume(), emits 'resume' and 'drain' on next +// tick (7) + +p1.write(Buffer.alloc(2048)) // returns false +``` + +Along the way, the data was buffered and deferred at each stage, and +multiple event deferrals happened, for an unblocked pipeline where it was +perfectly safe to write all the way through! + +Furthermore, setting a `highWaterMark` of `1024` might lead someone reading +the code to think an advisory maximum of 1KiB is being set for the +pipeline. However, the actual advisory buffering level is the _sum_ of +`highWaterMark` values, since each one has its own bucket. + +Consider the Minipass case: + +```js +const m1 = new Minipass() +const m2 = new Minipass() +const m3 = new Minipass() +const m4 = new Minipass() + +m1.pipe(m2).pipe(m3).pipe(m4) +m4.on('data', () => console.log('made it through')) + +// m1 is flowing, so it writes the data to m2 immediately +// m2 is flowing, so it writes the data to m3 immediately +// m3 is flowing, so it writes the data to m4 immediately +// m4 is flowing, so it fires the 'data' event immediately, returns true +// m4's write returned true, so m3 is still flowing, returns true +// m3's write returned true, so m2 is still flowing, returns true +// m2's write returned true, so m1 is still flowing, returns true +// No event deferrals or buffering along the way! + +m1.write(Buffer.alloc(2048)) // returns true +``` + +It is extremely unlikely that you _don't_ want to buffer any data written, +or _ever_ buffer data that can be flushed all the way through. Neither +node-core streams nor Minipass ever fail to buffer written data, but +node-core streams do a lot of unnecessary buffering and pausing. + +As always, the faster implementation is the one that does less stuff and +waits less time to do it. + +### Immediately emit `end` for empty streams (when not paused) + +If a stream is not paused, and `end()` is called before writing any data +into it, then it will emit `end` immediately. + +If you have logic that occurs on the `end` event which you don't want to +potentially happen immediately (for example, closing file descriptors, +moving on to the next entry in an archive parse stream, etc.) then be sure +to call `stream.pause()` on creation, and then `stream.resume()` once you +are ready to respond to the `end` event. + +### Emit `end` When Asked + +One hazard of immediately emitting `'end'` is that you may not yet have had +a chance to add a listener. In order to avoid this hazard, Minipass +streams safely re-emit the `'end'` event if a new listener is added after +`'end'` has been emitted. + +Ie, if you do `stream.on('end', someFunction)`, and the stream has already +emitted `end`, then it will call the handler right away. (You can think of +this somewhat like attaching a new `.then(fn)` to a previously-resolved +Promise.) + +To prevent calling handlers multiple times who would not expect multiple +ends to occur, all listeners are removed from the `'end'` event whenever it +is emitted. + +### Impact of "immediate flow" on Tee-streams + +A "tee stream" is a stream piping to multiple destinations: + +```js +const tee = new Minipass() +t.pipe(dest1) +t.pipe(dest2) +t.write('foo') // goes to both destinations +``` + +Since Minipass streams _immediately_ process any pending data through the +pipeline when a new pipe destination is added, this can have surprising +effects, especially when a stream comes in from some other function and may +or may not have data in its buffer. + +```js +// WARNING! WILL LOSE DATA! +const src = new Minipass() +src.write('foo') +src.pipe(dest1) // 'foo' chunk flows to dest1 immediately, and is gone +src.pipe(dest2) // gets nothing! +``` + +The solution is to create a dedicated tee-stream junction that pipes to +both locations, and then pipe to _that_ instead. + +```js +// Safe example: tee to both places +const src = new Minipass() +src.write('foo') +const tee = new Minipass() +tee.pipe(dest1) +tee.pipe(dest2) +stream.pipe(tee) // tee gets 'foo', pipes to both locations +``` + +The same caveat applies to `on('data')` event listeners. The first one +added will _immediately_ receive all of the data, leaving nothing for the +second: + +```js +// WARNING! WILL LOSE DATA! +const src = new Minipass() +src.write('foo') +src.on('data', handler1) // receives 'foo' right away +src.on('data', handler2) // nothing to see here! +``` + +Using a dedicated tee-stream can be used in this case as well: + +```js +// Safe example: tee to both data handlers +const src = new Minipass() +src.write('foo') +const tee = new Minipass() +tee.on('data', handler1) +tee.on('data', handler2) +src.pipe(tee) +``` + +## USAGE + +It's a stream! Use it like a stream and it'll most likely do what you +want. + +```js +const Minipass = require('minipass') +const mp = new Minipass(options) // optional: { encoding, objectMode } +mp.write('foo') +mp.pipe(someOtherStream) +mp.end('bar') +``` + +### OPTIONS + +* `encoding` How would you like the data coming _out_ of the stream to be + encoded? Accepts any values that can be passed to `Buffer.toString()`. +* `objectMode` Emit data exactly as it comes in. This will be flipped on + by default if you write() something other than a string or Buffer at any + point. Setting `objectMode: true` will prevent setting any encoding + value. + +### API + +Implements the user-facing portions of Node.js's `Readable` and `Writable` +streams. + +### Methods + +* `write(chunk, [encoding], [callback])` - Put data in. (Note that, in the + base Minipass class, the same data will come out.) Returns `false` if + the stream will buffer the next write, or true if it's still in "flowing" + mode. +* `end([chunk, [encoding]], [callback])` - Signal that you have no more + data to write. This will queue an `end` event to be fired when all the + data has been consumed. +* `setEncoding(encoding)` - Set the encoding for data coming of the stream. + This can only be done once. +* `pause()` - No more data for a while, please. This also prevents `end` + from being emitted for empty streams until the stream is resumed. +* `resume()` - Resume the stream. If there's data in the buffer, it is all + discarded. Any buffered events are immediately emitted. +* `pipe(dest)` - Send all output to the stream provided. There is no way + to unpipe. When data is emitted, it is immediately written to any and + all pipe destinations. +* `on(ev, fn)`, `emit(ev, fn)` - Minipass streams are EventEmitters. Some + events are given special treatment, however. (See below under "events".) +* `promise()` - Returns a Promise that resolves when the stream emits + `end`, or rejects if the stream emits `error`. +* `collect()` - Return a Promise that resolves on `end` with an array + containing each chunk of data that was emitted, or rejects if the stream + emits `error`. Note that this consumes the stream data. +* `concat()` - Same as `collect()`, but concatenates the data into a single + Buffer object. Will reject the returned promise if the stream is in + objectMode, or if it goes into objectMode by the end of the data. +* `read(n)` - Consume `n` bytes of data out of the buffer. If `n` is not + provided, then consume all of it. If `n` bytes are not available, then + it returns null. **Note** consuming streams in this way is less + efficient, and can lead to unnecessary Buffer copying. +* `destroy([er])` - Destroy the stream. If an error is provided, then an + `'error'` event is emitted. If the stream has a `close()` method, and + has not emitted a `'close'` event yet, then `stream.close()` will be + called. Any Promises returned by `.promise()`, `.collect()` or + `.concat()` will be rejected. After being destroyed, writing to the + stream will emit an error. No more data will be emitted if the stream is + destroyed, even if it was previously buffered. + +### Properties + +* `bufferLength` Read-only. Total number of bytes buffered, or in the case + of objectMode, the total number of objects. +* `encoding` The encoding that has been set. (Setting this is equivalent + to calling `setEncoding(enc)` and has the same prohibition against + setting multiple times.) +* `flowing` Read-only. Boolean indicating whether a chunk written to the + stream will be immediately emitted. +* `emittedEnd` Read-only. Boolean indicating whether the end-ish events + (ie, `end`, `prefinish`, `finish`) have been emitted. Note that + listening on any end-ish event will immediateyl re-emit it if it has + already been emitted. +* `writable` Whether the stream is writable. Default `true`. Set to + `false` when `end()` +* `readable` Whether the stream is readable. Default `true`. +* `buffer` A [yallist](http://npm.im/yallist) linked list of chunks written + to the stream that have not yet been emitted. (It's probably a bad idea + to mess with this.) +* `pipes` A [yallist](http://npm.im/yallist) linked list of streams that + this stream is piping into. (It's probably a bad idea to mess with + this.) +* `destroyed` A getter that indicates whether the stream was destroyed. +* `paused` True if the stream has been explicitly paused, otherwise false. +* `objectMode` Indicates whether the stream is in `objectMode`. Once set + to `true`, it cannot be set to `false`. + +### Events + +* `data` Emitted when there's data to read. Argument is the data to read. + This is never emitted while not flowing. If a listener is attached, that + will resume the stream. +* `end` Emitted when there's no more data to read. This will be emitted + immediately for empty streams when `end()` is called. If a listener is + attached, and `end` was already emitted, then it will be emitted again. + All listeners are removed when `end` is emitted. +* `prefinish` An end-ish event that follows the same logic as `end` and is + emitted in the same conditions where `end` is emitted. Emitted after + `'end'`. +* `finish` An end-ish event that follows the same logic as `end` and is + emitted in the same conditions where `end` is emitted. Emitted after + `'prefinish'`. +* `close` An indication that an underlying resource has been released. + Minipass does not emit this event, but will defer it until after `end` + has been emitted, since it throws off some stream libraries otherwise. +* `drain` Emitted when the internal buffer empties, and it is again + suitable to `write()` into the stream. +* `readable` Emitted when data is buffered and ready to be read by a + consumer. +* `resume` Emitted when stream changes state from buffering to flowing + mode. (Ie, when `resume` is called, `pipe` is called, or a `data` event + listener is added.) + +### Static Methods + +* `Minipass.isStream(stream)` Returns `true` if the argument is a stream, + and false otherwise. To be considered a stream, the object must be + either an instance of Minipass, or an EventEmitter that has either a + `pipe()` method, or both `write()` and `end()` methods. (Pretty much any + stream in node-land will return `true` for this.) + +## EXAMPLES + +Here are some examples of things you can do with Minipass streams. + +### simple "are you done yet" promise + +```js +mp.promise().then(() => { + // stream is finished +}, er => { + // stream emitted an error +}) +``` + +### collecting + +```js +mp.collect().then(all => { + // all is an array of all the data emitted + // encoding is supported in this case, so + // so the result will be a collection of strings if + // an encoding is specified, or buffers/objects if not. + // + // In an async function, you may do + // const data = await stream.collect() +}) +``` + +### collecting into a single blob + +This is a bit slower because it concatenates the data into one chunk for +you, but if you're going to do it yourself anyway, it's convenient this +way: + +```js +mp.concat().then(onebigchunk => { + // onebigchunk is a string if the stream + // had an encoding set, or a buffer otherwise. +}) +``` + +### iteration + +You can iterate over streams synchronously or asynchronously in platforms +that support it. + +Synchronous iteration will end when the currently available data is +consumed, even if the `end` event has not been reached. In string and +buffer mode, the data is concatenated, so unless multiple writes are +occurring in the same tick as the `read()`, sync iteration loops will +generally only have a single iteration. + +To consume chunks in this way exactly as they have been written, with no +flattening, create the stream with the `{ objectMode: true }` option. + +```js +const mp = new Minipass({ objectMode: true }) +mp.write('a') +mp.write('b') +for (let letter of mp) { + console.log(letter) // a, b +} +mp.write('c') +mp.write('d') +for (let letter of mp) { + console.log(letter) // c, d +} +mp.write('e') +mp.end() +for (let letter of mp) { + console.log(letter) // e +} +for (let letter of mp) { + console.log(letter) // nothing +} +``` + +Asynchronous iteration will continue until the end event is reached, +consuming all of the data. + +```js +const mp = new Minipass({ encoding: 'utf8' }) + +// some source of some data +let i = 5 +const inter = setInterval(() => { + if (i --> 0) + mp.write(Buffer.from('foo\n', 'utf8')) + else { + mp.end() + clearInterval(inter) + } +}, 100) + +// consume the data with asynchronous iteration +async function consume () { + for await (let chunk of mp) { + console.log(chunk) + } + return 'ok' +} + +consume().then(res => console.log(res)) +// logs `foo\n` 5 times, and then `ok` +``` + +### subclass that `console.log()`s everything written into it + +```js +class Logger extends Minipass { + write (chunk, encoding, callback) { + console.log('WRITE', chunk, encoding) + return super.write(chunk, encoding, callback) + } + end (chunk, encoding, callback) { + console.log('END', chunk, encoding) + return super.end(chunk, encoding, callback) + } +} + +someSource.pipe(new Logger()).pipe(someDest) +``` + +### same thing, but using an inline anonymous class + +```js +// js classes are fun +someSource + .pipe(new (class extends Minipass { + emit (ev, ...data) { + // let's also log events, because debugging some weird thing + console.log('EMIT', ev) + return super.emit(ev, ...data) + } + write (chunk, encoding, callback) { + console.log('WRITE', chunk, encoding) + return super.write(chunk, encoding, callback) + } + end (chunk, encoding, callback) { + console.log('END', chunk, encoding) + return super.end(chunk, encoding, callback) + } + })) + .pipe(someDest) +``` + +### subclass that defers 'end' for some reason + +```js +class SlowEnd extends Minipass { + emit (ev, ...args) { + if (ev === 'end') { + console.log('going to end, hold on a sec') + setTimeout(() => { + console.log('ok, ready to end now') + super.emit('end', ...args) + }, 100) + } else { + return super.emit(ev, ...args) + } + } +} +``` + +### transform that creates newline-delimited JSON + +```js +class NDJSONEncode extends Minipass { + write (obj, cb) { + try { + // JSON.stringify can throw, emit an error on that + return super.write(JSON.stringify(obj) + '\n', 'utf8', cb) + } catch (er) { + this.emit('error', er) + } + } + end (obj, cb) { + if (typeof obj === 'function') { + cb = obj + obj = undefined + } + if (obj !== undefined) { + this.write(obj) + } + return super.end(cb) + } +} +``` + +### transform that parses newline-delimited JSON + +```js +class NDJSONDecode extends Minipass { + constructor (options) { + // always be in object mode, as far as Minipass is concerned + super({ objectMode: true }) + this._jsonBuffer = '' + } + write (chunk, encoding, cb) { + if (typeof chunk === 'string' && + typeof encoding === 'string' && + encoding !== 'utf8') { + chunk = Buffer.from(chunk, encoding).toString() + } else if (Buffer.isBuffer(chunk)) + chunk = chunk.toString() + } + if (typeof encoding === 'function') { + cb = encoding + } + const jsonData = (this._jsonBuffer + chunk).split('\n') + this._jsonBuffer = jsonData.pop() + for (let i = 0; i < jsonData.length; i++) { + let parsed + try { + super.write(parsed) + } catch (er) { + this.emit('error', er) + continue + } + } + if (cb) + cb() + } +} +``` diff --git a/public/node_modules/_minipass@3.1.1@minipass/index.js b/public/node_modules/_minipass@3.1.1@minipass/index.js new file mode 100644 index 000000000..55ea0f3dd --- /dev/null +++ b/public/node_modules/_minipass@3.1.1@minipass/index.js @@ -0,0 +1,538 @@ +'use strict' +const EE = require('events') +const Stream = require('stream') +const Yallist = require('yallist') +const SD = require('string_decoder').StringDecoder + +const EOF = Symbol('EOF') +const MAYBE_EMIT_END = Symbol('maybeEmitEnd') +const EMITTED_END = Symbol('emittedEnd') +const EMITTING_END = Symbol('emittingEnd') +const CLOSED = Symbol('closed') +const READ = Symbol('read') +const FLUSH = Symbol('flush') +const FLUSHCHUNK = Symbol('flushChunk') +const ENCODING = Symbol('encoding') +const DECODER = Symbol('decoder') +const FLOWING = Symbol('flowing') +const PAUSED = Symbol('paused') +const RESUME = Symbol('resume') +const BUFFERLENGTH = Symbol('bufferLength') +const BUFFERPUSH = Symbol('bufferPush') +const BUFFERSHIFT = Symbol('bufferShift') +const OBJECTMODE = Symbol('objectMode') +const DESTROYED = Symbol('destroyed') + +// TODO remove when Node v8 support drops +const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' +const ASYNCITERATOR = doIter && Symbol.asyncIterator + || Symbol('asyncIterator not implemented') +const ITERATOR = doIter && Symbol.iterator + || Symbol('iterator not implemented') + +// events that mean 'the stream is over' +// these are treated specially, and re-emitted +// if they are listened for after emitting. +const isEndish = ev => + ev === 'end' || + ev === 'finish' || + ev === 'prefinish' + +const isArrayBuffer = b => b instanceof ArrayBuffer || + typeof b === 'object' && + b.constructor && + b.constructor.name === 'ArrayBuffer' && + b.byteLength >= 0 + +const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) + +module.exports = class Minipass extends Stream { + constructor (options) { + super() + this[FLOWING] = false + // whether we're explicitly paused + this[PAUSED] = false + this.pipes = new Yallist() + this.buffer = new Yallist() + this[OBJECTMODE] = options && options.objectMode || false + if (this[OBJECTMODE]) + this[ENCODING] = null + else + this[ENCODING] = options && options.encoding || null + if (this[ENCODING] === 'buffer') + this[ENCODING] = null + this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null + this[EOF] = false + this[EMITTED_END] = false + this[EMITTING_END] = false + this[CLOSED] = false + this.writable = true + this.readable = true + this[BUFFERLENGTH] = 0 + this[DESTROYED] = false + } + + get bufferLength () { return this[BUFFERLENGTH] } + + get encoding () { return this[ENCODING] } + set encoding (enc) { + if (this[OBJECTMODE]) + throw new Error('cannot set encoding in objectMode') + + if (this[ENCODING] && enc !== this[ENCODING] && + (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + throw new Error('cannot change encoding') + + if (this[ENCODING] !== enc) { + this[DECODER] = enc ? new SD(enc) : null + if (this.buffer.length) + this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) + } + + this[ENCODING] = enc + } + + setEncoding (enc) { + this.encoding = enc + } + + get objectMode () { return this[OBJECTMODE] } + set objectMode (ॐ ) { this[OBJECTMODE] = this[OBJECTMODE] || !!ॐ } + + write (chunk, encoding, cb) { + if (this[EOF]) + throw new Error('write after end') + + if (this[DESTROYED]) { + this.emit('error', Object.assign( + new Error('Cannot call write after a stream was destroyed'), + { code: 'ERR_STREAM_DESTROYED' } + )) + return true + } + + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (!encoding) + encoding = 'utf8' + + // convert array buffers and typed array views into buffers + // at some point in the future, we may want to do the opposite! + // leave strings and buffers as-is + // anything else switches us into object mode + if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { + if (isArrayBufferView(chunk)) + chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) + else if (isArrayBuffer(chunk)) + chunk = Buffer.from(chunk) + else if (typeof chunk !== 'string') + // use the setter so we throw if we have encoding set + this.objectMode = true + } + + // this ensures at this point that the chunk is a buffer or string + // don't buffer it up or send it to the decoder + if (!this.objectMode && !chunk.length) { + const ret = this.flowing + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + if (cb) + cb() + return ret + } + + // fast-path writing strings of same encoding to a stream with + // an empty buffer, skipping the buffer/decoder dance + if (typeof chunk === 'string' && !this[OBJECTMODE] && + // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { + chunk = Buffer.from(chunk, encoding) + } + + if (Buffer.isBuffer(chunk) && this[ENCODING]) + chunk = this[DECODER].write(chunk) + + try { + return this.flowing + ? (this.emit('data', chunk), this.flowing) + : (this[BUFFERPUSH](chunk), false) + } finally { + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + if (cb) + cb() + } + } + + read (n) { + if (this[DESTROYED]) + return null + + try { + if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) + return null + + if (this[OBJECTMODE]) + n = null + + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = new Yallist([ + Array.from(this.buffer).join('') + ]) + else + this.buffer = new Yallist([ + Buffer.concat(Array.from(this.buffer), this[BUFFERLENGTH]) + ]) + } + + return this[READ](n || null, this.buffer.head.value) + } finally { + this[MAYBE_EMIT_END]() + } + } + + [READ] (n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT]() + else { + this.buffer.head.value = chunk.slice(n) + chunk = chunk.slice(0, n) + this[BUFFERLENGTH] -= n + } + + this.emit('data', chunk) + + if (!this.buffer.length && !this[EOF]) + this.emit('drain') + + return chunk + } + + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + if (cb) + this.once('end', cb) + this[EOF] = true + this.writable = false + + // if we haven't written anything, then go ahead and emit, + // even if we're not reading. + // we'll re-emit if a new 'end' listener is added anyway. + // This makes MP more suitable to write-only use cases. + if (this.flowing || !this[PAUSED]) + this[MAYBE_EMIT_END]() + return this + } + + // don't let the internal resume be overwritten + [RESUME] () { + if (this[DESTROYED]) + return + + this[PAUSED] = false + this[FLOWING] = true + this.emit('resume') + if (this.buffer.length) + this[FLUSH]() + else if (this[EOF]) + this[MAYBE_EMIT_END]() + else + this.emit('drain') + } + + resume () { + return this[RESUME]() + } + + pause () { + this[FLOWING] = false + this[PAUSED] = true + } + + get destroyed () { + return this[DESTROYED] + } + + get flowing () { + return this[FLOWING] + } + + get paused () { + return this[PAUSED] + } + + [BUFFERPUSH] (chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1 + else + this[BUFFERLENGTH] += chunk.length + return this.buffer.push(chunk) + } + + [BUFFERSHIFT] () { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1 + else + this[BUFFERLENGTH] -= this.buffer.head.value.length + } + return this.buffer.shift() + } + + [FLUSH] () { + do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) + + if (!this.buffer.length && !this[EOF]) + this.emit('drain') + } + + [FLUSHCHUNK] (chunk) { + return chunk ? (this.emit('data', chunk), this.flowing) : false + } + + pipe (dest, opts) { + if (this[DESTROYED]) + return + + const ended = this[EMITTED_END] + opts = opts || {} + if (dest === process.stdout || dest === process.stderr) + opts.end = false + else + opts.end = opts.end !== false + + const p = { dest: dest, opts: opts, ondrain: _ => this[RESUME]() } + this.pipes.push(p) + + dest.on('drain', p.ondrain) + this[RESUME]() + // piping an ended stream ends immediately + if (ended && p.opts.end) + p.dest.end() + return dest + } + + addListener (ev, fn) { + return this.on(ev, fn) + } + + on (ev, fn) { + try { + return super.on(ev, fn) + } finally { + if (ev === 'data' && !this.pipes.length && !this.flowing) + this[RESUME]() + else if (isEndish(ev) && this[EMITTED_END]) { + super.emit(ev) + this.removeAllListeners(ev) + } + } + } + + get emittedEnd () { + return this[EMITTED_END] + } + + [MAYBE_EMIT_END] () { + if (!this[EMITTING_END] && + !this[EMITTED_END] && + !this[DESTROYED] && + this.buffer.length === 0 && + this[EOF]) { + this[EMITTING_END] = true + this.emit('end') + this.emit('prefinish') + this.emit('finish') + if (this[CLOSED]) + this.emit('close') + this[EMITTING_END] = false + } + } + + emit (ev, data) { + // error and close are only events allowed after calling destroy() + if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) + return + else if (ev === 'data') { + if (!data) + return + + if (this.pipes.length) + this.pipes.forEach(p => + p.dest.write(data) === false && this.pause()) + } else if (ev === 'end') { + // only actual end gets this treatment + if (this[EMITTED_END] === true) + return + + this[EMITTED_END] = true + this.readable = false + + if (this[DECODER]) { + data = this[DECODER].end() + if (data) { + this.pipes.forEach(p => p.dest.write(data)) + super.emit('data', data) + } + } + + this.pipes.forEach(p => { + p.dest.removeListener('drain', p.ondrain) + if (p.opts.end) + p.dest.end() + }) + } else if (ev === 'close') { + this[CLOSED] = true + // don't emit close before 'end' and 'finish' + if (!this[EMITTED_END] && !this[DESTROYED]) + return + } + + // TODO: replace with a spread operator when Node v4 support drops + const args = new Array(arguments.length) + args[0] = ev + args[1] = data + if (arguments.length > 2) { + for (let i = 2; i < arguments.length; i++) { + args[i] = arguments[i] + } + } + + try { + return super.emit.apply(this, args) + } finally { + if (!isEndish(ev)) + this[MAYBE_EMIT_END]() + else + this.removeAllListeners(ev) + } + } + + // const all = await stream.collect() + collect () { + const buf = [] + if (!this[OBJECTMODE]) + buf.dataLength = 0 + // set the promise first, in case an error is raised + // by triggering the flow here. + const p = this.promise() + this.on('data', c => { + buf.push(c) + if (!this[OBJECTMODE]) + buf.dataLength += c.length + }) + return p.then(() => buf) + } + + // const data = await stream.concat() + concat () { + return this[OBJECTMODE] + ? Promise.reject(new Error('cannot concat in objectMode')) + : this.collect().then(buf => + this[OBJECTMODE] + ? Promise.reject(new Error('cannot concat in objectMode')) + : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) + } + + // stream.promise().then(() => done, er => emitted error) + promise () { + return new Promise((resolve, reject) => { + this.on(DESTROYED, () => reject(new Error('stream destroyed'))) + this.on('end', () => resolve()) + this.on('error', er => reject(er)) + }) + } + + // for await (let chunk of stream) + [ASYNCITERATOR] () { + const next = () => { + const res = this.read() + if (res !== null) + return Promise.resolve({ done: false, value: res }) + + if (this[EOF]) + return Promise.resolve({ done: true }) + + let resolve = null + let reject = null + const onerr = er => { + this.removeListener('data', ondata) + this.removeListener('end', onend) + reject(er) + } + const ondata = value => { + this.removeListener('error', onerr) + this.removeListener('end', onend) + this.pause() + resolve({ value: value, done: !!this[EOF] }) + } + const onend = () => { + this.removeListener('error', onerr) + this.removeListener('data', ondata) + resolve({ done: true }) + } + const ondestroy = () => onerr(new Error('stream destroyed')) + return new Promise((res, rej) => { + reject = rej + resolve = res + this.once(DESTROYED, ondestroy) + this.once('error', onerr) + this.once('end', onend) + this.once('data', ondata) + }) + } + + return { next } + } + + // for (let chunk of stream) + [ITERATOR] () { + const next = () => { + const value = this.read() + const done = value === null + return { value, done } + } + return { next } + } + + destroy (er) { + if (this[DESTROYED]) { + if (er) + this.emit('error', er) + else + this.emit(DESTROYED) + return this + } + + this[DESTROYED] = true + + // throw away all buffered data, it's never coming out + this.buffer = new Yallist() + this[BUFFERLENGTH] = 0 + + if (typeof this.close === 'function' && !this[CLOSED]) + this.close() + + if (er) + this.emit('error', er) + else // if no error to emit, still reject pending promises + this.emit(DESTROYED) + + return this + } + + static isStream (s) { + return !!s && (s instanceof Minipass || s instanceof Stream || + s instanceof EE && ( + typeof s.pipe === 'function' || // readable + (typeof s.write === 'function' && typeof s.end === 'function') // writable + )) + } +} diff --git a/public/node_modules/_minipass@3.1.1@minipass/node_modules/yallist b/public/node_modules/_minipass@3.1.1@minipass/node_modules/yallist new file mode 120000 index 000000000..3e8b084ea --- /dev/null +++ b/public/node_modules/_minipass@3.1.1@minipass/node_modules/yallist @@ -0,0 +1 @@ +../../_yallist@4.0.0@yallist \ No newline at end of file diff --git a/public/node_modules/_minipass@3.1.1@minipass/package.json b/public/node_modules/_minipass@3.1.1@minipass/package.json new file mode 100644 index 000000000..d6dc7b80c --- /dev/null +++ b/public/node_modules/_minipass@3.1.1@minipass/package.json @@ -0,0 +1,42 @@ +{ + "name": "minipass", + "version": "3.1.1", + "description": "minimal implementation of a PassThrough stream", + "main": "index.js", + "dependencies": { + "yallist": "^4.0.0" + }, + "devDependencies": { + "end-of-stream": "^1.4.0", + "tap": "^14.6.5", + "through2": "^2.0.3" + }, + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish --tag=next", + "postpublish": "git push origin --follow-tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/minipass.git" + }, + "keywords": [ + "passthrough", + "stream" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "files": [ + "index.js" + ], + "tap": { + "check-coverage": true + }, + "engines": { + "node": ">=8" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "minipass@3.1.1", + "_resolved": "https://registry.npm.taobao.org/minipass/download/minipass-3.1.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/.travis.yml b/public/node_modules/_mkdirp@0.5.1@mkdirp/.travis.yml new file mode 100644 index 000000000..74c57bf15 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/LICENSE b/public/node_modules/_mkdirp@0.5.1@mkdirp/LICENSE new file mode 100644 index 000000000..432d1aeb0 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/bin/cmd.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/bin/cmd.js new file mode 100755 index 000000000..d95de15ae --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/bin/cmd.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var mkdirp = require('../'); +var minimist = require('minimist'); +var fs = require('fs'); + +var argv = minimist(process.argv.slice(2), { + alias: { m: 'mode', h: 'help' }, + string: [ 'mode' ] +}); +if (argv.help) { + fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); + return; +} + +var paths = argv._.slice(); +var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; + +(function next () { + if (paths.length === 0) return; + var p = paths.shift(); + + if (mode === undefined) mkdirp(p, cb) + else mkdirp(p, mode, cb) + + function cb (err) { + if (err) { + console.error(err.message); + process.exit(1); + } + else next(); + } +})(); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/bin/usage.txt b/public/node_modules/_mkdirp@0.5.1@mkdirp/bin/usage.txt new file mode 100644 index 000000000..f952aa2c7 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/bin/usage.txt @@ -0,0 +1,12 @@ +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/examples/pow.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/examples/pow.js new file mode 100644 index 000000000..e6924212e --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/examples/pow.js @@ -0,0 +1,6 @@ +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/index.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/index.js new file mode 100644 index 000000000..6ce241b58 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/index.js @@ -0,0 +1,98 @@ +var path = require('path'); +var fs = require('fs'); +var _0777 = parseInt('0777', 8); + +module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + +function mkdirP (p, opts, f, made) { + if (typeof opts === 'function') { + f = opts; + opts = {}; + } + else if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + var cb = f || function () {}; + p = path.resolve(p); + + xfs.mkdir(p, mode, function (er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case 'ENOENT': + mkdirP(path.dirname(p), opts, function (er, made) { + if (er) cb(er, made); + else mkdirP(p, opts, cb, made); + }); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, function (er2, stat) { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) cb(er, made) + else cb(null, made); + }); + break; + } + }); +} + +mkdirP.sync = function sync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + p = path.resolve(p); + + try { + xfs.mkdirSync(p, mode); + made = made || p; + } + catch (err0) { + switch (err0.code) { + case 'ENOENT' : + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = xfs.statSync(p); + } + catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + + return made; +}; diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/node_modules/minimist b/public/node_modules/_mkdirp@0.5.1@mkdirp/node_modules/minimist new file mode 120000 index 000000000..a79b484be --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/node_modules/minimist @@ -0,0 +1 @@ +../../_minimist@0.0.8@minimist \ No newline at end of file diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/package.json b/public/node_modules/_mkdirp@0.5.1@mkdirp/package.json new file mode 100644 index 000000000..ae9bb95f9 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/package.json @@ -0,0 +1,30 @@ +{ + "name": "mkdirp", + "description": "Recursively mkdir, like `mkdir -p`", + "version": "0.5.1", + "author": "James Halliday (http://substack.net)", + "main": "index.js", + "keywords": [ + "mkdir", + "directory" + ], + "repository": { + "type": "git", + "url": "https://github.com/substack/node-mkdirp.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "minimist": "0.0.8" + }, + "devDependencies": { + "tap": "1", + "mock-fs": "2 >=2.7.0" + }, + "bin": "bin/cmd.js", + "license": "MIT", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "mkdirp@0.5.1", + "_resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/readme.markdown b/public/node_modules/_mkdirp@0.5.1@mkdirp/readme.markdown new file mode 100644 index 000000000..3cc131538 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/readme.markdown @@ -0,0 +1,100 @@ +# mkdirp + +Like `mkdir -p`, but in node.js! + +[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) + +# example + +## pow.js + +```js +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); +``` + +Output + +``` +pow! +``` + +And now /tmp/foo/bar/baz exists, huzzah! + +# methods + +```js +var mkdirp = require('mkdirp'); +``` + +## mkdirp(dir, opts, cb) + +Create a new directory and any necessary subdirectories at `dir` with octal +permission string `opts.mode`. If `opts` is a non-object, it will be treated as +the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +`cb(err, made)` fires with the error or the first directory `made` +that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and +`opts.fs.stat(path, cb)`. + +## mkdirp.sync(dir, opts) + +Synchronously create a new directory and any necessary subdirectories at `dir` +with octal permission string `opts.mode`. If `opts` is a non-object, it will be +treated as the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +Returns the first directory that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and +`opts.fs.statSync(path)`. + +# usage + +This package also ships with a `mkdirp` command. + +``` +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + +``` + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install mkdirp +``` + +to get the library, or + +``` +npm install -g mkdirp +``` + +to get the command. + +# license + +MIT diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/chmod.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/chmod.js new file mode 100644 index 000000000..6a404b932 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/chmod.js @@ -0,0 +1,41 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); +var _0744 = parseInt('0744', 8); + +var ps = [ '', 'tmp' ]; + +for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); +} + +var file = ps.join('/'); + +test('chmod-pre', function (t) { + var mode = _0744 + mkdirp(file, mode, function (er) { + t.ifError(er, 'should not error'); + fs.stat(file, function (er, stat) { + t.ifError(er, 'should exist'); + t.ok(stat && stat.isDirectory(), 'should be directory'); + t.equal(stat && stat.mode & _0777, mode, 'should be 0744'); + t.end(); + }); + }); +}); + +test('chmod', function (t) { + var mode = _0755 + mkdirp(file, mode, function (er) { + t.ifError(er, 'should not error'); + fs.stat(file, function (er, stat) { + t.ifError(er, 'should exist'); + t.ok(stat && stat.isDirectory(), 'should be directory'); + t.end(); + }); + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/clobber.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/clobber.js new file mode 100644 index 000000000..2433b9ad5 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/clobber.js @@ -0,0 +1,38 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0755 = parseInt('0755', 8); + +var ps = [ '', 'tmp' ]; + +for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); +} + +var file = ps.join('/'); + +// a file in the way +var itw = ps.slice(0, 3).join('/'); + + +test('clobber-pre', function (t) { + console.error("about to write to "+itw) + fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); + + fs.stat(itw, function (er, stat) { + t.ifError(er) + t.ok(stat && stat.isFile(), 'should be file') + t.end() + }) +}) + +test('clobber', function (t) { + t.plan(2); + mkdirp(file, _0755, function (err) { + t.ok(err); + t.equal(err.code, 'ENOTDIR'); + t.end(); + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/mkdirp.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/mkdirp.js new file mode 100644 index 000000000..eaa8921c7 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/mkdirp.js @@ -0,0 +1,28 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('woo', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/opts_fs.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/opts_fs.js new file mode 100644 index 000000000..97186b62e --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/opts_fs.js @@ -0,0 +1,29 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('opts.fs', function (t) { + t.plan(5); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp(file, { fs: xfs, mode: _0755 }, function (err) { + t.ifError(err); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/opts_fs_sync.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/opts_fs_sync.js new file mode 100644 index 000000000..6c370aa6e --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/opts_fs_sync.js @@ -0,0 +1,27 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('opts.fs sync', function (t) { + t.plan(4); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp.sync(file, { fs: xfs, mode: _0755 }); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/perm.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/perm.js new file mode 100644 index 000000000..fbce44b82 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/perm.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('async perm', function (t) { + t.plan(5); + var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); + +test('async root perm', function (t) { + mkdirp('/tmp', _0755, function (err) { + if (err) t.fail(err); + t.end(); + }); + t.end(); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/perm_sync.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/perm_sync.js new file mode 100644 index 000000000..398229fe5 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/perm_sync.js @@ -0,0 +1,36 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('sync perm', function (t) { + t.plan(4); + var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; + + mkdirp.sync(file, _0755); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); + +test('sync root perm', function (t) { + t.plan(3); + + var file = '/tmp'; + mkdirp.sync(file, _0755); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/race.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/race.js new file mode 100644 index 000000000..b0b9e183c --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/race.js @@ -0,0 +1,37 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('race', function (t) { + t.plan(10); + var ps = [ '', 'tmp' ]; + + for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); + } + var file = ps.join('/'); + + var res = 2; + mk(file); + + mk(file); + + function mk (file, cb) { + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }) + }); + } +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/rel.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/rel.js new file mode 100644 index 000000000..4ddb34276 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/rel.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('rel', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var cwd = process.cwd(); + process.chdir('/tmp'); + + var file = [x,y,z].join('/'); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + process.chdir(cwd); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/return.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/return.js new file mode 100644 index 000000000..bce68e561 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/return.js @@ -0,0 +1,25 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; + +test('return value', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + // should return the first dir created. + // By this point, it would be profoundly surprising if /tmp didn't + // already exist, since every other test makes things in there. + mkdirp(file, function (err, made) { + t.ifError(err); + t.equal(made, '/tmp/' + x); + mkdirp(file, function (err, made) { + t.ifError(err); + t.equal(made, null); + }); + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/return_sync.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/return_sync.js new file mode 100644 index 000000000..7c222d355 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/return_sync.js @@ -0,0 +1,24 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; + +test('return value', function (t) { + t.plan(2); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + // should return the first dir created. + // By this point, it would be profoundly surprising if /tmp didn't + // already exist, since every other test makes things in there. + // Note that this will throw on failure, which will fail the test. + var made = mkdirp.sync(file); + t.equal(made, '/tmp/' + x); + + // making the same file again should have no effect. + made = mkdirp.sync(file); + t.equal(made, null); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/root.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/root.js new file mode 100644 index 000000000..9e7d079d9 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/root.js @@ -0,0 +1,19 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0755 = parseInt('0755', 8); + +test('root', function (t) { + // '/' on unix, 'c:/' on windows. + var file = path.resolve('/'); + + mkdirp(file, _0755, function (err) { + if (err) throw err + fs.stat(file, function (er, stat) { + if (er) throw er + t.ok(stat.isDirectory(), 'target is a directory'); + t.end(); + }) + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/sync.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/sync.js new file mode 100644 index 000000000..8c8dc938c --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/sync.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('sync', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + try { + mkdirp.sync(file, _0755); + } catch (err) { + t.fail(err); + return t.end(); + } + + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/umask.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/umask.js new file mode 100644 index 000000000..2033c63a4 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/umask.js @@ -0,0 +1,28 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('implicit mode from umask', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + mkdirp(file, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0777 & (~process.umask())); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }) + }); +}); diff --git a/public/node_modules/_mkdirp@0.5.1@mkdirp/test/umask_sync.js b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/umask_sync.js new file mode 100644 index 000000000..11a761474 --- /dev/null +++ b/public/node_modules/_mkdirp@0.5.1@mkdirp/test/umask_sync.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('umask sync modes', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + try { + mkdirp.sync(file); + } catch (err) { + t.fail(err); + return t.end(); + } + + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, (_0777 & (~process.umask()))); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/LICENSE b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/LICENSE new file mode 100644 index 000000000..83e7c4c62 --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2017, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/README.md b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/README.md new file mode 100644 index 000000000..0e6e9b9ea --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/README.md @@ -0,0 +1,53 @@ +# move-concurrently + +Move files and directories. + +``` +const move = require('move-concurrently') +move('/path/to/thing', '/new/path/thing').then(() => { + // thing is now moved! +}).catch(err => { + // oh no! +}) +``` + +Uses `rename` to move things as fast as possible. + +If you `move` across devices or on filesystems that don't support renaming +large directories. That is, situations that result in `rename` returning +the `EXDEV` error, then `move` will fallback to copy + delete. + +When recursively copying directories it will first try to rename the +contents before falling back to copying. While this will be slightly slower +in true cross-device scenarios, it is MUCH faster in cases where the +filesystem can't handle directory renames. + +When copying ownership is maintained when running as root. Permissions are +always maintained. On Windows, if symlinks are unavailable then junctions +will be used. + +## INTERFACE + +### move(from, to, options) → Promise + +Recursively moves `from` to `to` and resolves its promise when finished. +If `to` already exists then the promise will be rejected with an `EEXIST` +error. + +Starts by trying to rename `from` to `to`. + +Options are: + +* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +Options can also include dependency injection: + +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/move.js b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/move.js new file mode 100644 index 000000000..6a2a7332c --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/move.js @@ -0,0 +1,84 @@ +'use strict' +module.exports = move + +var nodeFs = require('fs') +var rimraf = require('rimraf') +var validate = require('aproba') +var copy = require('copy-concurrently') +var RunQueue = require('run-queue') +var extend = Object.assign || require('util')._extend + +function promisify (Promise, fn) { + return function () { + var args = [].slice.call(arguments) + return new Promise(function (resolve, reject) { + return fn.apply(null, args.concat(function (err, value) { + if (err) { + reject(err) + } else { + resolve(value) + } + })) + }) + } +} + +function move (from, to, opts) { + validate('SSO|SS', arguments) + opts = extend({}, opts || {}) + + var Promise = opts.Promise || global.Promise + var fs = opts.fs || nodeFs + var rimrafAsync = promisify(Promise, rimraf) + var renameAsync = promisify(Promise, fs.rename) + + opts.top = from + + var queue = new RunQueue({ + maxConcurrency: opts.maxConcurrency, + Promise: Promise + }) + opts.queue = queue + opts.recurseWith = rename + + queue.add(0, rename, [from, to, opts]) + + return queue.run().then(function () { + return remove(from) + }, function (err) { + // if the target already exists don't clobber it + if (err.code === 'EEXIST' || err.code === 'EPERM') { + return passThroughError() + } else { + return remove(to).then(passThroughError, passThroughError) + } + function passThroughError () { + return Promise.reject(err) + } + }) + + function remove (target) { + var opts = { + unlink: fs.unlink, + chmod: fs.chmod, + stat: fs.stat, + lstat: fs.lstat, + rmdir: fs.rmdir, + readdir: fs.readdir, + glob: false + } + return rimrafAsync(target, opts) + } + + function rename (from, to, opts, done) { + return renameAsync(from, to).catch(function (err) { + if (err.code !== 'EXDEV') { + return Promise.reject(err) + } else { + return remove(to).then(function () { + return copy.item(from, to, opts) + }) + } + }) + } +} diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/.bin/mkdirp b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/.bin/mkdirp new file mode 120000 index 000000000..e493ef63c --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../../../_mkdirp@0.5.1@mkdirp/bin/cmd.js \ No newline at end of file diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/.bin/rimraf b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/.bin/rimraf new file mode 120000 index 000000000..cc571a043 --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../../../_rimraf@2.7.1@rimraf/bin.js \ No newline at end of file diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/aproba b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/aproba new file mode 120000 index 000000000..0cd6a4c08 --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/aproba @@ -0,0 +1 @@ +../../_aproba@1.2.0@aproba \ No newline at end of file diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/copy-concurrently b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/copy-concurrently new file mode 120000 index 000000000..ea483a456 --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/copy-concurrently @@ -0,0 +1 @@ +../../_copy-concurrently@1.0.5@copy-concurrently \ No newline at end of file diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/fs-write-stream-atomic b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/fs-write-stream-atomic new file mode 120000 index 000000000..329ccab12 --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/fs-write-stream-atomic @@ -0,0 +1 @@ +../../_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic \ No newline at end of file diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/mkdirp b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/mkdirp new file mode 120000 index 000000000..4aa6ce401 --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/mkdirp @@ -0,0 +1 @@ +../../_mkdirp@0.5.1@mkdirp \ No newline at end of file diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/rimraf b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/rimraf new file mode 120000 index 000000000..62e1c056a --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/rimraf @@ -0,0 +1 @@ +../../_rimraf@2.7.1@rimraf \ No newline at end of file diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/run-queue b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/run-queue new file mode 120000 index 000000000..157ccd83b --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/node_modules/run-queue @@ -0,0 +1 @@ +../../_run-queue@1.0.3@run-queue \ No newline at end of file diff --git a/public/node_modules/_move-concurrently@1.0.1@move-concurrently/package.json b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/package.json new file mode 100644 index 000000000..1a47f5f4b --- /dev/null +++ b/public/node_modules/_move-concurrently@1.0.1@move-concurrently/package.json @@ -0,0 +1,45 @@ +{ + "name": "move-concurrently", + "version": "1.0.1", + "description": "Promises of moves of files or directories with rename, falling back to recursive rename/copy on EXDEV errors, with configurable concurrency and win32 junction support.", + "main": "move.js", + "scripts": { + "test": "standard && tap --coverage test" + }, + "keywords": [ + "move" + ], + "author": "Rebecca Turner (http://re-becca.org/)", + "license": "ISC", + "dependencies": { + "copy-concurrently": "^1.0.0", + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + }, + "devDependencies": { + "standard": "^8.6.0", + "tacks": "^1.2.6", + "tap": "^10.1.1" + }, + "files": [ + "move.js", + "is-windows.js" + ], + "directories": { + "test": "test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/move-concurrently.git" + }, + "bugs": { + "url": "https://github.com/npm/move-concurrently/issues" + }, + "homepage": "https://www.npmjs.com/package/move-concurrently", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "move-concurrently@1.0.1", + "_resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_once@1.4.0@once/LICENSE b/public/node_modules/_once@1.4.0@once/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_once@1.4.0@once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_once@1.4.0@once/README.md b/public/node_modules/_once@1.4.0@once/README.md new file mode 100644 index 000000000..1f1ffca93 --- /dev/null +++ b/public/node_modules/_once@1.4.0@once/README.md @@ -0,0 +1,79 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` + +## `once.strict(func)` + +Throw an error if the function is called twice. + +Some functions are expected to be called only once. Using `once` for them would +potentially hide logical errors. + +In the example below, the `greet` function has to call the callback only once: + +```javascript +function greet (name, cb) { + // return is missing from the if statement + // when no name is passed, the callback is called twice + if (!name) cb('Hello anonymous') + cb('Hello ' + name) +} + +function log (msg) { + console.log(msg) +} + +// this will print 'Hello anonymous' but the logical error will be missed +greet(null, once(msg)) + +// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time +greet(null, once.strict(msg)) +``` diff --git a/public/node_modules/_once@1.4.0@once/node_modules/wrappy b/public/node_modules/_once@1.4.0@once/node_modules/wrappy new file mode 120000 index 000000000..72e78997f --- /dev/null +++ b/public/node_modules/_once@1.4.0@once/node_modules/wrappy @@ -0,0 +1 @@ +../../_wrappy@1.0.2@wrappy \ No newline at end of file diff --git a/public/node_modules/_once@1.4.0@once/once.js b/public/node_modules/_once@1.4.0@once/once.js new file mode 100644 index 000000000..235406736 --- /dev/null +++ b/public/node_modules/_once@1.4.0@once/once.js @@ -0,0 +1,42 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} diff --git a/public/node_modules/_once@1.4.0@once/package.json b/public/node_modules/_once@1.4.0@once/package.json new file mode 100644 index 000000000..59a19053d --- /dev/null +++ b/public/node_modules/_once@1.4.0@once/package.json @@ -0,0 +1,36 @@ +{ + "name": "once", + "version": "1.4.0", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" + }, + "dependencies": { + "wrappy": "1" + }, + "devDependencies": { + "tap": "^7.0.1" + }, + "scripts": { + "test": "tap test/*.js" + }, + "files": [ + "once.js" + ], + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once" + }, + "keywords": [ + "once", + "function", + "one", + "single" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "once@1.4.0", + "_resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_p-limit@2.2.2@p-limit/index.d.ts b/public/node_modules/_p-limit@2.2.2@p-limit/index.d.ts new file mode 100644 index 000000000..22094f113 --- /dev/null +++ b/public/node_modules/_p-limit@2.2.2@p-limit/index.d.ts @@ -0,0 +1,29 @@ +export interface Limit { + /** + @param fn - Promise-returning/async function. + @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions. + @returns The promise returned by calling `fn(...arguments)`. + */ + ( + fn: (...arguments: Arguments) => PromiseLike | ReturnType, + ...arguments: Arguments + ): Promise; + + /** + The number of promises that are currently running. + */ + readonly activeCount: number; + + /** + The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + */ + readonly pendingCount: number; +} + +/** +Run multiple promise-returning & async functions with limited concurrency. + +@param concurrency - Concurrency limit. Minimum: `1`. +@returns A `limit` function. +*/ +export default function pLimit(concurrency: number): Limit; diff --git a/public/node_modules/_p-limit@2.2.2@p-limit/index.js b/public/node_modules/_p-limit@2.2.2@p-limit/index.js new file mode 100644 index 000000000..e8ed40596 --- /dev/null +++ b/public/node_modules/_p-limit@2.2.2@p-limit/index.js @@ -0,0 +1,52 @@ +'use strict'; +const pTry = require('p-try'); + +const pLimit = concurrency => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up')); + } + + const queue = []; + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.length > 0) { + queue.shift()(); + } + }; + + const run = (fn, resolve, ...args) => { + activeCount++; + + const result = pTry(fn, ...args); + + resolve(result); + + result.then(next, next); + }; + + const enqueue = (fn, resolve, ...args) => { + if (activeCount < concurrency) { + run(fn, resolve, ...args); + } else { + queue.push(run.bind(null, fn, resolve, ...args)); + } + }; + + const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + } + }); + + return generator; +}; + +module.exports = pLimit; +module.exports.default = pLimit; diff --git a/public/node_modules/_p-limit@2.2.2@p-limit/license b/public/node_modules/_p-limit@2.2.2@p-limit/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_p-limit@2.2.2@p-limit/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_p-limit@2.2.2@p-limit/node_modules/p-try b/public/node_modules/_p-limit@2.2.2@p-limit/node_modules/p-try new file mode 120000 index 000000000..3fc3a3abe --- /dev/null +++ b/public/node_modules/_p-limit@2.2.2@p-limit/node_modules/p-try @@ -0,0 +1 @@ +../../_p-try@2.2.0@p-try \ No newline at end of file diff --git a/public/node_modules/_p-limit@2.2.2@p-limit/package.json b/public/node_modules/_p-limit@2.2.2@p-limit/package.json new file mode 100644 index 000000000..5449f23da --- /dev/null +++ b/public/node_modules/_p-limit@2.2.2@p-limit/package.json @@ -0,0 +1,55 @@ +{ + "name": "p-limit", + "version": "2.2.2", + "description": "Run multiple promise-returning & async functions with limited concurrency", + "license": "MIT", + "repository": "sindresorhus/p-limit", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "limit", + "limited", + "concurrency", + "throttle", + "throat", + "rate", + "batch", + "ratelimit", + "task", + "queue", + "async", + "await", + "promises", + "bluebird" + ], + "dependencies": { + "p-try": "^2.0.0" + }, + "devDependencies": { + "ava": "^1.2.1", + "delay": "^4.1.0", + "in-range": "^1.0.0", + "random-int": "^1.0.0", + "time-span": "^2.0.0", + "tsd-check": "^0.3.0", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "p-limit@2.2.2", + "_resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.2.2.tgz?cache=0&sync_timestamp=1577904218145&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.2.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_p-limit@2.2.2@p-limit/readme.md b/public/node_modules/_p-limit@2.2.2@p-limit/readme.md new file mode 100644 index 000000000..35b52d5ab --- /dev/null +++ b/public/node_modules/_p-limit@2.2.2@p-limit/readme.md @@ -0,0 +1,93 @@ +# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) + +> Run multiple promise-returning & async functions with limited concurrency + +## Install + +``` +$ npm install p-limit +``` + +## Usage + +```js +const pLimit = require('p-limit'); + +const limit = pLimit(1); + +const input = [ + limit(() => fetchSomething('foo')), + limit(() => fetchSomething('bar')), + limit(() => doSomething()) +]; + +(async () => { + // Only one promise is run at once + const result = await Promise.all(input); + console.log(result); +})(); +``` + +## API + +### pLimit(concurrency) + +Returns a `limit` function. + +#### concurrency + +Type: `number`\ +Minimum: `1`\ +Default: `Infinity` + +Concurrency limit. + +### limit(fn, ...args) + +Returns the promise returned by calling `fn(...args)`. + +#### fn + +Type: `Function` + +Promise-returning/async function. + +#### args + +Any arguments to pass through to `fn`. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +### limit.activeCount + +The number of promises that are currently running. + +### limit.pendingCount + +The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + +## FAQ + +### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package? + +This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause the queue. + +## Related + +- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control +- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions +- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions +- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency +- [More…](https://github.com/sindresorhus/promise-fun) + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/public/node_modules/_p-locate@4.1.0@p-locate/index.d.ts b/public/node_modules/_p-locate@4.1.0@p-locate/index.d.ts new file mode 100644 index 000000000..14115e16b --- /dev/null +++ b/public/node_modules/_p-locate@4.1.0@p-locate/index.d.ts @@ -0,0 +1,64 @@ +declare namespace pLocate { + interface Options { + /** + Number of concurrently pending promises returned by `tester`. Minimum: `1`. + + @default Infinity + */ + readonly concurrency?: number; + + /** + Preserve `input` order when searching. + + Disable this to improve performance if you don't care about the order. + + @default true + */ + readonly preserveOrder?: boolean; + } +} + +declare const pLocate: { + /** + Get the first fulfilled promise that satisfies the provided testing function. + + @param input - An iterable of promises/values to test. + @param tester - This function will receive resolved values from `input` and is expected to return a `Promise` or `boolean`. + @returns A `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + + @example + ``` + import pathExists = require('path-exists'); + import pLocate = require('p-locate'); + + const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' + ]; + + (async () => { + const foundPath = await pLocate(files, file => pathExists(file)); + + console.log(foundPath); + //=> 'rainbow' + })(); + ``` + */ + ( + input: Iterable | ValueType>, + tester: (element: ValueType) => PromiseLike | boolean, + options?: pLocate.Options + ): Promise; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function pLocate( + // input: Iterable | ValueType>, + // tester: (element: ValueType) => PromiseLike | boolean, + // options?: pLocate.Options + // ): Promise; + // export = pLocate; + default: typeof pLocate; +}; + +export = pLocate; diff --git a/public/node_modules/_p-locate@4.1.0@p-locate/index.js b/public/node_modules/_p-locate@4.1.0@p-locate/index.js new file mode 100644 index 000000000..e13ce1531 --- /dev/null +++ b/public/node_modules/_p-locate@4.1.0@p-locate/index.js @@ -0,0 +1,52 @@ +'use strict'; +const pLimit = require('p-limit'); + +class EndError extends Error { + constructor(value) { + super(); + this.value = value; + } +} + +// The input can also be a promise, so we await it +const testElement = async (element, tester) => tester(await element); + +// The input can also be a promise, so we `Promise.all()` them both +const finder = async element => { + const values = await Promise.all(element); + if (values[1] === true) { + throw new EndError(values[0]); + } + + return false; +}; + +const pLocate = async (iterable, tester, options) => { + options = { + concurrency: Infinity, + preserveOrder: true, + ...options + }; + + const limit = pLimit(options.concurrency); + + // Start all the promises concurrently with optional limit + const items = [...iterable].map(element => [element, limit(testElement, element, tester)]); + + // Check the promises either serially or concurrently + const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); + + try { + await Promise.all(items.map(element => checkLimit(finder, element))); + } catch (error) { + if (error instanceof EndError) { + return error.value; + } + + throw error; + } +}; + +module.exports = pLocate; +// TODO: Remove this for the next major release +module.exports.default = pLocate; diff --git a/public/node_modules/_p-locate@4.1.0@p-locate/license b/public/node_modules/_p-locate@4.1.0@p-locate/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_p-locate@4.1.0@p-locate/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_p-locate@4.1.0@p-locate/node_modules/p-limit b/public/node_modules/_p-locate@4.1.0@p-locate/node_modules/p-limit new file mode 120000 index 000000000..65a1eda22 --- /dev/null +++ b/public/node_modules/_p-locate@4.1.0@p-locate/node_modules/p-limit @@ -0,0 +1 @@ +../../_p-limit@2.2.2@p-limit \ No newline at end of file diff --git a/public/node_modules/_p-locate@4.1.0@p-locate/package.json b/public/node_modules/_p-locate@4.1.0@p-locate/package.json new file mode 100644 index 000000000..2a21ea349 --- /dev/null +++ b/public/node_modules/_p-locate@4.1.0@p-locate/package.json @@ -0,0 +1,56 @@ +{ + "name": "p-locate", + "version": "4.1.0", + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "license": "MIT", + "repository": "sindresorhus/p-locate", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "locate", + "find", + "finder", + "search", + "searcher", + "test", + "array", + "collection", + "iterable", + "iterator", + "race", + "fulfilled", + "fastest", + "async", + "await", + "promises", + "bluebird" + ], + "dependencies": { + "p-limit": "^2.2.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "delay": "^4.1.0", + "in-range": "^1.0.0", + "time-span": "^3.0.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "p-locate@4.1.0", + "_resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_p-locate@4.1.0@p-locate/readme.md b/public/node_modules/_p-locate@4.1.0@p-locate/readme.md new file mode 100644 index 000000000..f8e2c2eaf --- /dev/null +++ b/public/node_modules/_p-locate@4.1.0@p-locate/readme.md @@ -0,0 +1,90 @@ +# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) + +> Get the first fulfilled promise that satisfies the provided testing function + +Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). + + +## Install + +``` +$ npm install p-locate +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + const foundPath = await pLocate(files, file => pathExists(file)); + + console.log(foundPath); + //=> 'rainbow' +})(); +``` + +*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* + + +## API + +### pLocate(input, tester, [options]) + +Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + +#### input + +Type: `Iterable` + +An iterable of promises/values to test. + +#### tester(element) + +Type: `Function` + +This function will receive resolved values from `input` and is expected to return a `Promise` or `boolean`. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises returned by `tester`. + +##### preserveOrder + +Type: `boolean`
+Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + + +## Related + +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently +- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_p-map@3.0.0@p-map/index.d.ts b/public/node_modules/_p-map@3.0.0@p-map/index.d.ts new file mode 100644 index 000000000..8f796295d --- /dev/null +++ b/public/node_modules/_p-map@3.0.0@p-map/index.d.ts @@ -0,0 +1,65 @@ +declare namespace pMap { + interface Options { + /** + Number of concurrently pending promises returned by `mapper`. + + @default Infinity + */ + readonly concurrency?: number; + + /** + When set to `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises. + + @default true + */ + readonly stopOnError?: boolean; + } + + /** + Function which is called for every item in `input`. Expected to return a `Promise` or value. + + @param element - Iterated element. + @param index - Index of the element in the source array. + */ + type Mapper = ( + element: Element, + index: number + ) => NewElement | Promise; +} + +/** +@param input - Iterated over concurrently in the `mapper` function. +@param mapper - Function which is called for every item in `input`. Expected to return a `Promise` or value. +@returns A `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order. + +@example +``` +import pMap = require('p-map'); +import got = require('got'); + +const sites = [ + getWebsiteFromUsername('https://sindresorhus'), //=> Promise + 'https://ava.li', + 'https://github.com' +]; + +(async () => { + const mapper = async site => { + const {requestUrl} = await got.head(site); + return requestUrl; + }; + + const result = await pMap(sites, mapper, {concurrency: 2}); + + console.log(result); + //=> ['https://sindresorhus.com/', 'https://ava.li/', 'https://github.com/'] +})(); +``` +*/ +declare function pMap( + input: Iterable, + mapper: pMap.Mapper, + options?: pMap.Options +): Promise; + +export = pMap; diff --git a/public/node_modules/_p-map@3.0.0@p-map/index.js b/public/node_modules/_p-map@3.0.0@p-map/index.js new file mode 100644 index 000000000..5a8aeb256 --- /dev/null +++ b/public/node_modules/_p-map@3.0.0@p-map/index.js @@ -0,0 +1,81 @@ +'use strict'; +const AggregateError = require('aggregate-error'); + +module.exports = async ( + iterable, + mapper, + { + concurrency = Infinity, + stopOnError = true + } = {} +) => { + return new Promise((resolve, reject) => { + if (typeof mapper !== 'function') { + throw new TypeError('Mapper function is required'); + } + + if (!(typeof concurrency === 'number' && concurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`); + } + + const ret = []; + const errors = []; + const iterator = iterable[Symbol.iterator](); + let isRejected = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + + const next = () => { + if (isRejected) { + return; + } + + const nextItem = iterator.next(); + const i = currentIndex; + currentIndex++; + + if (nextItem.done) { + isIterableDone = true; + + if (resolvingCount === 0) { + if (!stopOnError && errors.length !== 0) { + reject(new AggregateError(errors)); + } else { + resolve(ret); + } + } + + return; + } + + resolvingCount++; + + (async () => { + try { + const element = await nextItem.value; + ret[i] = await mapper(element, i); + resolvingCount--; + next(); + } catch (error) { + if (stopOnError) { + isRejected = true; + reject(error); + } else { + errors.push(error); + resolvingCount--; + next(); + } + } + })(); + }; + + for (let i = 0; i < concurrency; i++) { + next(); + + if (isIterableDone) { + break; + } + } + }); +}; diff --git a/public/node_modules/_p-map@3.0.0@p-map/license b/public/node_modules/_p-map@3.0.0@p-map/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_p-map@3.0.0@p-map/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_p-map@3.0.0@p-map/node_modules/aggregate-error b/public/node_modules/_p-map@3.0.0@p-map/node_modules/aggregate-error new file mode 120000 index 000000000..fb0a63aaf --- /dev/null +++ b/public/node_modules/_p-map@3.0.0@p-map/node_modules/aggregate-error @@ -0,0 +1 @@ +../../_aggregate-error@3.0.1@aggregate-error \ No newline at end of file diff --git a/public/node_modules/_p-map@3.0.0@p-map/package.json b/public/node_modules/_p-map@3.0.0@p-map/package.json new file mode 100644 index 000000000..b190ccdc5 --- /dev/null +++ b/public/node_modules/_p-map@3.0.0@p-map/package.json @@ -0,0 +1,55 @@ +{ + "name": "p-map", + "version": "3.0.0", + "description": "Map over promises concurrently", + "license": "MIT", + "repository": "sindresorhus/p-map", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "map", + "resolved", + "wait", + "collection", + "iterable", + "iterator", + "race", + "fulfilled", + "async", + "await", + "promises", + "concurrently", + "concurrency", + "parallel", + "bluebird" + ], + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "devDependencies": { + "ava": "^2.2.0", + "delay": "^4.1.0", + "in-range": "^2.0.0", + "random-int": "^2.0.0", + "time-span": "^3.1.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "p-map@3.0.0", + "_resolved": "https://registry.npm.taobao.org/p-map/download/p-map-3.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_p-map@3.0.0@p-map/readme.md b/public/node_modules/_p-map@3.0.0@p-map/readme.md new file mode 100644 index 000000000..4941cb773 --- /dev/null +++ b/public/node_modules/_p-map@3.0.0@p-map/readme.md @@ -0,0 +1,99 @@ +# p-map [![Build Status](https://travis-ci.org/sindresorhus/p-map.svg?branch=master)](https://travis-ci.org/sindresorhus/p-map) + +> Map over promises concurrently + +Useful when you need to run promise-returning & async functions multiple times with different inputs concurrently. + + +## Install + +``` +$ npm install p-map +``` + + +## Usage + +```js +const pMap = require('p-map'); +const got = require('got'); + +const sites = [ + getWebsiteFromUsername('https://sindresorhus'), //=> Promise + 'https://ava.li', + 'https://github.com' +]; + +(async () => { + const mapper = async site => { + const {requestUrl} = await got.head(site); + return requestUrl; + }; + + const result = await pMap(sites, mapper, {concurrency: 2}); + + console.log(result); + //=> ['https://sindresorhus.com/', 'https://ava.li/', 'https://github.com/'] +})(); +``` + +## API + +### pMap(input, mapper, options?) + +Returns a `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order. + +#### input + +Type: `Iterable` + +Iterated over concurrently in the `mapper` function. + +#### mapper(element, index) + +Type: `Function` + +Expected to return a `Promise` or value. + +#### options + +Type: `object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises returned by `mapper`. + +##### stopOnError + +Type: `boolean`
+Default: `true` + +When set to `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises. + + +## Related + +- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency +- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently +- [p-times](https://github.com/sindresorhus/p-times) - Run promise-returning & async functions a specific number of times concurrently +- [p-props](https://github.com/sindresorhus/p-props) - Like `Promise.all()` but for `Map` and `Object` +- [p-map-series](https://github.com/sindresorhus/p-map-series) - Map over promises serially +- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control +- [More…](https://github.com/sindresorhus/promise-fun) + + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/public/node_modules/_p-try@2.2.0@p-try/index.d.ts b/public/node_modules/_p-try@2.2.0@p-try/index.d.ts new file mode 100644 index 000000000..2a7319ec2 --- /dev/null +++ b/public/node_modules/_p-try@2.2.0@p-try/index.d.ts @@ -0,0 +1,39 @@ +declare const pTry: { + /** + Start a promise chain. + + @param fn - The function to run to start the promise chain. + @param arguments - Arguments to pass to `fn`. + @returns The value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + + @example + ``` + import pTry = require('p-try'); + + (async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } + })(); + ``` + */ + ( + fn: (...arguments: ArgumentsType) => PromiseLike | ValueType, + ...arguments: ArgumentsType + ): Promise; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function pTry( + // fn: (...arguments: ArgumentsType) => PromiseLike | ValueType, + // ...arguments: ArgumentsType + // ): Promise; + // export = pTry; + default: typeof pTry; +}; + +export = pTry; diff --git a/public/node_modules/_p-try@2.2.0@p-try/index.js b/public/node_modules/_p-try@2.2.0@p-try/index.js new file mode 100644 index 000000000..db858da29 --- /dev/null +++ b/public/node_modules/_p-try@2.2.0@p-try/index.js @@ -0,0 +1,9 @@ +'use strict'; + +const pTry = (fn, ...arguments_) => new Promise(resolve => { + resolve(fn(...arguments_)); +}); + +module.exports = pTry; +// TODO: remove this in the next major version +module.exports.default = pTry; diff --git a/public/node_modules/_p-try@2.2.0@p-try/license b/public/node_modules/_p-try@2.2.0@p-try/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_p-try@2.2.0@p-try/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_p-try@2.2.0@p-try/package.json b/public/node_modules/_p-try@2.2.0@p-try/package.json new file mode 100644 index 000000000..412773337 --- /dev/null +++ b/public/node_modules/_p-try@2.2.0@p-try/package.json @@ -0,0 +1,45 @@ +{ + "name": "p-try", + "version": "2.2.0", + "description": "`Start a promise chain", + "license": "MIT", + "repository": "sindresorhus/p-try", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "try", + "resolve", + "function", + "catch", + "async", + "await", + "promises", + "settled", + "ponyfill", + "polyfill", + "shim", + "bluebird" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "p-try@2.2.0", + "_resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_p-try@2.2.0@p-try/readme.md b/public/node_modules/_p-try@2.2.0@p-try/readme.md new file mode 100644 index 000000000..4d7bd64df --- /dev/null +++ b/public/node_modules/_p-try@2.2.0@p-try/readme.md @@ -0,0 +1,58 @@ +# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) + +> Start a promise chain + +[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) + + +## Install + +``` +$ npm install p-try +``` + + +## Usage + +```js +const pTry = require('p-try'); + +(async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } +})(); +``` + + +## API + +### pTry(fn, ...arguments) + +Returns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +#### fn + +The function to run to start the promise chain. + +#### arguments + +Arguments to pass to `fn`. + + +## Related + +- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_path-exists@4.0.0@path-exists/index.d.ts b/public/node_modules/_path-exists@4.0.0@path-exists/index.d.ts new file mode 100644 index 000000000..54b7ab8f4 --- /dev/null +++ b/public/node_modules/_path-exists@4.0.0@path-exists/index.d.ts @@ -0,0 +1,28 @@ +declare const pathExists: { + /** + Check if a path exists. + + @returns Whether the path exists. + + @example + ``` + // foo.ts + import pathExists = require('path-exists'); + + (async () => { + console.log(await pathExists('foo.ts')); + //=> true + })(); + ``` + */ + (path: string): Promise; + + /** + Synchronously check if a path exists. + + @returns Whether the path exists. + */ + sync(path: string): boolean; +}; + +export = pathExists; diff --git a/public/node_modules/_path-exists@4.0.0@path-exists/index.js b/public/node_modules/_path-exists@4.0.0@path-exists/index.js new file mode 100644 index 000000000..1943921b7 --- /dev/null +++ b/public/node_modules/_path-exists@4.0.0@path-exists/index.js @@ -0,0 +1,23 @@ +'use strict'; +const fs = require('fs'); +const {promisify} = require('util'); + +const pAccess = promisify(fs.access); + +module.exports = async path => { + try { + await pAccess(path); + return true; + } catch (_) { + return false; + } +}; + +module.exports.sync = path => { + try { + fs.accessSync(path); + return true; + } catch (_) { + return false; + } +}; diff --git a/public/node_modules/_path-exists@4.0.0@path-exists/license b/public/node_modules/_path-exists@4.0.0@path-exists/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_path-exists@4.0.0@path-exists/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_path-exists@4.0.0@path-exists/package.json b/public/node_modules/_path-exists@4.0.0@path-exists/package.json new file mode 100644 index 000000000..f11db880d --- /dev/null +++ b/public/node_modules/_path-exists@4.0.0@path-exists/package.json @@ -0,0 +1,42 @@ +{ + "name": "path-exists", + "version": "4.0.0", + "description": "Check if a path exists", + "license": "MIT", + "repository": "sindresorhus/path-exists", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "path", + "exists", + "exist", + "file", + "filepath", + "fs", + "filesystem", + "file-system", + "access", + "stat" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "path-exists@4.0.0", + "_resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_path-exists@4.0.0@path-exists/readme.md b/public/node_modules/_path-exists@4.0.0@path-exists/readme.md new file mode 100644 index 000000000..81f984545 --- /dev/null +++ b/public/node_modules/_path-exists@4.0.0@path-exists/readme.md @@ -0,0 +1,52 @@ +# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists) + +> Check if a path exists + +NOTE: `fs.existsSync` has been un-deprecated in Node.js since 6.8.0. If you only need to check synchronously, this module is not needed. + +While [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it. + +Never use this before handling a file though: + +> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there. + + +## Install + +``` +$ npm install path-exists +``` + + +## Usage + +```js +// foo.js +const pathExists = require('path-exists'); + +(async () => { + console.log(await pathExists('foo.js')); + //=> true +})(); +``` + + +## API + +### pathExists(path) + +Returns a `Promise` of whether the path exists. + +### pathExists.sync(path) + +Returns a `boolean` of whether the path exists. + + +## Related + +- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/index.js b/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/index.js new file mode 100644 index 000000000..22aa6c356 --- /dev/null +++ b/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/license b/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (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/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/package.json b/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/package.json new file mode 100644 index 000000000..8932520e4 --- /dev/null +++ b/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/package.json @@ -0,0 +1,46 @@ +{ + "name": "path-is-absolute", + "version": "1.0.1", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": "sindresorhus/path-is-absolute", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "devDependencies": { + "xo": "^0.16.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "path-is-absolute@1.0.1", + "_resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/readme.md b/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/readme.md new file mode 100644 index 000000000..8dbdf5fcb --- /dev/null +++ b/public/node_modules/_path-is-absolute@1.0.1@path-is-absolute/readme.md @@ -0,0 +1,59 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +const pathIsAbsolute = require('path-is-absolute'); + +// Running on Linux +pathIsAbsolute('/home/foo'); +//=> true +pathIsAbsolute('C:/Users/foo'); +//=> false + +// Running on Windows +pathIsAbsolute('C:/Users/foo'); +//=> true +pathIsAbsolute('/home/foo'); +//=> false + +// Running on any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +pathIsAbsolute.posix('C:/Users/foo'); +//=> false +pathIsAbsolute.win32('C:/Users/foo'); +//=> true +pathIsAbsolute.win32('/home/foo'); +//=> false +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +POSIX specific version. + +### pathIsAbsolute.win32(path) + +Windows specific version. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_pkg-dir@4.2.0@pkg-dir/index.d.ts b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/index.d.ts new file mode 100644 index 000000000..e339404e5 --- /dev/null +++ b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/index.d.ts @@ -0,0 +1,44 @@ +declare const pkgDir: { + /** + Find the root directory of a Node.js project or npm package. + + @param cwd - Directory to start from. Default: `process.cwd()`. + @returns The project root path or `undefined` if it couldn't be found. + + @example + ``` + // / + // └── Users + // └── sindresorhus + // └── foo + // ├── package.json + // └── bar + // ├── baz + // └── example.js + + // example.js + import pkgDir = require('pkg-dir'); + + (async () => { + const rootDir = await pkgDir(__dirname); + + console.log(rootDir); + //=> '/Users/sindresorhus/foo' + })(); + ``` + */ + (cwd?: string): Promise; + + /** + Synchronously find the root directory of a Node.js project or npm package. + + @param cwd - Directory to start from. Default: `process.cwd()`. + @returns The project root path or `undefined` if it couldn't be found. + */ + sync(cwd?: string): string | undefined; + + // TODO: Remove this for the next major release + default: typeof pkgDir; +}; + +export = pkgDir; diff --git a/public/node_modules/_pkg-dir@4.2.0@pkg-dir/index.js b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/index.js new file mode 100644 index 000000000..83e683d82 --- /dev/null +++ b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/index.js @@ -0,0 +1,17 @@ +'use strict'; +const path = require('path'); +const findUp = require('find-up'); + +const pkgDir = async cwd => { + const filePath = await findUp('package.json', {cwd}); + return filePath && path.dirname(filePath); +}; + +module.exports = pkgDir; +// TODO: Remove this for the next major release +module.exports.default = pkgDir; + +module.exports.sync = cwd => { + const filePath = findUp.sync('package.json', {cwd}); + return filePath && path.dirname(filePath); +}; diff --git a/public/node_modules/_pkg-dir@4.2.0@pkg-dir/license b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/public/node_modules/_pkg-dir@4.2.0@pkg-dir/node_modules/find-up b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/node_modules/find-up new file mode 120000 index 000000000..9ea9b32e6 --- /dev/null +++ b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/node_modules/find-up @@ -0,0 +1 @@ +../../_find-up@4.1.0@find-up \ No newline at end of file diff --git a/public/node_modules/_pkg-dir@4.2.0@pkg-dir/package.json b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/package.json new file mode 100644 index 000000000..f6ceec86a --- /dev/null +++ b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/package.json @@ -0,0 +1,59 @@ +{ + "name": "pkg-dir", + "version": "4.2.0", + "description": "Find the root directory of a Node.js project or npm package", + "license": "MIT", + "repository": "sindresorhus/pkg-dir", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "package", + "json", + "root", + "npm", + "entry", + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "resolve", + "parent", + "parents", + "folder", + "directory", + "dir", + "walk", + "walking", + "path" + ], + "dependencies": { + "find-up": "^4.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "tempy": "^0.3.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:09 GMT+0800 (GMT+08:00)", + "_from": "pkg-dir@4.2.0", + "_resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_pkg-dir@4.2.0@pkg-dir/readme.md b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/readme.md new file mode 100644 index 000000000..92a77f45f --- /dev/null +++ b/public/node_modules/_pkg-dir@4.2.0@pkg-dir/readme.md @@ -0,0 +1,66 @@ +# pkg-dir [![Build Status](https://travis-ci.org/sindresorhus/pkg-dir.svg?branch=master)](https://travis-ci.org/sindresorhus/pkg-dir) + +> Find the root directory of a Node.js project or npm package + + +## Install + +``` +$ npm install pkg-dir +``` + + +## Usage + +``` +/ +└── Users + └── sindresorhus + └── foo + ├── package.json + └── bar + ├── baz + └── example.js +``` + +```js +// example.js +const pkgDir = require('pkg-dir'); + +(async () => { + const rootDir = await pkgDir(__dirname); + + console.log(rootDir); + //=> '/Users/sindresorhus/foo' +})(); +``` + + +## API + +### pkgDir([cwd]) + +Returns a `Promise` for either the project root path or `undefined` if it couldn't be found. + +### pkgDir.sync([cwd]) + +Returns the project root path or `undefined` if it couldn't be found. + +#### cwd + +Type: `string`
+Default: `process.cwd()` + +Directory to start from. + + +## Related + +- [pkg-dir-cli](https://github.com/sindresorhus/pkg-dir-cli) - CLI for this module +- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file +- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/index.js b/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/index.js new file mode 100644 index 000000000..3eecf1148 --- /dev/null +++ b/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/index.js @@ -0,0 +1,45 @@ +'use strict'; + +if (typeof process === 'undefined' || + !process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + diff --git a/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/license.md b/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/license.md new file mode 100644 index 000000000..c67e3532b --- /dev/null +++ b/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/license.md @@ -0,0 +1,19 @@ +# Copyright (c) 2015 Calvin Metcalf + +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/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/package.json b/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/package.json new file mode 100644 index 000000000..1cd3c4a91 --- /dev/null +++ b/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/package.json @@ -0,0 +1,28 @@ +{ + "name": "process-nextick-args", + "version": "2.0.1", + "description": "process.nextTick but always with args", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/calvinmetcalf/process-nextick-args.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" + }, + "homepage": "https://github.com/calvinmetcalf/process-nextick-args", + "devDependencies": { + "tap": "~0.2.6" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "process-nextick-args@2.0.1", + "_resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/readme.md b/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/readme.md new file mode 100644 index 000000000..ecb432c9b --- /dev/null +++ b/public/node_modules/_process-nextick-args@2.0.1@process-nextick-args/readme.md @@ -0,0 +1,18 @@ +process-nextick-args +===== + +[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) + +```bash +npm install --save process-nextick-args +``` + +Always be able to pass arguments to process.nextTick, no matter the platform + +```js +var pna = require('process-nextick-args'); + +pna.nextTick(function (a, b, c) { + console.log(a, b, c); +}, 'step', 3, 'profit'); +``` diff --git a/public/node_modules/_promise-inflight@1.0.1@promise-inflight/LICENSE b/public/node_modules/_promise-inflight@1.0.1@promise-inflight/LICENSE new file mode 100644 index 000000000..83e7c4c62 --- /dev/null +++ b/public/node_modules/_promise-inflight@1.0.1@promise-inflight/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2017, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/public/node_modules/_promise-inflight@1.0.1@promise-inflight/README.md b/public/node_modules/_promise-inflight@1.0.1@promise-inflight/README.md new file mode 100644 index 000000000..f0ae3a444 --- /dev/null +++ b/public/node_modules/_promise-inflight@1.0.1@promise-inflight/README.md @@ -0,0 +1,34 @@ +# promise-inflight + +One promise for multiple requests in flight to avoid async duplication + +## USAGE + +```javascript +const inflight = require('promise-inflight') + +// some request that does some stuff +function req(key) { + // key is any random string. like a url or filename or whatever. + return inflight(key, () => { + // this is where you'd fetch the url or whatever + return Promise.delay(100) + }) +} + +// only assigns a single setTimeout +// when it dings, all thens get called with the same result. (There's only +// one underlying promise.) +req('foo').then(…) +req('foo').then(…) +req('foo').then(…) +req('foo').then(…) +``` + +## SEE ALSO + +* [inflight](https://npmjs.com/package/inflight) - For the callback based function on which this is based. + +## STILL NEEDS + +Tests! diff --git a/public/node_modules/_promise-inflight@1.0.1@promise-inflight/inflight.js b/public/node_modules/_promise-inflight@1.0.1@promise-inflight/inflight.js new file mode 100644 index 000000000..ce054d34b --- /dev/null +++ b/public/node_modules/_promise-inflight@1.0.1@promise-inflight/inflight.js @@ -0,0 +1,36 @@ +'use strict' +module.exports = inflight + +let Bluebird +try { + Bluebird = require('bluebird') +} catch (_) { + Bluebird = Promise +} + +const active = {} +inflight.active = active +function inflight (unique, doFly) { + return Bluebird.all([unique, doFly]).then(function (args) { + const unique = args[0] + const doFly = args[1] + if (Array.isArray(unique)) { + return Bluebird.all(unique).then(function (uniqueArr) { + return _inflight(uniqueArr.join(''), doFly) + }) + } else { + return _inflight(unique, doFly) + } + }) + + function _inflight (unique, doFly) { + if (!active[unique]) { + active[unique] = (new Bluebird(function (resolve) { + return resolve(doFly()) + })) + active[unique].then(cleanup, cleanup) + function cleanup() { delete active[unique] } + } + return active[unique] + } +} diff --git a/public/node_modules/_promise-inflight@1.0.1@promise-inflight/package.json b/public/node_modules/_promise-inflight@1.0.1@promise-inflight/package.json new file mode 100644 index 000000000..adae3c03d --- /dev/null +++ b/public/node_modules/_promise-inflight@1.0.1@promise-inflight/package.json @@ -0,0 +1,27 @@ +{ + "name": "promise-inflight", + "version": "1.0.1", + "description": "One promise for multiple requests in flight to avoid async duplication", + "main": "inflight.js", + "files": [ + "inflight.js" + ], + "license": "ISC", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "Rebecca Turner (http://re-becca.org/)", + "devDependencies": {}, + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/promise-inflight.git" + }, + "bugs": { + "url": "https://github.com/iarna/promise-inflight/issues" + }, + "homepage": "https://github.com/iarna/promise-inflight#readme", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "promise-inflight@1.0.1", + "_resolved": "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_punycode@2.1.1@punycode/LICENSE-MIT.txt b/public/node_modules/_punycode@2.1.1@punycode/LICENSE-MIT.txt new file mode 100644 index 000000000..a41e0a7ef --- /dev/null +++ b/public/node_modules/_punycode@2.1.1@punycode/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +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/public/node_modules/_punycode@2.1.1@punycode/README.md b/public/node_modules/_punycode@2.1.1@punycode/README.md new file mode 100644 index 000000000..ee2f9d633 --- /dev/null +++ b/public/node_modules/_punycode@2.1.1@punycode/README.md @@ -0,0 +1,122 @@ +# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/codecov/c/github/bestiejs/punycode.js.svg)](https://codecov.io/gh/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js) + +Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891). + +This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: + +* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) +* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) +* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) +* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) +* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) + +This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated). + +The current version supports recent versions of Node.js only. It provides a CommonJS module and an ES6 module. For the old version that offers the same functionality with broader support, including Rhino, Ringo, Narwhal, and web browsers, see [v1.4.1](https://github.com/bestiejs/punycode.js/releases/tag/v1.4.1). + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install punycode --save +``` + +In [Node.js](https://nodejs.org/): + +```js +const punycode = require('punycode'); +``` + +## API + +### `punycode.decode(string)` + +Converts a Punycode string of ASCII symbols to a string of Unicode symbols. + +```js +// decode domain name parts +punycode.decode('maana-pta'); // 'mañana' +punycode.decode('--dqo34k'); // '☃-⌘' +``` + +### `punycode.encode(string)` + +Converts a string of Unicode symbols to a Punycode string of ASCII symbols. + +```js +// encode domain name parts +punycode.encode('mañana'); // 'maana-pta' +punycode.encode('☃-⌘'); // '--dqo34k' +``` + +### `punycode.toUnicode(input)` + +Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. + +```js +// decode domain names +punycode.toUnicode('xn--maana-pta.com'); +// → 'mañana.com' +punycode.toUnicode('xn----dqo34k.com'); +// → '☃-⌘.com' + +// decode email addresses +punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); +// → 'джумла@джpумлатест.bрфa' +``` + +### `punycode.toASCII(input)` + +Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. + +```js +// encode domain names +punycode.toASCII('mañana.com'); +// → 'xn--maana-pta.com' +punycode.toASCII('☃-⌘.com'); +// → 'xn----dqo34k.com' + +// encode email addresses +punycode.toASCII('джумла@джpумлатест.bрфa'); +// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' +``` + +### `punycode.ucs2` + +#### `punycode.ucs2.decode(string)` + +Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. + +```js +punycode.ucs2.decode('abc'); +// → [0x61, 0x62, 0x63] +// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: +punycode.ucs2.decode('\uD834\uDF06'); +// → [0x1D306] +``` + +#### `punycode.ucs2.encode(codePoints)` + +Creates a string based on an array of numeric code point values. + +```js +punycode.ucs2.encode([0x61, 0x62, 0x63]); +// → 'abc' +punycode.ucs2.encode([0x1D306]); +// → '\uD834\uDF06' +``` + +### `punycode.version` + +A string representing the current Punycode.js version number. + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/public/node_modules/_punycode@2.1.1@punycode/package.json b/public/node_modules/_punycode@2.1.1@punycode/package.json new file mode 100644 index 000000000..b5f60dae2 --- /dev/null +++ b/public/node_modules/_punycode@2.1.1@punycode/package.json @@ -0,0 +1,61 @@ +{ + "name": "punycode", + "version": "2.1.1", + "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", + "homepage": "https://mths.be/punycode", + "main": "punycode.js", + "jsnext:main": "punycode.es6.js", + "module": "punycode.es6.js", + "engines": { + "node": ">=6" + }, + "keywords": [ + "punycode", + "unicode", + "idn", + "idna", + "dns", + "url", + "domain" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/bestiejs/punycode.js.git" + }, + "bugs": "https://github.com/bestiejs/punycode.js/issues", + "files": [ + "LICENSE-MIT.txt", + "punycode.js", + "punycode.es6.js" + ], + "scripts": { + "test": "mocha tests", + "prepublish": "node scripts/prepublish.js" + }, + "devDependencies": { + "codecov": "^1.0.1", + "istanbul": "^0.4.1", + "mocha": "^2.5.3" + }, + "jspm": { + "map": { + "./punycode.js": { + "node": "@node/punycode" + } + } + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:11 GMT+0800 (GMT+08:00)", + "_from": "punycode@2.1.1", + "_resolved": "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_punycode@2.1.1@punycode/punycode.es6.js b/public/node_modules/_punycode@2.1.1@punycode/punycode.es6.js new file mode 100644 index 000000000..4610bc9eb --- /dev/null +++ b/public/node_modules/_punycode@2.1.1@punycode/punycode.es6.js @@ -0,0 +1,441 @@ +'use strict'; + +/** Highest positive signed 32-bit float value */ +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + const result = []; + let length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + const parts = string.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + const labels = string.split('.'); + const encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = array => String.fromCodePoint(...array); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +const basicToDigit = function(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + let oldi = i; + for (let w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + const digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + + } + + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +const encode = function(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + let inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + let basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue == n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for (let k = base; /* no condition */; k += base) { + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +const toUnicode = function(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +const toASCII = function(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode }; +export default punycode; diff --git a/public/node_modules/_punycode@2.1.1@punycode/punycode.js b/public/node_modules/_punycode@2.1.1@punycode/punycode.js new file mode 100644 index 000000000..ea61fd0d3 --- /dev/null +++ b/public/node_modules/_punycode@2.1.1@punycode/punycode.js @@ -0,0 +1,440 @@ +'use strict'; + +/** Highest positive signed 32-bit float value */ +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + const result = []; + let length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + const parts = string.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + const labels = string.split('.'); + const encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = array => String.fromCodePoint(...array); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +const basicToDigit = function(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + let oldi = i; + for (let w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + const digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + + } + + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +const encode = function(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + let inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + let basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue == n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for (let k = base; /* no condition */; k += base) { + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +const toUnicode = function(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +const toASCII = function(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +module.exports = punycode; diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/.travis.yml b/public/node_modules/_readable-stream@2.3.6@readable-stream/.travis.yml new file mode 100644 index 000000000..40992555b --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/.travis.yml @@ -0,0 +1,55 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.10' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.11' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.12' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 1 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 2 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 3 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 6 + env: TASK=test + - node_js: 7 + env: TASK=test + - node_js: 8 + env: TASK=test + - node_js: 9 + env: TASK=test +script: "npm run $TASK" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/CONTRIBUTING.md b/public/node_modules/_readable-stream@2.3.6@readable-stream/CONTRIBUTING.md new file mode 100644 index 000000000..f478d58dc --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# 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. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/GOVERNANCE.md b/public/node_modules/_readable-stream@2.3.6@readable-stream/GOVERNANCE.md new file mode 100644 index 000000000..16ffb93f2 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/LICENSE b/public/node_modules/_readable-stream@2.3.6@readable-stream/LICENSE new file mode 100644 index 000000000..2873b3b2e --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/README.md b/public/node_modules/_readable-stream@2.3.6@readable-stream/README.md new file mode 100644 index 000000000..23fe3f3e3 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/README.md @@ -0,0 +1,58 @@ +# readable-stream + +***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E +* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/doc/wg-meetings/2015-01-30.md b/public/node_modules/_readable-stream@2.3.6@readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 000000000..83275f192 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/duplex-browser.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/duplex-browser.js new file mode 100644 index 000000000..f8b2db83d --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/duplex-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_duplex.js'); diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/duplex.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/duplex.js new file mode 100644 index 000000000..46924cbfd --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require('./readable').Duplex diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_duplex.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_duplex.js new file mode 100644 index 000000000..a1ca813e5 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_duplex.js @@ -0,0 +1,131 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_passthrough.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_passthrough.js new file mode 100644 index 000000000..a9c835884 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,47 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_readable.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_readable.js new file mode 100644 index 000000000..bf34ac65e --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_readable.js @@ -0,0 +1,1019 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var destroyImpl = require('./internal/streams/destroy'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, unpipeInfo); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_transform.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_transform.js new file mode 100644 index 000000000..5d1f8b876 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_transform.js @@ -0,0 +1,214 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js new file mode 100644 index 000000000..b3f4e85a2 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js @@ -0,0 +1,687 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = require('./internal/streams/destroy'); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/BufferList.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/BufferList.js new file mode 100644 index 000000000..aefc68bd9 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/BufferList.js @@ -0,0 +1,79 @@ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = require('safe-buffer').Buffer; +var util = require('util'); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/destroy.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 000000000..5a0a0d88c --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,74 @@ +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); + } + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + pna.nextTick(emitErrorNT, _this, err); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/stream-browser.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 000000000..9332a3fda --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/stream.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/stream.js new file mode 100644 index 000000000..ce2ad5b6e --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/core-util-is b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/core-util-is new file mode 120000 index 000000000..75c0bbb58 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/core-util-is @@ -0,0 +1 @@ +../../_core-util-is@1.0.2@core-util-is \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/inherits b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/inherits new file mode 120000 index 000000000..969efe69f --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/inherits @@ -0,0 +1 @@ +../../_inherits@2.0.4@inherits \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/isarray b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/isarray new file mode 120000 index 000000000..3866a4551 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/isarray @@ -0,0 +1 @@ +../../_isarray@1.0.0@isarray \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/process-nextick-args b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/process-nextick-args new file mode 120000 index 000000000..8168ac5ec --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/process-nextick-args @@ -0,0 +1 @@ +../../_process-nextick-args@2.0.1@process-nextick-args \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/safe-buffer b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/safe-buffer new file mode 120000 index 000000000..a465486d0 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/safe-buffer @@ -0,0 +1 @@ +../../_safe-buffer@5.1.2@safe-buffer \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/string_decoder b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/string_decoder new file mode 120000 index 000000000..667574c0c --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/string_decoder @@ -0,0 +1 @@ +../../_string_decoder@1.1.1@string_decoder \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/util-deprecate b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/util-deprecate new file mode 120000 index 000000000..9a1a4a198 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/node_modules/util-deprecate @@ -0,0 +1 @@ +../../_util-deprecate@1.0.2@util-deprecate \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/package.json b/public/node_modules/_readable-stream@2.3.6@readable-stream/package.json new file mode 100644 index 000000000..5564ee77c --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/package.json @@ -0,0 +1,55 @@ +{ + "name": "readable-stream", + "version": "2.3.6", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "devDependencies": { + "assert": "^1.4.0", + "babel-polyfill": "^6.9.1", + "buffer": "^4.9.0", + "lolex": "^2.3.2", + "nyc": "^6.4.0", + "tap": "^0.7.0", + "tape": "^4.8.0" + }, + "scripts": { + "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false, + "./readable.js": "./readable-browser.js", + "./writable.js": "./writable-browser.js", + "./duplex.js": "./duplex-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "license": "MIT", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "readable-stream@2.3.6", + "_resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-2.3.6.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/passthrough.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/passthrough.js new file mode 100644 index 000000000..ffd791d7f --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require('./readable').PassThrough diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/readable-browser.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/readable-browser.js new file mode 100644 index 000000000..e50372592 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/readable-browser.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/readable.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/readable.js new file mode 100644 index 000000000..ec89ec533 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/readable.js @@ -0,0 +1,19 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); +} diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/transform.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/transform.js new file mode 100644 index 000000000..b1baba26d --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require('./readable').Transform diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/writable-browser.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/writable-browser.js new file mode 100644 index 000000000..ebdde6a85 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/writable-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_writable.js'); diff --git a/public/node_modules/_readable-stream@2.3.6@readable-stream/writable.js b/public/node_modules/_readable-stream@2.3.6@readable-stream/writable.js new file mode 100644 index 000000000..3211a6f80 --- /dev/null +++ b/public/node_modules/_readable-stream@2.3.6@readable-stream/writable.js @@ -0,0 +1,8 @@ +var Stream = require("stream") +var Writable = require("./lib/_stream_writable.js") + +if (process.env.READABLE_STREAM === 'disable') { + module.exports = Stream && Stream.Writable || Writable +} else { + module.exports = Writable +} diff --git a/public/node_modules/_rimraf@2.7.1@rimraf/LICENSE b/public/node_modules/_rimraf@2.7.1@rimraf/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_rimraf@2.7.1@rimraf/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_rimraf@2.7.1@rimraf/README.md b/public/node_modules/_rimraf@2.7.1@rimraf/README.md new file mode 100644 index 000000000..423b8cf85 --- /dev/null +++ b/public/node_modules/_rimraf@2.7.1@rimraf/README.md @@ -0,0 +1,101 @@ +[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) + +The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. + +Install with `npm install rimraf`, or just drop rimraf.js somewhere. + +## API + +`rimraf(f, [opts], callback)` + +The first parameter will be interpreted as a globbing pattern for files. If you +want to disable globbing you can do so with `opts.disableGlob` (defaults to +`false`). This might be handy, for instance, if you have filenames that contain +globbing wildcard characters. + +The callback will be called with an error if there is one. Certain +errors are handled for you: + +* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of + `opts.maxBusyTries` times before giving up, adding 100ms of wait + between each attempt. The default `maxBusyTries` is 3. +* `ENOENT` - If the file doesn't exist, rimraf will return + successfully, since your desired outcome is already the case. +* `EMFILE` - Since `readdir` requires opening a file descriptor, it's + possible to hit `EMFILE` if too many file descriptors are in use. + In the sync case, there's nothing to be done for this. But in the + async case, rimraf will gradually back off with timeouts up to + `opts.emfileWait` ms, which defaults to 1000. + +## options + +* unlink, chmod, stat, lstat, rmdir, readdir, + unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync + + In order to use a custom file system library, you can override + specific fs functions on the options object. + + If any of these functions are present on the options object, then + the supplied function will be used instead of the default fs + method. + + Sync methods are only relevant for `rimraf.sync()`, of course. + + For example: + + ```javascript + var myCustomFS = require('some-custom-fs') + + rimraf('some-thing', myCustomFS, callback) + ``` + +* maxBusyTries + + If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered + on Windows systems, then rimraf will retry with a linear backoff + wait of 100ms longer on each try. The default maxBusyTries is 3. + + Only relevant for async usage. + +* emfileWait + + If an `EMFILE` error is encountered, then rimraf will retry + repeatedly with a linear backoff of 1ms longer on each try, until + the timeout counter hits this max. The default limit is 1000. + + If you repeatedly encounter `EMFILE` errors, then consider using + [graceful-fs](http://npm.im/graceful-fs) in your program. + + Only relevant for async usage. + +* glob + + Set to `false` to disable [glob](http://npm.im/glob) pattern + matching. + + Set to an object to pass options to the glob module. The default + glob options are `{ nosort: true, silent: true }`. + + Glob version 6 is used in this module. + + Relevant for both sync and async usage. + +* disableGlob + + Set to any non-falsey value to disable globbing entirely. + (Equivalent to setting `glob: false`.) + +## rimraf.sync + +It can remove stuff synchronously, too. But that's not so good. Use +the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf [ ...]` which is useful for cross platform support. + +## mkdirp + +If you need to create a directory recursively, check out +[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/public/node_modules/_rimraf@2.7.1@rimraf/bin.js b/public/node_modules/_rimraf@2.7.1@rimraf/bin.js new file mode 100755 index 000000000..0d1e17be7 --- /dev/null +++ b/public/node_modules/_rimraf@2.7.1@rimraf/bin.js @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var noglob = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg === '--no-glob' || arg === '-G') + noglob = true + else if (arg === '--glob' || arg === '-g') + noglob = false + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}) + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf [ ...]') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + log(' -G, --no-glob Do not expand glob patterns in arguments') + log(' -g, --glob Expand glob patterns in arguments (default)') + process.exit(help ? 0 : 1) +} else + go(0) + +function go (n) { + if (n >= args.length) + return + var options = {} + if (noglob) + options = { glob: false } + rimraf(args[n], options, function (er) { + if (er) + throw er + go(n+1) + }) +} diff --git a/public/node_modules/_rimraf@2.7.1@rimraf/node_modules/glob b/public/node_modules/_rimraf@2.7.1@rimraf/node_modules/glob new file mode 120000 index 000000000..b400d29dd --- /dev/null +++ b/public/node_modules/_rimraf@2.7.1@rimraf/node_modules/glob @@ -0,0 +1 @@ +../../_glob@7.1.6@glob \ No newline at end of file diff --git a/public/node_modules/_rimraf@2.7.1@rimraf/package.json b/public/node_modules/_rimraf@2.7.1@rimraf/package.json new file mode 100644 index 000000000..3bf577b10 --- /dev/null +++ b/public/node_modules/_rimraf@2.7.1@rimraf/package.json @@ -0,0 +1,32 @@ +{ + "name": "rimraf", + "version": "2.7.1", + "main": "rimraf.js", + "description": "A deep deletion module for node (like `rm -rf`)", + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": "git://github.com/isaacs/rimraf.git", + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags", + "test": "tap test/*.js" + }, + "bin": "./bin.js", + "dependencies": { + "glob": "^7.1.3" + }, + "files": [ + "LICENSE", + "README.md", + "bin.js", + "rimraf.js" + ], + "devDependencies": { + "mkdirp": "^0.5.1", + "tap": "^12.1.1" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "rimraf@2.7.1", + "_resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-2.7.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-2.7.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_rimraf@2.7.1@rimraf/rimraf.js b/public/node_modules/_rimraf@2.7.1@rimraf/rimraf.js new file mode 100644 index 000000000..a90ad029f --- /dev/null +++ b/public/node_modules/_rimraf@2.7.1@rimraf/rimraf.js @@ -0,0 +1,372 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var assert = require("assert") +var path = require("path") +var fs = require("fs") +var glob = undefined +try { + glob = require("glob") +} catch (_err) { + // treat glob as optional. +} +var _0666 = parseInt('666', 8) + +var defaultGlobOpts = { + nosort: true, + silent: true +} + +// for EMFILE handling +var timeout = 0 + +var isWindows = (process.platform === "win32") + +function defaults (options) { + var methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(function(m) { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 + options.emfileWait = options.emfileWait || 1000 + if (options.glob === false) { + options.disableGlob = true + } + if (options.disableGlob !== true && glob === undefined) { + throw Error('glob dependency not found, set `options.disableGlob = true` if intentional') + } + options.disableGlob = options.disableGlob || false + options.glob = options.glob || defaultGlobOpts +} + +function rimraf (p, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') + assert(options, 'rimraf: invalid options argument provided') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + defaults(options) + + var busyTries = 0 + var errState = null + var n = 0 + + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]) + + options.lstat(p, function (er, stat) { + if (!er) + return afterGlob(null, [p]) + + glob(p, options.glob, afterGlob) + }) + + function next (er) { + errState = errState || er + if (--n === 0) + cb(errState) + } + + function afterGlob (er, results) { + if (er) + return cb(er) + + n = results.length + if (n === 0) + return cb() + + results.forEach(function (p) { + rimraf_(p, options, function CB (er) { + if (er) { + if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && + busyTries < options.maxBusyTries) { + busyTries ++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, options, CB) + }, time) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function () { + rimraf_(p, options, CB) + }, timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + next(er) + }) + }) + } +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, function (er, st) { + if (er && er.code === "ENOENT") + return cb(null) + + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb) + + if (st && st.isDirectory()) + return rmdir(p, options, er, cb) + + options.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + if (er.code === "EISDIR") + return rmdir(p, options, er, cb) + } + return cb(er) + }) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + if (er) + assert(er instanceof Error) + + options.chmod(p, _0666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, options, er, cb) + else + options.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, options, er) { + assert(p) + assert(options) + if (er) + assert(er instanceof Error) + + try { + options.chmodSync(p, _0666) + } catch (er2) { + if (er2.code === "ENOENT") + return + else + throw er + } + + try { + var stats = options.statSync(p) + } catch (er3) { + if (er3.code === "ENOENT") + return + else + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, options, er) + else + options.unlinkSync(p) +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return options.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), options, function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + options.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + var results + + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p] + } else { + try { + options.lstatSync(p) + results = [p] + } catch (er) { + results = glob.sync(p, options.glob) + } + } + + if (!results.length) + return + + for (var i = 0; i < results.length; i++) { + var p = results[i] + + try { + var st = options.lstatSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + + // Windows can EPERM on stat. Life is suffering. + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er) + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) + rmdirSync(p, options, null) + else + options.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + if (er.code !== "EISDIR") + throw er + + rmdirSync(p, options, er) + } + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options) + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f), options) + }) + + // We only end up here once we got ENOTEMPTY at least once, and + // at this point, we are guaranteed to have removed all the kids. + // So, we know that it won't be ENOENT or ENOTDIR or anything else. + // try really hard to delete stuff on windows, because it has a + // PROFOUNDLY annoying habit of not closing handles promptly when + // files are deleted, resulting in spurious ENOTEMPTY errors. + var retries = isWindows ? 100 : 1 + var i = 0 + do { + var threw = true + try { + var ret = options.rmdirSync(p, options) + threw = false + return ret + } finally { + if (++i < retries && threw) + continue + } + } while (true) +} diff --git a/public/node_modules/_run-queue@1.0.3@run-queue/README.md b/public/node_modules/_run-queue@1.0.3@run-queue/README.md new file mode 100644 index 000000000..e84214d1f --- /dev/null +++ b/public/node_modules/_run-queue@1.0.3@run-queue/README.md @@ -0,0 +1,86 @@ +# run-queue + +A promise based, dynamic priority queue runner, with concurrency limiting. + +```js +const RunQueue = require('run-queue') + +const queue = new RunQueue({ + maxConcurrency: 1 +}) + +queue.add(1, example, [-1]) +for (let ii = 0; ii < 5; ++ii) { + queue.add(0, example, [ii]) +} +const finished = [] +queue.run().then( + console.log(finished) +}) + +function example (num, next) { + setTimeout(() => { + finished.push(num) + next() + }, 5 - Math.abs(num)) +} +``` + +would output + +``` +[ 0, 1, 2, 3, 4, -1 ] +``` + +If you bump concurrency to `2`, then you get: + +``` +[ 1, 0, 3, 2, 4, -1 ] +``` + +The concurrency means that they don't finish in order, because some take +longer than others. Each priority level must finish entirely before the +next priority level is run. See +[PRIORITIES](https://github.com/iarna/run-queue#priorities) below. This is +even true if concurrency is set high enough that all of the regular queue +can execute at once, for instance, with `maxConcurrency: 10`: + +``` +[ 4, 3, 2, 1, 0, -1 ] +``` + +## API + +### const queue = new RunQueue(options) + +Create a new queue. Options may contain: + +* maxConcurrency - (Default: `1`) The maximum number of jobs to execute at once. +* Promise - (Default: global.Promise) The promise implementation to use. + +### queue.add (prio, fn, args) + +Add a new job to the end of the queue at priority `prio` that will run `fn` +with `args`. If `fn` is async then it should return a Promise. + +### queue.run () + +Start running the job queue. Returns a Promise that resolves when either +all the jobs are complete or a job ends in error (throws or returns a +rejected promise). If a job ended in error then this Promise will be rejected +with that error and no further queue running will be done. + +## PRIORITIES + +Priorities are any integer value >= 0. + +Lowest is executed first. + +Priorities essentially represent distinct job queues. All jobs in a queue +must complete before the next highest priority job queue is executed. + +This means that if you have two queues, `0` and `1` then ALL jobs in `0` +must complete before ANY execute in `1`. If you add new `0` level jobs +while `1` level jobs are running then it will switch back processing the `0` +queue and won't execute any more `1` jobs till all of the new `0` jobs +complete. diff --git a/public/node_modules/_run-queue@1.0.3@run-queue/node_modules/aproba b/public/node_modules/_run-queue@1.0.3@run-queue/node_modules/aproba new file mode 120000 index 000000000..0cd6a4c08 --- /dev/null +++ b/public/node_modules/_run-queue@1.0.3@run-queue/node_modules/aproba @@ -0,0 +1 @@ +../../_aproba@1.2.0@aproba \ No newline at end of file diff --git a/public/node_modules/_run-queue@1.0.3@run-queue/package.json b/public/node_modules/_run-queue@1.0.3@run-queue/package.json new file mode 100644 index 000000000..1d195b52c --- /dev/null +++ b/public/node_modules/_run-queue@1.0.3@run-queue/package.json @@ -0,0 +1,36 @@ +{ + "name": "run-queue", + "version": "1.0.3", + "description": "A promise based, dynamic priority queue runner, with concurrency limiting.", + "main": "queue.js", + "scripts": { + "test": "standard && tap -J test" + }, + "keywords": [], + "author": "Rebecca Turner (http://re-becca.org/)", + "license": "ISC", + "devDependencies": { + "standard": "^8.6.0", + "tap": "^10.2.0" + }, + "files": [ + "queue.js" + ], + "directories": { + "test": "test" + }, + "dependencies": { + "aproba": "^1.1.1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/run-queue.git" + }, + "bugs": { + "url": "https://github.com/iarna/run-queue/issues" + }, + "homepage": "https://npmjs.com/package/run-queue", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "run-queue@1.0.3", + "_resolved": "https://registry.npm.taobao.org/run-queue/download/run-queue-1.0.3.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_run-queue@1.0.3@run-queue/queue.js b/public/node_modules/_run-queue@1.0.3@run-queue/queue.js new file mode 100644 index 000000000..500bf293d --- /dev/null +++ b/public/node_modules/_run-queue@1.0.3@run-queue/queue.js @@ -0,0 +1,95 @@ +'use strict' +module.exports = RunQueue + +var validate = require('aproba') + +function RunQueue (opts) { + validate('Z|O', [opts]) + if (!opts) opts = {} + this.finished = false + this.inflight = 0 + this.maxConcurrency = opts.maxConcurrency || 1 + this.queued = 0 + this.queue = [] + this.currentPrio = null + this.currentQueue = null + this.Promise = opts.Promise || global.Promise + this.deferred = {} +} + +RunQueue.prototype = {} + +RunQueue.prototype.run = function () { + if (arguments.length !== 0) throw new Error('RunQueue.run takes no arguments') + var self = this + var deferred = this.deferred + if (!deferred.promise) { + deferred.promise = new this.Promise(function (resolve, reject) { + deferred.resolve = resolve + deferred.reject = reject + self._runQueue() + }) + } + return deferred.promise +} + +RunQueue.prototype._runQueue = function () { + var self = this + + while ((this.inflight < this.maxConcurrency) && this.queued) { + if (!this.currentQueue || this.currentQueue.length === 0) { + // wait till the current priority is entirely processed before + // starting a new one + if (this.inflight) return + var prios = Object.keys(this.queue) + for (var ii = 0; ii < prios.length; ++ii) { + var prioQueue = this.queue[prios[ii]] + if (prioQueue.length) { + this.currentQueue = prioQueue + this.currentPrio = prios[ii] + break + } + } + } + + --this.queued + ++this.inflight + var next = this.currentQueue.shift() + var args = next.args || [] + + // we explicitly construct a promise here so that queue items can throw + // or immediately return to resolve + var queueEntry = new this.Promise(function (resolve) { + resolve(next.cmd.apply(null, args)) + }) + + queueEntry.then(function () { + --self.inflight + if (self.finished) return + if (self.queued <= 0 && self.inflight <= 0) { + self.finished = true + self.deferred.resolve() + } + self._runQueue() + }, function (err) { + self.finished = true + self.deferred.reject(err) + }) + } +} + +RunQueue.prototype.add = function (prio, cmd, args) { + if (this.finished) throw new Error("Can't add to a finished queue. Create a new queue.") + if (Math.abs(Math.floor(prio)) !== prio) throw new Error('Priorities must be a positive integer value.') + validate('NFA|NFZ', [prio, cmd, args]) + prio = Number(prio) + if (!this.queue[prio]) this.queue[prio] = [] + ++this.queued + this.queue[prio].push({cmd: cmd, args: args}) + // if this priority is higher than the one we're currently processing, + // switch back to processing its queue. + if (this.currentPrio > prio) { + this.currentQueue = this.queue[prio] + this.currentPrio = prio + } +} diff --git a/public/node_modules/_safe-buffer@5.1.2@safe-buffer/LICENSE b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/LICENSE new file mode 100644 index 000000000..0c068ceec --- /dev/null +++ b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/node_modules/_safe-buffer@5.1.2@safe-buffer/README.md b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/README.md new file mode 100644 index 000000000..e9a81afd0 --- /dev/null +++ b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/README.md @@ -0,0 +1,584 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/public/node_modules/_safe-buffer@5.1.2@safe-buffer/index.d.ts b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/index.d.ts new file mode 100644 index 000000000..e9fed809a --- /dev/null +++ b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/index.d.ts @@ -0,0 +1,187 @@ +declare module "safe-buffer" { + export class Buffer { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + } +} \ No newline at end of file diff --git a/public/node_modules/_safe-buffer@5.1.2@safe-buffer/index.js b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/index.js new file mode 100644 index 000000000..22438dabb --- /dev/null +++ b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/index.js @@ -0,0 +1,62 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/public/node_modules/_safe-buffer@5.1.2@safe-buffer/package.json b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/package.json new file mode 100644 index 000000000..1baf81b38 --- /dev/null +++ b/public/node_modules/_safe-buffer@5.1.2@safe-buffer/package.json @@ -0,0 +1,40 @@ +{ + "name": "safe-buffer", + "description": "Safer Node.js Buffer API", + "version": "5.1.2", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "safe-buffer@5.1.2", + "_resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/CHANGELOG.md b/public/node_modules/_schema-utils@2.6.1@schema-utils/CHANGELOG.md new file mode 100644 index 000000000..13ca0aa7b --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/CHANGELOG.md @@ -0,0 +1,231 @@ +# Changelog + +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. + +### [2.6.1](https://github.com/webpack/schema-utils/compare/v2.6.0...v2.6.1) (2019-11-28) + + +### Bug Fixes + +* typescript declarations ([#84](https://github.com/webpack/schema-utils/issues/84)) ([89d55a9](https://github.com/webpack/schema-utils/commit/89d55a9a8edfa6a8ac8b112f226bb3154e260319)) + +## [2.6.0](https://github.com/webpack/schema-utils/compare/v2.5.0...v2.6.0) (2019-11-27) + + +### Features + +* support configuration via title ([#81](https://github.com/webpack/schema-utils/issues/81)) ([afddc10](https://github.com/webpack/schema-utils/commit/afddc109f6891cd37a9f1835d50862d119a072bf)) + + +### Bug Fixes + +* typescript definitions ([#70](https://github.com/webpack/schema-utils/issues/70)) ([f38158d](https://github.com/webpack/schema-utils/commit/f38158d6d040e2c701622778ae8122fb26a4f990)) + +## [2.5.0](https://github.com/webpack/schema-utils/compare/v2.4.1...v2.5.0) (2019-10-15) + + +### Bug Fixes + +* rework format for maxLength, minLength ([#67](https://github.com/webpack/schema-utils/issues/67)) ([0d12259](https://github.com/webpack/schema-utils/commit/0d12259)) +* support all cases with one number in range ([#64](https://github.com/webpack/schema-utils/issues/64)) ([7fc8069](https://github.com/webpack/schema-utils/commit/7fc8069)) +* typescript definition and export naming ([#69](https://github.com/webpack/schema-utils/issues/69)) ([a435b79](https://github.com/webpack/schema-utils/commit/a435b79)) + + +### Features + +* "smart" numbers range ([62fb107](https://github.com/webpack/schema-utils/commit/62fb107)) + +### [2.4.1](https://github.com/webpack/schema-utils/compare/v2.4.0...v2.4.1) (2019-09-27) + + +### Bug Fixes + +* publish definitions ([#58](https://github.com/webpack/schema-utils/issues/58)) ([1885faa](https://github.com/webpack/schema-utils/commit/1885faa)) + +## [2.4.0](https://github.com/webpack/schema-utils/compare/v2.3.0...v2.4.0) (2019-09-26) + + +### Features + +* better errors when the `type` keyword doesn't exist ([0988be2](https://github.com/webpack/schema-utils/commit/0988be2)) +* support $data reference ([#56](https://github.com/webpack/schema-utils/issues/56)) ([d2f11d6](https://github.com/webpack/schema-utils/commit/d2f11d6)) +* types definitions ([#52](https://github.com/webpack/schema-utils/issues/52)) ([facb431](https://github.com/webpack/schema-utils/commit/facb431)) + +## [2.3.0](https://github.com/webpack/schema-utils/compare/v2.2.0...v2.3.0) (2019-09-26) + + +### Features + +* support `not` keyword ([#53](https://github.com/webpack/schema-utils/issues/53)) ([765f458](https://github.com/webpack/schema-utils/commit/765f458)) + +## [2.2.0](https://github.com/webpack/schema-utils/compare/v2.1.0...v2.2.0) (2019-09-02) + + +### Features + +* better error output for `oneOf` and `anyOf` ([#48](https://github.com/webpack/schema-utils/issues/48)) ([#50](https://github.com/webpack/schema-utils/issues/50)) ([332242f](https://github.com/webpack/schema-utils/commit/332242f)) + +## [2.1.0](https://github.com/webpack-contrib/schema-utils/compare/v2.0.1...v2.1.0) (2019-08-07) + + +### Bug Fixes + +* throw error on sparse arrays ([#47](https://github.com/webpack-contrib/schema-utils/issues/47)) ([b85ac38](https://github.com/webpack-contrib/schema-utils/commit/b85ac38)) + + +### Features + +* export `ValidateError` ([#46](https://github.com/webpack-contrib/schema-utils/issues/46)) ([ff781d7](https://github.com/webpack-contrib/schema-utils/commit/ff781d7)) + + + +### [2.0.1](https://github.com/webpack-contrib/schema-utils/compare/v2.0.0...v2.0.1) (2019-07-18) + + +### Bug Fixes + +* error message for empty object ([#44](https://github.com/webpack-contrib/schema-utils/issues/44)) ([0b4b4a2](https://github.com/webpack-contrib/schema-utils/commit/0b4b4a2)) + + + +### [2.0.0](https://github.com/webpack-contrib/schema-utils/compare/v1.0.0...v2.0.0) (2019-07-17) + + +### BREAKING CHANGES + +* drop support for Node.js < 8.9.0 +* drop support `errorMessage`, please use `description` for links. +* api was changed, please look documentation. +* error messages was fully rewritten. + + + +# [1.0.0](https://github.com/webpack-contrib/schema-utils/compare/v0.4.7...v1.0.0) (2018-08-07) + + +### Features + +* **src:** add support for custom error messages ([#33](https://github.com/webpack-contrib/schema-utils/issues/33)) ([1cbe4ef](https://github.com/webpack-contrib/schema-utils/commit/1cbe4ef)) + + + + +## [0.4.7](https://github.com/webpack-contrib/schema-utils/compare/v0.4.6...v0.4.7) (2018-08-07) + + +### Bug Fixes + +* **src:** `node >= v4.0.0` support ([#32](https://github.com/webpack-contrib/schema-utils/issues/32)) ([cb13dd4](https://github.com/webpack-contrib/schema-utils/commit/cb13dd4)) + + + + +## [0.4.6](https://github.com/webpack-contrib/schema-utils/compare/v0.4.5...v0.4.6) (2018-08-06) + + +### Bug Fixes + +* **package:** remove lockfile ([#28](https://github.com/webpack-contrib/schema-utils/issues/28)) ([69f1a81](https://github.com/webpack-contrib/schema-utils/commit/69f1a81)) +* **package:** remove unnecessary `webpack` dependency ([#26](https://github.com/webpack-contrib/schema-utils/issues/26)) ([532eaa5](https://github.com/webpack-contrib/schema-utils/commit/532eaa5)) + + + + +## [0.4.5](https://github.com/webpack-contrib/schema-utils/compare/v0.4.4...v0.4.5) (2018-02-13) + + +### Bug Fixes + +* **CHANGELOG:** update broken links ([4483b9f](https://github.com/webpack-contrib/schema-utils/commit/4483b9f)) +* **package:** update broken links ([f2494ba](https://github.com/webpack-contrib/schema-utils/commit/f2494ba)) + + + + +## [0.4.4](https://github.com/webpack-contrib/schema-utils/compare/v0.4.3...v0.4.4) (2018-02-13) + + +### Bug Fixes + +* **package:** update `dependencies` ([#22](https://github.com/webpack-contrib/schema-utils/issues/22)) ([3aecac6](https://github.com/webpack-contrib/schema-utils/commit/3aecac6)) + + + + +## [0.4.3](https://github.com/webpack-contrib/schema-utils/compare/v0.4.2...v0.4.3) (2017-12-14) + + +### Bug Fixes + +* **validateOptions:** throw `err` instead of `process.exit(1)` ([#17](https://github.com/webpack-contrib/schema-utils/issues/17)) ([c595eda](https://github.com/webpack-contrib/schema-utils/commit/c595eda)) +* **ValidationError:** never return `this` in the ctor ([#16](https://github.com/webpack-contrib/schema-utils/issues/16)) ([c723791](https://github.com/webpack-contrib/schema-utils/commit/c723791)) + + + + +## [0.4.2](https://github.com/webpack-contrib/schema-utils/compare/v0.4.1...v0.4.2) (2017-11-09) + + +### Bug Fixes + +* **validateOptions:** catch `ValidationError` and handle it internally ([#15](https://github.com/webpack-contrib/schema-utils/issues/15)) ([9c5ef5e](https://github.com/webpack-contrib/schema-utils/commit/9c5ef5e)) + + + + +## [0.4.1](https://github.com/webpack-contrib/schema-utils/compare/v0.4.0...v0.4.1) (2017-11-03) + + +### Bug Fixes + +* **ValidationError:** use `Error.captureStackTrace` for `err.stack` handling ([#14](https://github.com/webpack-contrib/schema-utils/issues/14)) ([a6fb974](https://github.com/webpack-contrib/schema-utils/commit/a6fb974)) + + + + +# [0.4.0](https://github.com/webpack-contrib/schema-utils/compare/v0.3.0...v0.4.0) (2017-10-28) + + +### Features + +* add support for `typeof`, `instanceof` (`{Function\|RegExp}`) ([#10](https://github.com/webpack-contrib/schema-utils/issues/10)) ([9f01816](https://github.com/webpack-contrib/schema-utils/commit/9f01816)) + + + + +# [0.3.0](https://github.com/webpack-contrib/schema-utils/compare/v0.2.1...v0.3.0) (2017-04-29) + + +### Features + +* add ValidationError ([#8](https://github.com/webpack-contrib/schema-utils/issues/8)) ([d48f0fb](https://github.com/webpack-contrib/schema-utils/commit/d48f0fb)) + + + + +## [0.2.1](https://github.com/webpack-contrib/schema-utils/compare/v0.2.0...v0.2.1) (2017-03-13) + + +### Bug Fixes + +* Include .babelrc to `files` ([28f0363](https://github.com/webpack-contrib/schema-utils/commit/28f0363)) +* Include source to `files` ([43b0f2f](https://github.com/webpack-contrib/schema-utils/commit/43b0f2f)) + + + + +# [0.2.0](https://github.com/webpack-contrib/schema-utils/compare/v0.1.0...v0.2.0) (2017-03-12) + + +# 0.1.0 (2017-03-07) + + +### Features + +* **validations:** add validateOptions module ([ae9b47b](https://github.com/webpack-contrib/schema-utils/commit/ae9b47b)) + + + +# 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. diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/LICENSE b/public/node_modules/_schema-utils@2.6.1@schema-utils/LICENSE new file mode 100644 index 000000000..8c11fc728 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/LICENSE @@ -0,0 +1,20 @@ +Copyright JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/README.md b/public/node_modules/_schema-utils@2.6.1@schema-utils/README.md new file mode 100644 index 000000000..3a2b3c095 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/README.md @@ -0,0 +1,276 @@ + + +[![npm][npm]][npm-url] +[![node][node]][node-url] +[![deps][deps]][deps-url] +[![tests][tests]][tests-url] +[![coverage][cover]][cover-url] +[![chat][chat]][chat-url] +[![size][size]][size-url] + +# schema-utils + +Package for validate options in loaders and plugins. + +## Getting Started + +To begin, you'll need to install `schema-utils`: + +```console +npm install schema-utils +``` + +## API + +**schema.json** + +```json +{ + "type": "object", + "properties": { + "option": { + "type": ["boolean"] + } + }, + "additionalProperties": false +} +``` + +```js +import schema from './path/to/schema.json'; +import validate from 'schema-utils'; + +const options = { option: true }; +const configuration = { name: 'Loader Name/Plugin Name/Name' }; + +validate(schema, options, configuration); +``` + +### `schema` + +Type: `String` + +JSON schema. + +Simple example of schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "description": "This is description of option.", + "type": "string" + } + }, + "additionalProperties": false +} +``` + +### `options` + +Type: `Object` + +Object with options. + +```js +validate( + schema, + { + name: 123, + }, + { name: 'MyPlugin' } +); +``` + +### `configuration` + +Allow to configure validator. + +There is an alternative method to configure the `name` and`baseDataPath` options via the `title` property in the schema. +For example: + +```json +{ + "title": "My Loader options", + "type": "object", + "properties": { + "name": { + "description": "This is description of option.", + "type": "string" + } + }, + "additionalProperties": false +} +``` + +The last word used for the `baseDataPath` option, other words used for the `name` option. +Based on the example above the `name` option equals `My Loader`, the `baseDataPath` option equals `options`. + +#### `name` + +Type: `Object` +Default: `"Object"` + +Allow to setup name in validation errors. + +```js +validate(schema, options, { name: 'MyPlugin' }); +``` + +```shell +Invalid configuration object. MyPlugin has been initialised using a configuration object that does not match the API schema. + - configuration.optionName should be a integer. +``` + +#### `baseDataPath` + +Type: `String` +Default: `"configuration"` + +Allow to setup base data path in validation errors. + +```js +validate(schema, options, { name: 'MyPlugin', baseDataPath: 'options' }); +``` + +```shell +Invalid options object. MyPlugin has been initialised using an options object that does not match the API schema. + - options.optionName should be a integer. +``` + +#### `postFormatter` + +Type: `Function` +Default: `undefined` + +Allow to reformat errors. + +```js +validate(schema, options, { + name: 'MyPlugin', + postFormatter: (formattedError, error) => { + if (error.keyword === 'type') { + return `${formattedError}\nAdditional Information.`; + } + + return formattedError; + }, +}); +``` + +```shell +Invalid options object. MyPlugin has been initialised using an options object that does not match the API schema. + - options.optionName should be a integer. + Additional Information. +``` + +## Examples + +**schema.json** + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "test": { + "anyOf": [ + { "type": "array" }, + { "type": "string" }, + { "instanceof": "RegExp" } + ] + }, + "transform": { + "instanceof": "Function" + }, + "sourceMap": { + "type": "boolean" + } + }, + "additionalProperties": false +} +``` + +### `Loader` + +```js +import { getOptions } from 'loader-utils'; +import validateOptions from 'schema-utils'; + +import schema from 'path/to/schema.json'; + +function loader(src, map) { + const options = getOptions(this) || {}; + + validateOptions(schema, options, { + name: 'Loader Name', + baseDataPath: 'options', + }); + + // Code... +} + +export default loader; +``` + +### `Plugin` + +```js +import validateOptions from 'schema-utils'; + +import schema from 'path/to/schema.json'; + +class Plugin { + constructor(options) { + validateOptions(schema, options, { + name: 'Plugin Name', + baseDataPath: 'options', + }); + + this.options = options; + } + + apply(compiler) { + // Code... + } +} + +export default Plugin; +``` + +## Contributing + +Please take a moment to read our contributing guidelines if you haven't yet done so. + +[CONTRIBUTING](./.github/CONTRIBUTING.md) + +## License + +[MIT](./LICENSE) + +[npm]: https://img.shields.io/npm/v/schema-utils.svg +[npm-url]: https://npmjs.com/package/schema-utils +[node]: https://img.shields.io/node/v/schema-utils.svg +[node-url]: https://nodejs.org +[deps]: https://david-dm.org/webpack/schema-utils.svg +[deps-url]: https://david-dm.org/webpack/schema-utils +[tests]: https://dev.azure.com/webpack/schema-utils/_apis/build/status/webpack.schema-utils?branchName=master +[tests-url]: https://dev.azure.com/webpack/schema-utils/_build/latest?definitionId=9&branchName=master +[cover]: https://codecov.io/gh/webpack/schema-utils/branch/master/graph/badge.svg +[cover-url]: https://codecov.io/gh/webpack/schema-utils +[chat]: https://badges.gitter.im/webpack/webpack.svg +[chat-url]: https://gitter.im/webpack/webpack +[size]: https://packagephobia.now.sh/badge?p=schema-utils +[size-url]: https://packagephobia.now.sh/result?p=schema-utils diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/ValidationError.d.ts b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/ValidationError.d.ts new file mode 100644 index 000000000..bd8acc488 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/ValidationError.d.ts @@ -0,0 +1,115 @@ +export default ValidationError; +export type JSONSchema6 = import('json-schema').JSONSchema6; +export type JSONSchema7 = import('json-schema').JSONSchema7; +export type Schema = + | import('json-schema').JSONSchema4 + | import('json-schema').JSONSchema6 + | import('json-schema').JSONSchema7; +export type ValidationErrorConfiguration = { + name?: string | undefined; + baseDataPath?: string | undefined; + postFormatter?: import('./validate').PostFormatter | undefined; +}; +export type PostFormatter = ( + formattedError: string, + error: import('ajv').ErrorObject & { + children?: import('ajv').ErrorObject[] | undefined; + } +) => string; +export type SchemaUtilErrorObject = import('ajv').ErrorObject & { + children?: import('ajv').ErrorObject[] | undefined; +}; +export type SPECIFICITY = number; +declare class ValidationError extends Error { + /** + * @param {Array} errors + * @param {Schema} schema + * @param {ValidationErrorConfiguration} configuration + */ + constructor( + errors: (import('ajv').ErrorObject & { + children?: import('ajv').ErrorObject[] | undefined; + })[], + schema: + | import('json-schema').JSONSchema4 + | import('json-schema').JSONSchema6 + | import('json-schema').JSONSchema7, + configuration?: import('./validate').ValidationErrorConfiguration + ); + /** @type {Array} */ + errors: Array; + /** @type {Schema} */ + schema: Schema; + /** @type {string} */ + headerName: string; + /** @type {string} */ + baseDataPath: string; + /** @type {PostFormatter | null} */ + postFormatter: PostFormatter | null; + /** + * @param {string} path + * @returns {Schema} + */ + getSchemaPart( + path: string + ): + | import('json-schema').JSONSchema4 + | import('json-schema').JSONSchema6 + | import('json-schema').JSONSchema7; + /** + * @param {Schema} schema + * @param {Array} prevSchemas + * @returns {string} + */ + formatSchema( + schema: + | import('json-schema').JSONSchema4 + | import('json-schema').JSONSchema6 + | import('json-schema').JSONSchema7, + prevSchemas?: Object[] + ): string; + /** + * @param {Schema=} schemaPart + * @param {(boolean | Array)=} additionalPath + * @param {boolean=} needDot + * @returns {string} + */ + getSchemaPartText( + schemaPart?: + | import('json-schema').JSONSchema4 + | import('json-schema').JSONSchema6 + | import('json-schema').JSONSchema7 + | undefined, + additionalPath?: boolean | string[] | undefined, + needDot?: boolean | undefined + ): string; + /** + * @param {Schema=} schemaPart + * @returns {string} + */ + getSchemaPartDescription( + schemaPart?: + | import('json-schema').JSONSchema4 + | import('json-schema').JSONSchema6 + | import('json-schema').JSONSchema7 + | undefined + ): string; + /** + * @param {SchemaUtilErrorObject} error + * @returns {string} + */ + formatValidationError( + error: import('ajv').ErrorObject & { + children?: import('ajv').ErrorObject[] | undefined; + } + ): string; + /** + * @param {Array} errors + * @returns {string} + */ + formatValidationErrors( + errors: (import('ajv').ErrorObject & { + children?: import('ajv').ErrorObject[] | undefined; + })[] + ): string; +} diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/index.d.ts b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/index.d.ts new file mode 100644 index 000000000..2ee7d9e93 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/index.d.ts @@ -0,0 +1,2 @@ +declare const _exports: typeof import('./validate').default; +export = _exports; diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/keywords/absolutePath.d.ts b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/keywords/absolutePath.d.ts new file mode 100644 index 000000000..581079366 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/keywords/absolutePath.d.ts @@ -0,0 +1,13 @@ +export default addAbsolutePathKeyword; +export type Ajv = import('ajv').Ajv; +export type SchemaUtilErrorObject = import('ajv').ErrorObject & { + children?: import('ajv').ErrorObject[] | undefined; +}; +/** + * + * @param {Ajv} ajv + * @returns {Ajv} + */ +declare function addAbsolutePathKeyword( + ajv: import('ajv').Ajv +): import('ajv').Ajv; diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/util/Range.d.ts b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/util/Range.d.ts new file mode 100644 index 000000000..00009e6fb --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/util/Range.d.ts @@ -0,0 +1,43 @@ +export = Range; +/** + * @typedef {[number, boolean]} RangeValue + */ +/** + * @callback RangeValueCallback + * @param {RangeValue} rangeValue + * @returns {boolean} + */ +declare class Range { + /** @type {Array} */ + _left: Array; + /** @type {Array} */ + _right: Array; + /** + * @param {number} value + * @param {boolean=} exclusive + */ + left(value: number, exclusive?: boolean | undefined): void; + /** + * @param {number} value + * @param {boolean=} exclusive + */ + right(value: number, exclusive?: boolean | undefined): void; + /** + * @param {boolean} logic is not logic applied + * @return {string} "smart" range string representation + */ + format(logic?: boolean): string; +} +declare namespace Range { + export { + getOperator, + formatRight, + formatLeft, + formatRange, + getRangeValue, + RangeValue, + RangeValueCallback, + }; +} +type RangeValue = [number, boolean]; +type RangeValueCallback = (rangeValue: [number, boolean]) => boolean; diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/validate.d.ts b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/validate.d.ts new file mode 100644 index 000000000..ea3e199fb --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/declarations/validate.d.ts @@ -0,0 +1,43 @@ +export default validate; +export type JSONSchema4 = import('json-schema').JSONSchema4; +export type JSONSchema6 = import('json-schema').JSONSchema6; +export type JSONSchema7 = import('json-schema').JSONSchema7; +export type ErrorObject = Ajv.ErrorObject; +export type Schema = + | import('json-schema').JSONSchema4 + | import('json-schema').JSONSchema6 + | import('json-schema').JSONSchema7; +export type SchemaUtilErrorObject = Ajv.ErrorObject & { + children?: Ajv.ErrorObject[] | undefined; +}; +export type PostFormatter = ( + formattedError: string, + error: Ajv.ErrorObject & { + children?: Ajv.ErrorObject[] | undefined; + } +) => string; +export type ValidationErrorConfiguration = { + name?: string | undefined; + baseDataPath?: string | undefined; + postFormatter?: PostFormatter | undefined; +}; +/** + * @param {Schema} schema + * @param {Array | object} options + * @param {ValidationErrorConfiguration=} configuration + * @returns {void} + */ +declare function validate( + schema: + | import('json-schema').JSONSchema4 + | import('json-schema').JSONSchema6 + | import('json-schema').JSONSchema7, + options: any, + configuration?: ValidationErrorConfiguration | undefined +): void; +declare namespace validate { + export { ValidationError }; + export { ValidationError as ValidateError }; +} +import Ajv from 'ajv'; +import ValidationError from './ValidationError'; diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/ValidationError.js b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/ValidationError.js new file mode 100644 index 000000000..7ccf82f64 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/ValidationError.js @@ -0,0 +1,1286 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +const Range = require('./util/Range'); +/** @typedef {import("json-schema").JSONSchema6} JSONSchema6 */ + +/** @typedef {import("json-schema").JSONSchema7} JSONSchema7 */ + +/** @typedef {import("./validate").Schema} Schema */ + +/** @typedef {import("./validate").ValidationErrorConfiguration} ValidationErrorConfiguration */ + +/** @typedef {import("./validate").PostFormatter} PostFormatter */ + +/** @typedef {import("./validate").SchemaUtilErrorObject} SchemaUtilErrorObject */ + +/** @enum {number} */ + + +const SPECIFICITY = { + type: 1, + not: 1, + oneOf: 1, + anyOf: 1, + if: 1, + enum: 1, + const: 1, + instanceof: 1, + required: 2, + pattern: 2, + patternRequired: 2, + format: 2, + formatMinimum: 2, + formatMaximum: 2, + minimum: 2, + exclusiveMinimum: 2, + maximum: 2, + exclusiveMaximum: 2, + multipleOf: 2, + uniqueItems: 2, + contains: 2, + minLength: 2, + maxLength: 2, + minItems: 2, + maxItems: 2, + minProperties: 2, + maxProperties: 2, + dependencies: 2, + propertyNames: 2, + additionalItems: 2, + additionalProperties: 2, + absolutePath: 2 +}; +/** + * + * @param {Array} array + * @param {(item: SchemaUtilErrorObject) => number} fn + * @returns {Array} + */ + +function filterMax(array, fn) { + const evaluatedMax = array.reduce((max, item) => Math.max(max, fn(item)), 0); + return array.filter(item => fn(item) === evaluatedMax); +} +/** + * + * @param {Array} children + * @returns {Array} + */ + + +function filterChildren(children) { + let newChildren = children; + newChildren = filterMax(newChildren, + /** + * + * @param {SchemaUtilErrorObject} error + * @returns {number} + */ + error => error.dataPath ? error.dataPath.length : 0); + newChildren = filterMax(newChildren, + /** + * @param {SchemaUtilErrorObject} error + * @returns {number} + */ + error => SPECIFICITY[ + /** @type {keyof typeof SPECIFICITY} */ + error.keyword] || 2); + return newChildren; +} +/** + * Find all children errors + * @param {Array} children + * @param {Array} schemaPaths + * @return {number} returns index of first child + */ + + +function findAllChildren(children, schemaPaths) { + let i = children.length - 1; + + const predicate = + /** + * @param {string} schemaPath + * @returns {boolean} + */ + schemaPath => children[i].schemaPath.indexOf(schemaPath) !== 0; + + while (i > -1 && !schemaPaths.every(predicate)) { + if (children[i].keyword === 'anyOf' || children[i].keyword === 'oneOf') { + const refs = extractRefs(children[i]); + const childrenStart = findAllChildren(children.slice(0, i), refs.concat(children[i].schemaPath)); + i = childrenStart - 1; + } else { + i -= 1; + } + } + + return i + 1; +} +/** + * Extracts all refs from schema + * @param {SchemaUtilErrorObject} error + * @return {Array} + */ + + +function extractRefs(error) { + const { + schema + } = error; + + if (!Array.isArray(schema)) { + return []; + } + + return schema.map(({ + $ref + }) => $ref).filter(s => s); +} +/** + * Groups children by their first level parent (assuming that error is root) + * @param {Array} children + * @return {Array} + */ + + +function groupChildrenByFirstChild(children) { + const result = []; + let i = children.length - 1; + + while (i > 0) { + const child = children[i]; + + if (child.keyword === 'anyOf' || child.keyword === 'oneOf') { + const refs = extractRefs(child); + const childrenStart = findAllChildren(children.slice(0, i), refs.concat(child.schemaPath)); + + if (childrenStart !== i) { + result.push(Object.assign({}, child, { + children: children.slice(childrenStart, i) + })); + i = childrenStart; + } else { + result.push(child); + } + } else { + result.push(child); + } + + i -= 1; + } + + if (i === 0) { + result.push(children[i]); + } + + return result.reverse(); +} +/** + * @param {string} str + * @param {string} prefix + * @returns {string} + */ + + +function indent(str, prefix) { + return str.replace(/\n(?!$)/g, `\n${prefix}`); +} +/** + * @param {any} maybeObj + * @returns {boolean} + */ + + +function isObject(maybeObj) { + return typeof maybeObj === 'object' && maybeObj !== null; +} +/** + * @param {Schema} schema + * @returns {boolean} + */ + + +function likeNumber(schema) { + return schema.type === 'number' || typeof schema.minimum !== 'undefined' || typeof schema.exclusiveMinimum !== 'undefined' || typeof schema.maximum !== 'undefined' || typeof schema.exclusiveMaximum !== 'undefined' || typeof schema.multipleOf !== 'undefined'; +} +/** + * @param {Schema} schema + * @returns {boolean} + */ + + +function likeInteger(schema) { + return schema.type === 'integer' || typeof schema.minimum !== 'undefined' || typeof schema.exclusiveMinimum !== 'undefined' || typeof schema.maximum !== 'undefined' || typeof schema.exclusiveMaximum !== 'undefined' || typeof schema.multipleOf !== 'undefined'; +} +/** + * @param {Schema & {formatMinimum?: string; formatMaximum?: string;}} schema + * @returns {boolean} + */ + + +function likeString(schema) { + return schema.type === 'string' || typeof schema.minLength !== 'undefined' || typeof schema.maxLength !== 'undefined' || typeof schema.pattern !== 'undefined' || typeof schema.format !== 'undefined' || typeof schema.formatMinimum !== 'undefined' || typeof schema.formatMaximum !== 'undefined'; +} +/** + * @param {Schema} schema + * @returns {boolean} + */ + + +function likeBoolean(schema) { + return schema.type === 'boolean'; +} +/** + * @param {Schema} schema + * @returns {boolean} + */ + + +function likeArray(schema) { + return schema.type === 'array' || typeof schema.minItems === 'number' || typeof schema.maxItems === 'number' || typeof schema.uniqueItems !== 'undefined' || typeof schema.items !== 'undefined' || typeof schema.additionalItems !== 'undefined' || typeof schema.contains !== 'undefined'; +} +/** + * @param {Schema & {patternRequired?: Array}} schema + * @returns {boolean} + */ + + +function likeObject(schema) { + return schema.type === 'object' || typeof schema.minProperties !== 'undefined' || typeof schema.maxProperties !== 'undefined' || typeof schema.required !== 'undefined' || typeof schema.properties !== 'undefined' || typeof schema.patternProperties !== 'undefined' || typeof schema.additionalProperties !== 'undefined' || typeof schema.dependencies !== 'undefined' || typeof schema.propertyNames !== 'undefined' || typeof schema.patternRequired !== 'undefined'; +} +/** + * @param {Schema} schema + * @returns {boolean} + */ + + +function likeNull(schema) { + return schema.type === 'null'; +} +/** + * @param {string} type + * @returns {string} + */ + + +function getArticle(type) { + if (/^[aeiou]/i.test(type)) { + return 'an'; + } + + return 'a'; +} +/** + * @param {Schema=} schema + * @returns {string} + */ + + +function getSchemaNonTypes(schema) { + if (!schema) { + return ''; + } + + if (!schema.type) { + if (likeNumber(schema) || likeInteger(schema)) { + return ' | should be any non-number'; + } + + if (likeString(schema)) { + return ' | should be any non-string'; + } + + if (likeArray(schema)) { + return ' | should be any non-array'; + } + + if (likeObject(schema)) { + return ' | should be any non-object'; + } + } + + return ''; +} +/** + * @param {Schema=} schema + * @returns {Array} + */ + + +function numberHints(schema) { + if (!schema) { + return []; + } + + const hints = []; + const range = new Range(); + + if (typeof schema.minimum === 'number') { + range.left(schema.minimum); + } + + if (typeof schema.exclusiveMinimum === 'number') { + range.left(schema.exclusiveMinimum, true); + } + + if (typeof schema.maximum === 'number') { + range.right(schema.maximum); + } + + if (typeof schema.exclusiveMaximum === 'number') { + range.right(schema.exclusiveMaximum, true); + } + + const rangeFormat = range.format(); + + if (rangeFormat) { + hints.push(rangeFormat); + } + + if (typeof schema.multipleOf === 'number') { + hints.push(`should be multiple of ${schema.multipleOf}`); + } + + return hints; +} +/** + * @param {Array} hints + * @returns {string} + */ + + +function formatHints(hints) { + return hints.length > 0 ? `(${hints.join(', ')})` : ''; +} +/** + * @param {Schema} schema + * @returns {string} + */ + + +function getHints(schema) { + if (likeNumber(schema) || likeInteger(schema)) { + return formatHints(numberHints(schema)); + } + + return ''; +} + +class ValidationError extends Error { + /** + * @param {Array} errors + * @param {Schema} schema + * @param {ValidationErrorConfiguration} configuration + */ + constructor(errors, schema, configuration = {}) { + super(); + /** @type {string} */ + + this.name = 'ValidationError'; + /** @type {Array} */ + + this.errors = errors; + /** @type {Schema} */ + + this.schema = schema; + let headerNameFromSchema; + let baseDataPathFromSchema; + + if (schema.title && (!configuration.name || !configuration.baseDataPath)) { + const splittedTitleFromSchema = schema.title.match(/^(.+) (.+)$/); + + if (splittedTitleFromSchema) { + if (!configuration.name) { + [, headerNameFromSchema] = splittedTitleFromSchema; + } + + if (!configuration.name) { + [,, baseDataPathFromSchema] = splittedTitleFromSchema; + } + } + } + /** @type {string} */ + + + this.headerName = configuration.name || headerNameFromSchema || 'Object'; + /** @type {string} */ + + this.baseDataPath = configuration.baseDataPath || baseDataPathFromSchema || 'configuration'; + /** @type {PostFormatter | null} */ + + this.postFormatter = configuration.postFormatter || null; + const header = `Invalid ${this.baseDataPath} object. ${this.headerName} has been initialised using ${getArticle(this.baseDataPath)} ${this.baseDataPath} object that does not match the API schema.\n`; + /** @type {string} */ + + this.message = `${header}${this.formatValidationErrors(errors)}`; + Error.captureStackTrace(this, this.constructor); + } + /** + * @param {string} path + * @returns {Schema} + */ + + + getSchemaPart(path) { + const newPath = path.split('/'); + let schemaPart = this.schema; + + for (let i = 1; i < newPath.length; i++) { + const inner = schemaPart[ + /** @type {keyof Schema} */ + newPath[i]]; + + if (!inner) { + break; + } + + schemaPart = inner; + } + + return schemaPart; + } + /** + * @param {Schema} schema + * @param {Array} prevSchemas + * @returns {string} + */ + + + formatSchema(schema, prevSchemas = []) { + const formatInnerSchema = + /** + * + * @param {Object} innerSchema + * @param {boolean=} addSelf + * @returns {string} + */ + (innerSchema, addSelf) => { + if (!addSelf) { + return this.formatSchema(innerSchema, prevSchemas); + } + + if (prevSchemas.includes(innerSchema)) { + return '(recursive)'; + } + + return this.formatSchema(innerSchema, prevSchemas.concat(schema)); + }; + + if (schema.not && !likeObject(schema)) { + return `non ${formatInnerSchema(schema.not)}`; + } + + if ( + /** @type {Schema & {instanceof: string | Array}} */ + schema.instanceof) { + const { + instanceof: value + } = + /** @type {Schema & {instanceof: string | Array}} */ + schema; + const values = !Array.isArray(value) ? [value] : value; + return values.map( + /** + * @param {string} item + * @returns {string} + */ + item => item === 'Function' ? 'function' : item).join(' | '); + } + + if (schema.enum) { + return ( + /** @type {Array} */ + schema.enum.map(item => JSON.stringify(item)).join(' | ') + ); + } + + if (typeof schema.const !== 'undefined') { + return JSON.stringify(schema.const); + } + + if (schema.oneOf) { + return ( + /** @type {Array} */ + schema.oneOf.map(item => formatInnerSchema(item, true)).join(' | ') + ); + } + + if (schema.anyOf) { + return ( + /** @type {Array} */ + schema.anyOf.map(item => formatInnerSchema(item, true)).join(' | ') + ); + } + + if (schema.allOf) { + return ( + /** @type {Array} */ + schema.allOf.map(item => formatInnerSchema(item, true)).join(' & ') + ); + } + + if ( + /** @type {JSONSchema7} */ + schema.if) { + const { + if: ifValue, + then: thenValue, + else: elseValue + } = + /** @type {JSONSchema7} */ + schema; + return `${ifValue ? `if ${formatInnerSchema(ifValue)}` : ''}${thenValue ? ` then ${formatInnerSchema(thenValue)}` : ''}${elseValue ? ` else ${formatInnerSchema(elseValue)}` : ''}`; + } + + if (schema.$ref) { + return formatInnerSchema(this.getSchemaPart(schema.$ref), true); + } + + if (likeNumber(schema) || likeInteger(schema)) { + const type = schema.type === 'integer' ? 'integer' : 'number'; + const hints = getHints(schema); + return `${type}${hints.length > 0 ? ` ${hints}` : ''}`; + } + + if (likeString(schema)) { + let type = 'string'; + const hints = []; + + if (typeof schema.minLength === 'number') { + if (schema.minLength === 1) { + type = 'non-empty string'; + } else if (schema.minLength !== 0) { + /* if min length === 0 it does not make hint for user */ + const length = schema.minLength - 1; + hints.push(`should be longer than ${length} character${length > 1 ? 's' : ''}`); + } + } + + if (typeof schema.maxLength === 'number') { + if (schema.maxLength === 0) { + type = 'empty string'; + } else { + hints.push(`should be shorter than ${schema.maxLength + 1} characters`); + } + } + + if (schema.pattern) { + hints.push(`should match pattern ${JSON.stringify(schema.pattern)}`); + } + + if (schema.format) { + hints.push(`should match format ${JSON.stringify(schema.format)}`); + } + + if ( + /** @type {Schema & {formatMinimum?: string; formatExclusiveMinimum?: boolean;}} */ + schema.formatMinimum) { + const { + formatExclusiveMinimum, + formatMinimum + } = + /** @type {Schema & {formatMinimum?: string; formatExclusiveMinimum?: boolean;}} */ + schema; + hints.push(`should be ${formatExclusiveMinimum ? '>' : '>='} ${JSON.stringify(formatMinimum)}`); + } + + if ( + /** @type {Schema & {formatMaximum?: string; formatExclusiveMaximum?: boolean;}} */ + schema.formatMaximum) { + const { + formatExclusiveMaximum, + formatMaximum + } = + /** @type {Schema & {formatMaximum?: string; formatExclusiveMaximum?: boolean;}} */ + schema; + hints.push(`should be ${formatExclusiveMaximum ? '<' : '<='} ${JSON.stringify(formatMaximum)}`); + } + + return `${type}${hints.length > 0 ? ` (${hints.join(', ')})` : ''}`; + } + + if (likeBoolean(schema)) { + return 'boolean'; + } + + if (likeArray(schema)) { + const hints = []; + + if (typeof schema.minItems === 'number') { + hints.push(`should not have fewer than ${schema.minItems} item${schema.minItems > 1 ? 's' : ''}`); + } + + if (typeof schema.maxItems === 'number') { + hints.push(`should not have more than ${schema.maxItems} item${schema.maxItems > 1 ? 's' : ''}`); + } + + if (schema.uniqueItems) { + hints.push('should not have duplicate items'); + } + + const hasAdditionalItems = typeof schema.additionalItems === 'undefined' || Boolean(schema.additionalItems); + let items = ''; + + if (schema.items) { + if (Array.isArray(schema.items) && schema.items.length > 0) { + items = `${ + /** @type {Array} */ + schema.items.map(item => formatInnerSchema(item)).join(', ')}`; + + if (hasAdditionalItems) { + if (schema.additionalItems && isObject(schema.additionalItems) && Object.keys(schema.additionalItems).length > 0) { + hints.push(`additional items should be ${formatInnerSchema(schema.additionalItems)}`); + } + } + } else if (schema.items && Object.keys(schema.items).length > 0) { + // "additionalItems" is ignored + items = `${formatInnerSchema(schema.items)}`; + } else { + // Fallback for empty `items` value + items = 'any'; + } + } else { + // "additionalItems" is ignored + items = 'any'; + } + + if (schema.contains && Object.keys(schema.contains).length > 0) { + hints.push(`should contains at least one ${this.formatSchema(schema.contains)} item`); + } + + return `[${items}${hasAdditionalItems ? ', ...' : ''}]${hints.length > 0 ? ` (${hints.join(', ')})` : ''}`; + } + + if (likeObject(schema)) { + const hints = []; + + if (typeof schema.minProperties === 'number') { + hints.push(`should not have fewer than ${schema.minProperties} ${schema.minProperties > 1 ? 'properties' : 'property'}`); + } + + if (typeof schema.maxProperties === 'number') { + hints.push(`should not have more than ${schema.maxProperties} ${schema.minProperties && schema.minProperties > 1 ? 'properties' : 'property'}`); + } + + if (schema.patternProperties && Object.keys(schema.patternProperties).length > 0) { + const patternProperties = Object.keys(schema.patternProperties); + hints.push(`additional property names should match pattern${patternProperties.length > 1 ? 's' : ''} ${patternProperties.map(pattern => JSON.stringify(pattern)).join(' | ')}`); + } + + const properties = schema.properties ? Object.keys(schema.properties) : []; + const required = schema.required ? schema.required : []; + const allProperties = [...new Set( + /** @type {Array} */ + [].concat(required).concat(properties))]; + const objectStructure = allProperties.map(property => { + const isRequired = required.includes(property); // Some properties need quotes, maybe we should add check + // Maybe we should output type of property (`foo: string`), but it is looks very unreadable + + return `${property}${isRequired ? '' : '?'}`; + }).concat(typeof schema.additionalProperties === 'undefined' || Boolean(schema.additionalProperties) ? schema.additionalProperties && isObject(schema.additionalProperties) ? [`: ${formatInnerSchema(schema.additionalProperties)}`] : ['…'] : []).join(', '); + const { + dependencies, + propertyNames, + patternRequired + } = + /** @type {Schema & {patternRequired?: Array;}} */ + schema; + + if (dependencies) { + Object.keys(dependencies).forEach(dependencyName => { + const dependency = dependencies[dependencyName]; + + if (Array.isArray(dependency)) { + hints.push(`should have ${dependency.length > 1 ? 'properties' : 'property'} ${dependency.map(dep => `'${dep}'`).join(', ')} when property '${dependencyName}' is present`); + } else { + hints.push(`should be valid according to the schema ${formatInnerSchema(dependency)} when property '${dependencyName}' is present`); + } + }); + } + + if (propertyNames && Object.keys(propertyNames).length > 0) { + hints.push(`each property name should match format ${JSON.stringify(schema.propertyNames.format)}`); + } + + if (patternRequired && patternRequired.length > 0) { + hints.push(`should have property matching pattern ${patternRequired.map( + /** + * @param {string} item + * @returns {string} + */ + item => JSON.stringify(item))}`); + } + + return `object {${objectStructure ? ` ${objectStructure} ` : ''}}${hints.length > 0 ? ` (${hints.join(', ')})` : ''}`; + } + + if (likeNull(schema)) { + return 'null'; + } + + if (Array.isArray(schema.type)) { + return `${schema.type.join(' | ')}`; + } // Fallback for unknown keywords + + /* istanbul ignore next */ + + + return JSON.stringify(schema, null, 2); + } + /** + * @param {Schema=} schemaPart + * @param {(boolean | Array)=} additionalPath + * @param {boolean=} needDot + * @returns {string} + */ + + + getSchemaPartText(schemaPart, additionalPath, needDot = false) { + if (!schemaPart) { + return ''; + } + + if (Array.isArray(additionalPath)) { + for (let i = 0; i < additionalPath.length; i++) { + /** @type {Schema | undefined} */ + const inner = schemaPart[ + /** @type {keyof Schema} */ + additionalPath[i]]; + + if (inner) { + // eslint-disable-next-line no-param-reassign + schemaPart = inner; + } else { + break; + } + } + } + + while (schemaPart.$ref) { + // eslint-disable-next-line no-param-reassign + schemaPart = this.getSchemaPart(schemaPart.$ref); + } + + let schemaText = `${this.formatSchema(schemaPart)}${needDot ? '.' : ''}`; + + if (schemaPart.description) { + schemaText += `\n-> ${schemaPart.description}`; + } + + return schemaText; + } + /** + * @param {Schema=} schemaPart + * @returns {string} + */ + + + getSchemaPartDescription(schemaPart) { + if (!schemaPart) { + return ''; + } + + while (schemaPart.$ref) { + // eslint-disable-next-line no-param-reassign + schemaPart = this.getSchemaPart(schemaPart.$ref); + } + + if (schemaPart.description) { + return `\n-> ${schemaPart.description}`; + } + + return ''; + } + /** + * @param {SchemaUtilErrorObject} error + * @returns {string} + */ + + + formatValidationError(error) { + const { + keyword, + dataPath: errorDataPath + } = error; + const dataPath = `${this.baseDataPath}${errorDataPath}`; + + switch (keyword) { + case 'type': + { + const { + parentSchema, + params + } = error; // eslint-disable-next-line default-case + + switch ( + /** @type {import("ajv").TypeParams} */ + params.type) { + case 'number': + return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; + + case 'integer': + return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; + + case 'string': + return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; + + case 'boolean': + return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; + + case 'array': + return `${dataPath} should be an array:\n${this.getSchemaPartText(parentSchema)}`; + + case 'object': + return `${dataPath} should be an object:\n${this.getSchemaPartText(parentSchema)}`; + + case 'null': + return `${dataPath} should be a ${this.getSchemaPartText(parentSchema, false, true)}`; + + default: + return `${dataPath} should be:\n${this.getSchemaPartText(parentSchema)}`; + } + } + + case 'instanceof': + { + const { + parentSchema + } = error; + return `${dataPath} should be an instance of ${this.getSchemaPartText(parentSchema)}.`; + } + + case 'pattern': + { + const { + params, + parentSchema + } = error; + const { + pattern + } = + /** @type {import("ajv").PatternParams} */ + params; + return `${dataPath} should match pattern ${JSON.stringify(pattern)}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'format': + { + const { + params, + parentSchema + } = error; + const { + format + } = + /** @type {import("ajv").FormatParams} */ + params; + return `${dataPath} should match format ${JSON.stringify(format)}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'formatMinimum': + case 'formatMaximum': + { + const { + params, + parentSchema + } = error; + const { + comparison, + limit + } = + /** @type {import("ajv").ComparisonParams} */ + params; + return `${dataPath} should be ${comparison} ${JSON.stringify(limit)}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'minimum': + case 'maximum': + case 'exclusiveMinimum': + case 'exclusiveMaximum': + { + const { + parentSchema, + params + } = error; + const { + comparison, + limit + } = + /** @type {import("ajv").ComparisonParams} */ + params; + const hints = numberHints(parentSchema); + + if (hints.length === 0) { + hints.push(`should be ${comparison} ${limit}`); + } + + return `${dataPath} ${hints.join(' ')}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'multipleOf': + { + const { + params, + parentSchema + } = error; + const { + multipleOf + } = + /** @type {import("ajv").MultipleOfParams} */ + params; + return `${dataPath} should be multiple of ${multipleOf}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'patternRequired': + { + const { + params, + parentSchema + } = error; + const { + missingPattern + } = + /** @type {import("ajv").PatternRequiredParams} */ + params; + return `${dataPath} should have property matching pattern ${JSON.stringify(missingPattern)}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'minLength': + { + const { + params, + parentSchema + } = error; + const { + limit + } = + /** @type {import("ajv").LimitParams} */ + params; + + if (limit === 1) { + return `${dataPath} should be an non-empty string${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + const length = limit - 1; + return `${dataPath} should be longer than ${length} character${length > 1 ? 's' : ''}${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'minItems': + { + const { + params, + parentSchema + } = error; + const { + limit + } = + /** @type {import("ajv").LimitParams} */ + params; + + if (limit === 1) { + return `${dataPath} should be an non-empty array${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + return `${dataPath} should not have fewer than ${limit} items${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'minProperties': + { + const { + params, + parentSchema + } = error; + const { + limit + } = + /** @type {import("ajv").LimitParams} */ + params; + + if (limit === 1) { + return `${dataPath} should be an non-empty object${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + return `${dataPath} should not have fewer than ${limit} properties${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'maxLength': + { + const { + params, + parentSchema + } = error; + const { + limit + } = + /** @type {import("ajv").LimitParams} */ + params; + return `${dataPath} should be shorter than ${limit + 1} characters${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'maxItems': + { + const { + params, + parentSchema + } = error; + const { + limit + } = + /** @type {import("ajv").LimitParams} */ + params; + return `${dataPath} should not have more than ${limit} items${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'maxProperties': + { + const { + params, + parentSchema + } = error; + const { + limit + } = + /** @type {import("ajv").LimitParams} */ + params; + return `${dataPath} should not have more than ${limit} properties${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'uniqueItems': + { + const { + params, + parentSchema + } = error; + const { + i + } = + /** @type {import("ajv").UniqueItemsParams} */ + params; + return `${dataPath} should not contain the item '${error.data[i]}' twice${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'additionalItems': + { + const { + params, + parentSchema + } = error; + const { + limit + } = + /** @type {import("ajv").LimitParams} */ + params; + return `${dataPath} should not have more than ${limit} items${getSchemaNonTypes(parentSchema)}. These items are valid:\n${this.getSchemaPartText(parentSchema)}`; + } + + case 'contains': + { + const { + parentSchema + } = error; + return `${dataPath} should contains at least one ${this.getSchemaPartText(parentSchema, ['contains'])} item${getSchemaNonTypes(parentSchema)}.`; + } + + case 'required': + { + const { + parentSchema, + params + } = error; + const missingProperty = + /** @type {import("ajv").DependenciesParams} */ + params.missingProperty.replace(/^\./, ''); + const hasProperty = parentSchema && Boolean( + /** @type {Schema} */ + parentSchema.properties && + /** @type {Schema} */ + parentSchema.properties[missingProperty]); + return `${dataPath} misses the property '${missingProperty}'${getSchemaNonTypes(parentSchema)}.${hasProperty ? ` Should be:\n${this.getSchemaPartText(parentSchema, ['properties', missingProperty])}` : this.getSchemaPartDescription(parentSchema)}`; + } + + case 'additionalProperties': + { + const { + params, + parentSchema + } = error; + const { + additionalProperty + } = + /** @type {import("ajv").AdditionalPropertiesParams} */ + params; + return `${dataPath} has an unknown property '${additionalProperty}'${getSchemaNonTypes(parentSchema)}. These properties are valid:\n${this.getSchemaPartText(parentSchema)}`; + } + + case 'dependencies': + { + const { + params, + parentSchema + } = error; + const { + property, + deps + } = + /** @type {import("ajv").DependenciesParams} */ + params; + const dependencies = deps.split(',').map( + /** + * @param {string} dep + * @returns {string} + */ + dep => `'${dep.trim()}'`).join(', '); + return `${dataPath} should have properties ${dependencies} when property '${property}' is present${getSchemaNonTypes(parentSchema)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'propertyNames': + { + const { + params, + parentSchema, + schema + } = error; + const { + propertyName + } = + /** @type {import("ajv").PropertyNamesParams} */ + params; + return `${dataPath} property name '${propertyName}' is invalid${getSchemaNonTypes(parentSchema)}. Property names should be match format ${JSON.stringify(schema.format)}.${this.getSchemaPartDescription(parentSchema)}`; + } + + case 'enum': + { + const { + parentSchema + } = error; + + if (parentSchema && + /** @type {Schema} */ + parentSchema.enum && + /** @type {Schema} */ + parentSchema.enum.length === 1) { + return `${dataPath} should be ${this.getSchemaPartText(parentSchema, false, true)}`; + } + + return `${dataPath} should be one of these:\n${this.getSchemaPartText(parentSchema)}`; + } + + case 'const': + { + const { + parentSchema + } = error; + return `${dataPath} should be equal to constant ${this.getSchemaPartText(parentSchema)}`; + } + + case 'not': + { + const { + schema, + parentSchema + } = error; + return `${dataPath} should not be ${this.getSchemaPartText(schema)}${parentSchema && likeObject(parentSchema) ? `\n${this.getSchemaPartText(parentSchema)}` : ''}`; + } + + case 'oneOf': + case 'anyOf': + { + const { + parentSchema, + children + } = error; + + if (children && children.length > 0) { + if (error.schema.length === 1) { + const lastChild = children[children.length - 1]; + const remainingChildren = children.slice(0, children.length - 1); + return this.formatValidationError(Object.assign({}, lastChild, { + children: remainingChildren, + parentSchema: Object.assign({}, parentSchema, lastChild.parentSchema) + })); + } + + let filteredChildren = filterChildren(children); + + if (filteredChildren.length === 1) { + return this.formatValidationError(filteredChildren[0]); + } + + filteredChildren = groupChildrenByFirstChild(filteredChildren); + return `${dataPath} should be one of these:\n${this.getSchemaPartText(parentSchema)}\nDetails:\n${filteredChildren.map( + /** + * @param {SchemaUtilErrorObject} nestedError + * @returns {string} + */ + nestedError => ` * ${indent(this.formatValidationError(nestedError), ' ')}`).join('\n')}`; + } + + return `${dataPath} should be one of these:\n${this.getSchemaPartText(parentSchema)}`; + } + + case 'if': + { + const { + params, + parentSchema + } = error; + const { + failingKeyword + } = + /** @type {import("ajv").IfParams} */ + params; + return `${dataPath} should match "${failingKeyword}" schema:\n${this.getSchemaPartText(parentSchema, [failingKeyword])}`; + } + + case 'absolutePath': + { + const { + message, + parentSchema + } = error; + return `${dataPath}: ${message}${this.getSchemaPartDescription(parentSchema)}`; + } + + /* istanbul ignore next */ + + default: + { + const { + message, + parentSchema + } = error; + const ErrorInJSON = JSON.stringify(error, null, 2); // For `custom`, `false schema`, `$ref` keywords + // Fallback for unknown keywords + + return `${dataPath} ${message} (${ErrorInJSON}).\n${this.getSchemaPartText(parentSchema, false)}`; + } + } + } + /** + * @param {Array} errors + * @returns {string} + */ + + + formatValidationErrors(errors) { + return errors.map(error => { + let formattedError = this.formatValidationError(error); + + if (this.postFormatter) { + formattedError = this.postFormatter(formattedError, error); + } + + return ` - ${indent(formattedError, ' ')}`; + }).join('\n'); + } + +} + +var _default = ValidationError; +exports.default = _default; \ No newline at end of file diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/index.js b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/index.js new file mode 100644 index 000000000..e7c679174 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/index.js @@ -0,0 +1,5 @@ +"use strict"; + +const validate = require('./validate'); + +module.exports = validate.default; \ No newline at end of file diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/keywords/absolutePath.js b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/keywords/absolutePath.js new file mode 100644 index 000000000..21acb1333 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/keywords/absolutePath.js @@ -0,0 +1,87 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/** @typedef {import("ajv").Ajv} Ajv */ + +/** @typedef {import("../validate").SchemaUtilErrorObject} SchemaUtilErrorObject */ + +/** + * + * @param {string} data + * @param {object} schema + * @param {string} message + * @returns {object} // Todo `returns` should be `SchemaUtilErrorObject` + */ +function errorMessage(message, schema, data) { + return { + keyword: 'absolutePath', + params: { + absolutePath: data + }, + message, + parentSchema: schema + }; +} +/** + * @param {boolean} shouldBeAbsolute + * @param {object} schema + * @param {string} data + * @returns {object} + */ + + +function getErrorFor(shouldBeAbsolute, schema, data) { + const message = shouldBeAbsolute ? `The provided value ${JSON.stringify(data)} is not an absolute path!` : `A relative path is expected. However, the provided value ${JSON.stringify(data)} is an absolute path!`; + return errorMessage(message, schema, data); +} +/** + * + * @param {Ajv} ajv + * @returns {Ajv} + */ + + +function addAbsolutePathKeyword(ajv) { + ajv.addKeyword('absolutePath', { + errors: true, + type: 'string', + + compile(schema, parentSchema) { + /** + * @param {any} data + * @returns {boolean} + */ + function callback(data) { + let passes = true; + const isExclamationMarkPresent = data.includes('!'); + const isCorrectAbsoluteOrRelativePath = schema === /^(?:[A-Za-z]:\\|\/)/.test(data); + + if (isExclamationMarkPresent) { + callback.errors = [errorMessage(`The provided value ${JSON.stringify(data)} contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.`, parentSchema, data)]; + passes = false; + } + + if (!isCorrectAbsoluteOrRelativePath) { + callback.errors = [getErrorFor(schema, parentSchema, data)]; + passes = false; + } + + return passes; + } + /** @type {null | Array}*/ + + + callback.errors = []; + return callback; + } + + }); + return ajv; +} + +var _default = addAbsolutePathKeyword; +exports.default = _default; \ No newline at end of file diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/util/Range.js b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/util/Range.js new file mode 100644 index 000000000..74bb05724 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/util/Range.js @@ -0,0 +1,163 @@ +"use strict"; + +/** + * @typedef {[number, boolean]} RangeValue + */ + +/** + * @callback RangeValueCallback + * @param {RangeValue} rangeValue + * @returns {boolean} + */ +class Range { + /** + * @param {"left" | "right"} side + * @param {boolean} exclusive + * @returns {">" | ">=" | "<" | "<="} + */ + static getOperator(side, exclusive) { + if (side === 'left') { + return exclusive ? '>' : '>='; + } + + return exclusive ? '<' : '<='; + } + /** + * @param {number} value + * @param {boolean} logic is not logic applied + * @param {boolean} exclusive is range exclusive + * @returns {string} + */ + + + static formatRight(value, logic, exclusive) { + if (logic === false) { + return Range.formatLeft(value, !logic, !exclusive); + } + + return `should be ${Range.getOperator('right', exclusive)} ${value}`; + } + /** + * @param {number} value + * @param {boolean} logic is not logic applied + * @param {boolean} exclusive is range exclusive + * @returns {string} + */ + + + static formatLeft(value, logic, exclusive) { + if (logic === false) { + return Range.formatRight(value, !logic, !exclusive); + } + + return `should be ${Range.getOperator('left', exclusive)} ${value}`; + } + /** + * @param {number} start left side value + * @param {number} end right side value + * @param {boolean} startExclusive is range exclusive from left side + * @param {boolean} endExclusive is range exclusive from right side + * @param {boolean} logic is not logic applied + * @returns {string} + */ + + + static formatRange(start, end, startExclusive, endExclusive, logic) { + let result = 'should be'; + result += ` ${Range.getOperator(logic ? 'left' : 'right', logic ? startExclusive : !startExclusive)} ${start} `; + result += logic ? 'and' : 'or'; + result += ` ${Range.getOperator(logic ? 'right' : 'left', logic ? endExclusive : !endExclusive)} ${end}`; + return result; + } + /** + * @param {Array} values + * @param {boolean} logic is not logic applied + * @return {RangeValue} computed value and it's exclusive flag + */ + + + static getRangeValue(values, logic) { + let minMax = logic ? Infinity : -Infinity; + let j = -1; + const predicate = logic ? + /** @type {RangeValueCallback} */ + ([value]) => value <= minMax : + /** @type {RangeValueCallback} */ + ([value]) => value >= minMax; + + for (let i = 0; i < values.length; i++) { + if (predicate(values[i])) { + [minMax] = values[i]; + j = i; + } + } + + if (j > -1) { + return values[j]; + } + + return [Infinity, true]; + } + + constructor() { + /** @type {Array} */ + this._left = []; + /** @type {Array} */ + + this._right = []; + } + /** + * @param {number} value + * @param {boolean=} exclusive + */ + + + left(value, exclusive = false) { + this._left.push([value, exclusive]); + } + /** + * @param {number} value + * @param {boolean=} exclusive + */ + + + right(value, exclusive = false) { + this._right.push([value, exclusive]); + } + /** + * @param {boolean} logic is not logic applied + * @return {string} "smart" range string representation + */ + + + format(logic = true) { + const [start, leftExclusive] = Range.getRangeValue(this._left, logic); + const [end, rightExclusive] = Range.getRangeValue(this._right, !logic); + + if (!Number.isFinite(start) && !Number.isFinite(end)) { + return ''; + } + + const realStart = leftExclusive ? start + 1 : start; + const realEnd = rightExclusive ? end - 1 : end; // e.g. 5 < x < 7, 5 < x <= 6, 6 <= x <= 6 + + if (realStart === realEnd) { + return `should be ${logic ? '' : '!'}= ${realStart}`; + } // e.g. 4 < x < ∞ + + + if (Number.isFinite(start) && !Number.isFinite(end)) { + return Range.formatLeft(start, logic, leftExclusive); + } // e.g. ∞ < x < 4 + + + if (!Number.isFinite(start) && Number.isFinite(end)) { + return Range.formatRight(end, logic, rightExclusive); + } + + return Range.formatRange(start, end, leftExclusive, rightExclusive, logic); + } + +} + +module.exports = Range; \ No newline at end of file diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/validate.js b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/validate.js new file mode 100644 index 000000000..5af6f431f --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/dist/validate.js @@ -0,0 +1,153 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _ajv = _interopRequireDefault(require("ajv")); + +var _ajvKeywords = _interopRequireDefault(require("ajv-keywords")); + +var _absolutePath = _interopRequireDefault(require("./keywords/absolutePath")); + +var _ValidationError = _interopRequireDefault(require("./ValidationError")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** @typedef {import("json-schema").JSONSchema4} JSONSchema4 */ + +/** @typedef {import("json-schema").JSONSchema6} JSONSchema6 */ + +/** @typedef {import("json-schema").JSONSchema7} JSONSchema7 */ + +/** @typedef {import("ajv").ErrorObject} ErrorObject */ + +/** @typedef {(JSONSchema4 | JSONSchema6 | JSONSchema7)} Schema */ + +/** @typedef {ErrorObject & { children?: Array}} SchemaUtilErrorObject */ + +/** + * @callback PostFormatter + * @param {string} formattedError + * @param {SchemaUtilErrorObject} error + * @returns {string} + */ + +/** + * @typedef {Object} ValidationErrorConfiguration + * @property {string=} name + * @property {string=} baseDataPath + * @property {PostFormatter=} postFormatter + */ +const ajv = new _ajv.default({ + allErrors: true, + verbose: true, + $data: true +}); +(0, _ajvKeywords.default)(ajv, ['instanceof', 'formatMinimum', 'formatMaximum', 'patternRequired']); // Custom keywords + +(0, _absolutePath.default)(ajv); +/** + * @param {Schema} schema + * @param {Array | object} options + * @param {ValidationErrorConfiguration=} configuration + * @returns {void} + */ + +function validate(schema, options, configuration) { + let errors = []; + + if (Array.isArray(options)) { + errors = Array.from(options).map(nestedOptions => validateObject(schema, nestedOptions)); + errors.forEach((list, idx) => { + const applyPrefix = + /** + * @param {SchemaUtilErrorObject} error + */ + error => { + // eslint-disable-next-line no-param-reassign + error.dataPath = `[${idx}]${error.dataPath}`; + + if (error.children) { + error.children.forEach(applyPrefix); + } + }; + + list.forEach(applyPrefix); + }); + errors = errors.reduce((arr, items) => arr.concat(items), []); + } else { + errors = validateObject(schema, options); + } + + if (errors.length > 0) { + throw new _ValidationError.default(errors, schema, configuration); + } +} +/** + * @param {Schema} schema + * @param {Array | object} options + * @returns {Array} + */ + + +function validateObject(schema, options) { + const compiledSchema = ajv.compile(schema); + const valid = compiledSchema(options); + + if (!compiledSchema.errors) { + return []; + } + + return valid ? [] : filterErrors(compiledSchema.errors); +} +/** + * @param {Array} errors + * @returns {Array} + */ + + +function filterErrors(errors) { + /** @type {Array} */ + let newErrors = []; + + for (const error of + /** @type {Array} */ + errors) { + const { + dataPath + } = error; + /** @type {Array} */ + + let children = []; + newErrors = newErrors.filter(oldError => { + if (oldError.dataPath.includes(dataPath)) { + if (oldError.children) { + children = children.concat(oldError.children.slice(0)); + } // eslint-disable-next-line no-undefined, no-param-reassign + + + oldError.children = undefined; + children.push(oldError); + return false; + } + + return true; + }); + + if (children.length) { + error.children = children; + } + + newErrors.push(error); + } + + return newErrors; +} // TODO change after resolve https://github.com/microsoft/TypeScript/issues/34994 + + +validate.ValidationError = _ValidationError.default; +validate.ValidateError = _ValidationError.default; +var _default = validate; +exports.default = _default; \ No newline at end of file diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/node_modules/ajv b/public/node_modules/_schema-utils@2.6.1@schema-utils/node_modules/ajv new file mode 120000 index 000000000..e9bb83cd8 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/node_modules/ajv @@ -0,0 +1 @@ +../../_ajv@6.10.2@ajv \ No newline at end of file diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/node_modules/ajv-keywords b/public/node_modules/_schema-utils@2.6.1@schema-utils/node_modules/ajv-keywords new file mode 120000 index 000000000..8a334a229 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/node_modules/ajv-keywords @@ -0,0 +1 @@ +../../_ajv-keywords@3.4.1@ajv-keywords \ No newline at end of file diff --git a/public/node_modules/_schema-utils@2.6.1@schema-utils/package.json b/public/node_modules/_schema-utils@2.6.1@schema-utils/package.json new file mode 100644 index 000000000..1683df128 --- /dev/null +++ b/public/node_modules/_schema-utils@2.6.1@schema-utils/package.json @@ -0,0 +1,81 @@ +{ + "name": "schema-utils", + "version": "2.6.1", + "description": "webpack Validation Utils", + "license": "MIT", + "repository": "webpack/schema-utils", + "author": "webpack Contrib (https://github.com/webpack-contrib)", + "homepage": "https://github.com/webpack/schema-utils", + "bugs": "https://github.com/webpack/schema-utils/issues", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "main": "dist/index.js", + "types": "declarations/index.d.ts", + "engines": { + "node": ">= 8.9.0" + }, + "scripts": { + "start": "npm run build -- -w", + "clean": "del-cli dist declarations", + "prebuild": "npm run clean", + "build:types": "tsc --declaration --emitDeclarationOnly --outDir declarations && prettier \"declarations/**/*.ts\" --write", + "build:code": "cross-env NODE_ENV=production babel src -d dist --copy-files", + "build": "npm-run-all -p \"build:**\"", + "commitlint": "commitlint --from=master", + "security": "npm audit", + "lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css,ts}\" --list-different", + "lint:js": "eslint --cache .", + "lint:types": "tsc --pretty --noEmit", + "lint": "npm-run-all -l -p \"lint:**\"", + "test:only": "cross-env NODE_ENV=test jest", + "test:watch": "npm run test:only -- --watch", + "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage", + "pretest": "npm run lint", + "test": "npm run test:coverage", + "prepare": "npm run build", + "release": "standard-version", + "defaults": "webpack-defaults" + }, + "files": [ + "dist", + "declarations" + ], + "dependencies": { + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1" + }, + "devDependencies": { + "@babel/cli": "^7.7.4", + "@babel/core": "^7.7.4", + "@babel/preset-env": "^7.7.4", + "@commitlint/cli": "^8.2.0", + "@commitlint/config-conventional": "^8.2.0", + "@types/json-schema": "^7.0.3", + "@webpack-contrib/defaults": "^6.2.0", + "@webpack-contrib/eslint-config-webpack": "^3.0.0", + "babel-jest": "^24.9.0", + "commitlint-azure-pipelines-cli": "^1.0.2", + "cross-env": "^6.0.3", + "del": "^5.1.0", + "del-cli": "^3.0.0", + "eslint": "^6.7.1", + "eslint-config-prettier": "^6.7.0", + "eslint-plugin-import": "^2.18.2", + "husky": "^3.1.0", + "jest": "^24.9.0", + "jest-junit": "^9.0.0", + "lint-staged": "^9.5.0", + "npm-run-all": "^4.1.5", + "prettier": "^1.19.1", + "standard-version": "^7.0.1", + "typescript": "^3.7.2" + }, + "keywords": [ + "webpack" + ], + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "schema-utils@2.6.1", + "_resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.6.1.tgz?cache=0&sync_timestamp=1574946754916&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-2.6.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_semver@6.3.0@semver/CHANGELOG.md b/public/node_modules/_semver@6.3.0@semver/CHANGELOG.md new file mode 100644 index 000000000..f567dd3fe --- /dev/null +++ b/public/node_modules/_semver@6.3.0@semver/CHANGELOG.md @@ -0,0 +1,70 @@ +# changes log + +## 6.2.0 + +* Coerce numbers to strings when passed to semver.coerce() +* Add `rtl` option to coerce from right to left + +## 6.1.3 + +* Handle X-ranges properly in includePrerelease mode + +## 6.1.2 + +* Do not throw when testing invalid version strings + +## 6.1.1 + +* Add options support for semver.coerce() +* Handle undefined version passed to Range.test + +## 6.1.0 + +* Add semver.compareBuild function +* Support `*` in semver.intersects + +## 6.0 + +* Fix `intersects` logic. + + This is technically a bug fix, but since it is also a change to behavior + that may require users updating their code, it is marked as a major + version increment. + +## 5.7 + +* Add `minVersion` method + +## 5.6 + +* Move boolean `loose` param to an options object, with + backwards-compatibility protection. +* Add ability to opt out of special prerelease version handling with + the `includePrerelease` option flag. + +## 5.5 + +* Add version coercion capabilities + +## 5.4 + +* Add intersection checking + +## 5.3 + +* Add `minSatisfying` method + +## 5.2 + +* Add `prerelease(v)` that returns prerelease components + +## 5.1 + +* Add Backus-Naur for ranges +* Remove excessively cute inspection methods + +## 5.0 + +* Remove AMD/Browserified build artifacts +* Fix ltr and gtr when using the `*` range +* Fix for range `*` with a prerelease identifier diff --git a/public/node_modules/_semver@6.3.0@semver/LICENSE b/public/node_modules/_semver@6.3.0@semver/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_semver@6.3.0@semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_semver@6.3.0@semver/README.md b/public/node_modules/_semver@6.3.0@semver/README.md new file mode 100644 index 000000000..2293a14fd --- /dev/null +++ b/public/node_modules/_semver@6.3.0@semver/README.md @@ -0,0 +1,443 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero element in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/public/node_modules/_semver@6.3.0@semver/bin/semver.js b/public/node_modules/_semver@6.3.0@semver/bin/semver.js new file mode 100755 index 000000000..666034a75 --- /dev/null +++ b/public/node_modules/_semver@6.3.0@semver/bin/semver.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var rtl = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '--rtl': + rtl = true + break + case '--ltr': + rtl = false + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v, options) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + '--rtl', + ' Coerce version strings right to left', + '', + '--ltr', + ' Coerce version strings left to right (default)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/public/node_modules/_semver@6.3.0@semver/package.json b/public/node_modules/_semver@6.3.0@semver/package.json new file mode 100644 index 000000000..0726fffb5 --- /dev/null +++ b/public/node_modules/_semver@6.3.0@semver/package.json @@ -0,0 +1,31 @@ +{ + "name": "semver", + "version": "6.3.0", + "description": "The semantic version parser used by npm.", + "main": "semver.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "devDependencies": { + "tap": "^14.3.1" + }, + "license": "ISC", + "repository": "https://github.com/npm/node-semver", + "bin": { + "semver": "./bin/semver.js" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "tap": { + "check-coverage": true + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "semver@6.3.0", + "_resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_semver@6.3.0@semver/range.bnf b/public/node_modules/_semver@6.3.0@semver/range.bnf new file mode 100644 index 000000000..d4c6ae0d7 --- /dev/null +++ b/public/node_modules/_semver@6.3.0@semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/public/node_modules/_semver@6.3.0@semver/semver.js b/public/node_modules/_semver@6.3.0@semver/semver.js new file mode 100644 index 000000000..636fa4365 --- /dev/null +++ b/public/node_modules/_semver@6.3.0@semver/semver.js @@ -0,0 +1,1596 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var t = exports.tokens = {} +var R = 0 + +function tok (n) { + t[n] = R++ +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' + +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' + +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' + +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' + +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' + +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' + +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' + +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAIN] + ')' + + '\\s*$' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(b, a, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + if (this.value === '') { + return true + } + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + pr + } else if (xm) { + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr + } else if (xp) { + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version, options) { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) { + return null + } + + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) +} diff --git a/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/LICENSE b/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/LICENSE new file mode 100644 index 000000000..263382ae7 --- /dev/null +++ b/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/LICENSE @@ -0,0 +1,27 @@ +Copyright 2014 Yahoo! Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the Yahoo! Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. 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/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/README.md b/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/README.md new file mode 100644 index 000000000..810fb5742 --- /dev/null +++ b/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/README.md @@ -0,0 +1,143 @@ +Serialize JavaScript +==================== + +Serialize JavaScript to a _superset_ of JSON that includes regular expressions, dates and functions. + +[![npm Version][npm-badge]][npm] +[![Dependency Status][david-badge]][david] +[![Build Status][travis-badge]][travis] + +## Overview + +The code in this package began its life as an internal module to [express-state][]. To expand its usefulness, it now lives as `serialize-javascript` — an independent package on npm. + +You're probably wondering: **What about `JSON.stringify()`!?** We've found that sometimes we need to serialize JavaScript **functions**, **regexps**, **dates**, **sets** or **maps**. A great example is a web app that uses client-side URL routing where the route definitions are regexps that need to be shared from the server to the client. But this module is also great for communicating between node processes. + +The string returned from this package's single export function is literal JavaScript which can be saved to a `.js` file, or be embedded into an HTML document by making the content of a `' +}); +``` + +The above will produce the following string, HTML-escaped output which is safe to put into an HTML document as it will not cause the inline script element to terminate: + +```js +'{"haxorXSS":"\\u003C\\u002Fscript\\u003E"}' +``` + +> You can pass an optional `unsafe` argument to `serialize()` for straight serialization. + +### Options + +The `serialize()` function accepts an `options` object as its second argument. All options are being defaulted to `undefined`: + +#### `options.space` + +This option is the same as the `space` argument that can be passed to [`JSON.stringify`][JSON.stringify]. It can be used to add whitespace and indentation to the serialized output to make it more readable. + +```js +serialize(obj, {space: 2}); +``` + +#### `options.isJSON` + +This option is a signal to `serialize()` that the object being serialized does not contain any function or regexps values. This enables a hot-path that allows serialization to be over 3x faster. If you're serializing a lot of data, and know its pure JSON, then you can enable this option for a speed-up. + +**Note:** That when using this option, the output will still be escaped to protect against XSS. + +```js +serialize(obj, {isJSON: true}); +``` + +#### `options.unsafe` + +This option is to signal `serialize()` that we want to do a straight conversion, without the XSS protection. This options needs to be explicitly set to `true`. HTML characters and JavaScript line terminators will not be escaped. You will have to roll your own. + +```js +serialize(obj, {unsafe: true}); +``` + +#### `options.ignoreFunction` + +This option is to signal `serialize()` that we do not want serialize JavaScript function. +Just treat function like `JSON.stringify` do, but other features will work as expected. + +```js +serialize(obj, {ignoreFunction: true}); +``` + +## Deserializing + +For some use cases you might also need to deserialize the string. This is explicitly not part of this module. However, you can easily write it yourself: + +```js +function deserialize(serializedJavascript){ + return eval('(' + serializedJavascript + ')'); +} +``` + +**Note:** Don't forget the parentheses around the serialized javascript, as the opening bracket `{` will be considered to be the start of a body. + +## License + +This software is free to use under the Yahoo! Inc. BSD license. +See the [LICENSE file][LICENSE] for license text and copyright information. + + +[npm]: https://www.npmjs.org/package/serialize-javascript +[npm-badge]: https://img.shields.io/npm/v/serialize-javascript.svg?style=flat-square +[david]: https://david-dm.org/yahoo/serialize-javascript +[david-badge]: https://img.shields.io/david/yahoo/serialize-javascript.svg?style=flat-square +[travis]: https://travis-ci.org/yahoo/serialize-javascript +[travis-badge]: https://img.shields.io/travis/yahoo/serialize-javascript.svg?style=flat-square +[express-state]: https://github.com/yahoo/express-state +[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify +[LICENSE]: https://github.com/yahoo/serialize-javascript/blob/master/LICENSE diff --git a/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/index.js b/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/index.js new file mode 100644 index 000000000..35941674a --- /dev/null +++ b/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/index.js @@ -0,0 +1,210 @@ +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + +'use strict'; + +// Generate an internal UID to make the regexp pattern harder to guess. +var UID = Math.floor(Math.random() * 0x10000000000).toString(16); +var PLACE_HOLDER_REGEXP = new RegExp('"@__(F|R|D|M|S|U)-' + UID + '-(\\d+)__@"', 'g'); + +var IS_NATIVE_CODE_REGEXP = /\{\s*\[native code\]\s*\}/g; +var IS_PURE_FUNCTION = /function.*?\(/; +var IS_ARROW_FUNCTION = /.*?=>.*?/; +var UNSAFE_CHARS_REGEXP = /[<>\/\u2028\u2029]/g; + +var RESERVED_SYMBOLS = ['*', 'async']; + +// Mapping of unsafe HTML and invalid JavaScript line terminator chars to their +// Unicode char counterparts which are safe to use in JavaScript strings. +var ESCAPED_CHARS = { + '<' : '\\u003C', + '>' : '\\u003E', + '/' : '\\u002F', + '\u2028': '\\u2028', + '\u2029': '\\u2029' +}; + +function escapeUnsafeChars(unsafeChar) { + return ESCAPED_CHARS[unsafeChar]; +} + +function deleteFunctions(obj){ + var functionKeys = []; + for (var key in obj) { + if (typeof obj[key] === "function") { + functionKeys.push(key); + } + } + for (var i = 0; i < functionKeys.length; i++) { + delete obj[functionKeys[i]]; + } +} + +module.exports = function serialize(obj, options) { + options || (options = {}); + + // Backwards-compatibility for `space` as the second argument. + if (typeof options === 'number' || typeof options === 'string') { + options = {space: options}; + } + + var functions = []; + var regexps = []; + var dates = []; + var maps = []; + var sets = []; + var undefs = []; + + // Returns placeholders for functions and regexps (identified by index) + // which are later replaced by their string representation. + function replacer(key, value) { + + // For nested function + if(options.ignoreFunction){ + deleteFunctions(value); + } + + if (!value && value !== undefined) { + return value; + } + + // If the value is an object w/ a toJSON method, toJSON is called before + // the replacer runs, so we use this[key] to get the non-toJSONed value. + var origValue = this[key]; + var type = typeof origValue; + + if (type === 'object') { + if(origValue instanceof RegExp) { + return '@__R-' + UID + '-' + (regexps.push(origValue) - 1) + '__@'; + } + + if(origValue instanceof Date) { + return '@__D-' + UID + '-' + (dates.push(origValue) - 1) + '__@'; + } + + if(origValue instanceof Map) { + return '@__M-' + UID + '-' + (maps.push(origValue) - 1) + '__@'; + } + + if(origValue instanceof Set) { + return '@__S-' + UID + '-' + (sets.push(origValue) - 1) + '__@'; + } + } + + if (type === 'function') { + return '@__F-' + UID + '-' + (functions.push(origValue) - 1) + '__@'; + } + + if (type === 'undefined') { + return '@__U-' + UID + '-' + (undefs.push(origValue) - 1) + '__@'; + } + + return value; + } + + function serializeFunc(fn) { + var serializedFn = fn.toString(); + if (IS_NATIVE_CODE_REGEXP.test(serializedFn)) { + throw new TypeError('Serializing native function: ' + fn.name); + } + + // pure functions, example: {key: function() {}} + if(IS_PURE_FUNCTION.test(serializedFn)) { + return serializedFn; + } + + // arrow functions, example: arg1 => arg1+5 + if(IS_ARROW_FUNCTION.test(serializedFn)) { + return serializedFn; + } + + var argsStartsAt = serializedFn.indexOf('('); + var def = serializedFn.substr(0, argsStartsAt) + .trim() + .split(' ') + .filter(function(val) { return val.length > 0 }); + + var nonReservedSymbols = def.filter(function(val) { + return RESERVED_SYMBOLS.indexOf(val) === -1 + }); + + // enhanced literal objects, example: {key() {}} + if(nonReservedSymbols.length > 0) { + return (def.indexOf('async') > -1 ? 'async ' : '') + 'function' + + (def.join('').indexOf('*') > -1 ? '*' : '') + + serializedFn.substr(argsStartsAt); + } + + // arrow functions + return serializedFn; + } + + // Check if the parameter is function + if (options.ignoreFunction && typeof obj === "function") { + obj = undefined; + } + // Protects against `JSON.stringify()` returning `undefined`, by serializing + // to the literal string: "undefined". + if (obj === undefined) { + return String(obj); + } + + var str; + + // Creates a JSON string representation of the value. + // NOTE: Node 0.12 goes into slow mode with extra JSON.stringify() args. + if (options.isJSON && !options.space) { + str = JSON.stringify(obj); + } else { + str = JSON.stringify(obj, options.isJSON ? null : replacer, options.space); + } + + // Protects against `JSON.stringify()` returning `undefined`, by serializing + // to the literal string: "undefined". + if (typeof str !== 'string') { + return String(str); + } + + // Replace unsafe HTML and invalid JavaScript line terminator chars with + // their safe Unicode char counterpart. This _must_ happen before the + // regexps and functions are serialized and added back to the string. + if (options.unsafe !== true) { + str = str.replace(UNSAFE_CHARS_REGEXP, escapeUnsafeChars); + } + + if (functions.length === 0 && regexps.length === 0 && dates.length === 0 && maps.length === 0 && sets.length === 0 && undefs.length === 0) { + return str; + } + + // Replaces all occurrences of function, regexp, date, map and set placeholders in the + // JSON string with their string representations. If the original value can + // not be found, then `undefined` is used. + return str.replace(PLACE_HOLDER_REGEXP, function (match, type, valueIndex) { + if (type === 'D') { + return "new Date(\"" + dates[valueIndex].toISOString() + "\")"; + } + + if (type === 'R') { + return "new RegExp(" + serialize(regexps[valueIndex].source) + ", \"" + regexps[valueIndex].flags + "\")"; + } + + if (type === 'M') { + return "new Map(" + serialize(Array.from(maps[valueIndex].entries()), options) + ")"; + } + + if (type === 'S') { + return "new Set(" + serialize(Array.from(sets[valueIndex].values()), options) + ")"; + } + + if (type === 'U') { + return 'undefined' + } + + var fn = functions[valueIndex]; + + return serializeFunc(fn); + }); +} diff --git a/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/package.json b/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/package.json new file mode 100644 index 000000000..8d40f7db3 --- /dev/null +++ b/public/node_modules/_serialize-javascript@2.1.2@serialize-javascript/package.json @@ -0,0 +1,36 @@ +{ + "name": "serialize-javascript", + "version": "2.1.2", + "description": "Serialize JavaScript to a superset of JSON that includes regular expressions and functions.", + "main": "index.js", + "scripts": { + "benchmark": "node -v && node test/benchmark/serialize.js", + "test": "nyc --reporter=lcov mocha test/unit" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/yahoo/serialize-javascript.git" + }, + "keywords": [ + "serialize", + "serialization", + "javascript", + "js", + "json" + ], + "author": "Eric Ferraiuolo ", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/yahoo/serialize-javascript/issues" + }, + "homepage": "https://github.com/yahoo/serialize-javascript", + "devDependencies": { + "benchmark": "^2.1.4", + "chai": "^4.1.0", + "mocha": "^6.2.0", + "nyc": "^14.1.1" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "serialize-javascript@2.1.2", + "_resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-2.1.2.tgz?cache=0&sync_timestamp=1575883294443&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fserialize-javascript%2Fdownload%2Fserialize-javascript-2.1.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/LICENSE b/public/node_modules/_source-list-map@2.0.1@source-list-map/LICENSE new file mode 100644 index 000000000..8df641cb0 --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/LICENSE @@ -0,0 +1,7 @@ +Copyright 2017 JS Foundation + +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/public/node_modules/_source-list-map@2.0.1@source-list-map/README.md b/public/node_modules/_source-list-map@2.0.1@source-list-map/README.md new file mode 100644 index 000000000..c4b0f5aba --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/README.md @@ -0,0 +1,91 @@ +# source-list-map + +## API + +### Example + +``` js +var SourceListMap = require("source-list-map").SourceListMap; + +// Create a new map +var map = new SourceListMap(); + +// Add generated code that is map line to line to some soure +map.add("Generated\ncode1\n", "source-code.js", "Orginal\nsource"); + +// Add generated code that isn't mapped +map.add("Generated\ncode2\n"); + +// Get SourceMap and generated source +map.toStringWithSourceMap({ file: "generated-code.js" }); +// { +// source: 'Generated\ncode1\nGenerated\ncode2\n', +// map: { +// version: 3, +// file: 'generated-code.js', +// sources: [ 'source-code.js' ], +// sourcesContent: [ 'Orginal\nsource' ], +// mappings: 'AAAA;AACA;;;' +// } +// } + +// Convert existing SourceMap into SourceListMap +// (Only the first mapping per line is preserved) +var fromStringWithSourceMap = require("source-list-map").fromStringWithSourceMap; +var map = fromStringWithSourceMap("Generated\ncode", { version: 3, ... }); + +``` + +### `new SourceListMap()` + +### `SourceListMap.prototype.add` + +``` js +SourceListMap.prototype.add(generatedCode: string) +SourceListMap.prototype.add(generatedCode: string, source: string, originalSource: string) +SourceListMap.prototype.add(sourceListMap: SourceListMap) +``` + +Append some stuff. + +### `SourceListMap.prototype.prepend` + +``` js +SourceListMap.prototype.prepend(generatedCode: string) +SourceListMap.prototype.prepend(generatedCode: string, source: string, originalSource: string) +SourceListMap.prototype.prepend(sourceListMap: SourceListMap) +``` + +Prepend some stuff. + +### `SourceListMap.prototype.toString()` + +Get generated code. + +### `SourceListMap.prototype.toStringWithSourceMap` + +``` js +SourceListMap.prototype.toStringWithSourceMap(options: object) +``` + +Get generated code and SourceMap. `options` can contains `file` property which defines the `file` property of the SourceMap. + +### `SourceListMap.prototype.mapGeneratedCode` + +``` js +SourceListMap.prototype.mapGeneratedCode(fn: function) : SourceListMap +``` + +Applies `fn` to each generated code block (per line). The returned value is set as new generated code. Returns a new SourceListMap. + +Removing and adding lines is supported. The SourceMap complexity will increase when doing this. + +## Test + +[![Build Status](https://travis-ci.org/webpack/source-list-map.svg)](https://travis-ci.org/webpack/source-list-map) + +## License + +Copyright (c) 2017 JS Foundation + +MIT (http://www.opensource.org/licenses/mit-license.php) \ No newline at end of file diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/CodeNode.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/CodeNode.js new file mode 100644 index 000000000..201336366 --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/CodeNode.js @@ -0,0 +1,66 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const getNumberOfLines = require("./helpers").getNumberOfLines; +const getUnfinishedLine = require("./helpers").getUnfinishedLine; + +class CodeNode { + constructor(generatedCode) { + this.generatedCode = generatedCode; + } + + clone() { + return new CodeNode(this.generatedCode); + } + + getGeneratedCode() { + return this.generatedCode; + } + + getMappings(mappingsContext) { + const lines = getNumberOfLines(this.generatedCode); + const mapping = Array(lines+1).join(";"); + if(lines > 0) { + mappingsContext.unfinishedGeneratedLine = getUnfinishedLine(this.generatedCode); + if(mappingsContext.unfinishedGeneratedLine > 0) { + return mapping + "A"; + } else { + return mapping; + } + } else { + const prevUnfinished = mappingsContext.unfinishedGeneratedLine; + mappingsContext.unfinishedGeneratedLine += getUnfinishedLine(this.generatedCode); + if(prevUnfinished === 0 && mappingsContext.unfinishedGeneratedLine > 0) { + return "A"; + } else { + return ""; + } + } + } + + addGeneratedCode(generatedCode) { + this.generatedCode += generatedCode; + } + + mapGeneratedCode(fn) { + const generatedCode = fn(this.generatedCode); + return new CodeNode(generatedCode); + } + + getNormalizedNodes() { + return [this]; + } + + merge(otherNode) { + if(otherNode instanceof CodeNode) { + this.generatedCode += otherNode.generatedCode; + return this; + } + return false; + } +} + +module.exports = CodeNode; diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/MappingsContext.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/MappingsContext.js new file mode 100644 index 000000000..9a0c905aa --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/MappingsContext.js @@ -0,0 +1,45 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +class MappingsContext { + constructor() { + this.sourcesIndices = new Map(); + this.sourcesContent = new Map(); + this.hasSourceContent = false; + this.currentOriginalLine = 1; + this.currentSource = 0; + this.unfinishedGeneratedLine = false; + } + + ensureSource(source, originalSource) { + let idx = this.sourcesIndices.get(source); + if(typeof idx === "number") { + return idx; + } + idx = this.sourcesIndices.size; + this.sourcesIndices.set(source, idx); + this.sourcesContent.set(source, originalSource) + if(typeof originalSource === "string") + this.hasSourceContent = true; + return idx; + } + + getArrays() { + const sources = []; + const sourcesContent = []; + + for(const pair of this.sourcesContent) { + sources.push(pair[0]); + sourcesContent.push(pair[1]); + } + + return { + sources, + sourcesContent + }; + } +} +module.exports = MappingsContext; diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SingleLineNode.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SingleLineNode.js new file mode 100644 index 000000000..bbc1b5db9 --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SingleLineNode.js @@ -0,0 +1,93 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const base64VLQ = require("./base64-vlq"); +const getNumberOfLines = require("./helpers").getNumberOfLines; +const getUnfinishedLine = require("./helpers").getUnfinishedLine; + +const LINE_MAPPING = ";AAAA"; + +class SingleLineNode { + + constructor(generatedCode, source, originalSource, line) { + this.generatedCode = generatedCode; + this.originalSource = originalSource; + this.source = source; + this.line = line || 1; + this._numberOfLines = getNumberOfLines(this.generatedCode); + this._endsWithNewLine = generatedCode[generatedCode.length - 1] === "\n"; + } + + clone() { + return new SingleLineNode(this.generatedCode, this.source, this.originalSource, this.line); + } + + getGeneratedCode() { + return this.generatedCode; + } + + getMappings(mappingsContext) { + if(!this.generatedCode) + return ""; + const lines = this._numberOfLines; + const sourceIdx = mappingsContext.ensureSource(this.source, this.originalSource); + let mappings = "A"; // generated column 0 + if(mappingsContext.unfinishedGeneratedLine) + mappings = "," + base64VLQ.encode(mappingsContext.unfinishedGeneratedLine); + mappings += base64VLQ.encode(sourceIdx - mappingsContext.currentSource); // source index + mappings += base64VLQ.encode(this.line - mappingsContext.currentOriginalLine); // original line index + mappings += "A"; // original column 0 + mappingsContext.currentSource = sourceIdx; + mappingsContext.currentOriginalLine = this.line; + const unfinishedGeneratedLine = mappingsContext.unfinishedGeneratedLine = getUnfinishedLine(this.generatedCode) + mappings += Array(lines).join(LINE_MAPPING); + if(unfinishedGeneratedLine === 0) { + mappings += ";"; + } else { + if(lines !== 0) + mappings += LINE_MAPPING; + } + return mappings; + } + + getNormalizedNodes() { + return [this]; + } + + mapGeneratedCode(fn) { + const generatedCode = fn(this.generatedCode); + return new SingleLineNode(generatedCode, this.source, this.originalSource, this.line); + } + + merge(otherNode) { + if(otherNode instanceof SingleLineNode) { + return this.mergeSingleLineNode(otherNode); + } + return false; + } + + mergeSingleLineNode(otherNode) { + if(this.source === otherNode.source && + this.originalSource === otherNode.originalSource) { + if(this.line === otherNode.line) { + this.generatedCode += otherNode.generatedCode; + this._numberOfLines += otherNode._numberOfLines; + this._endsWithNewLine = otherNode._endsWithNewLine; + return this; + } else if(this.line + 1 === otherNode.line && + this._endsWithNewLine && + this._numberOfLines === 1 && + otherNode._numberOfLines <= 1) { + return new SourceNode(this.generatedCode + otherNode.generatedCode, this.source, this.originalSource, this.line); + } + } + return false; + } +} + +module.exports = SingleLineNode; + +const SourceNode = require("./SourceNode"); // circular dependency diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SourceListMap.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SourceListMap.js new file mode 100644 index 000000000..575b2d71f --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SourceListMap.js @@ -0,0 +1,117 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const CodeNode = require("./CodeNode"); +const SourceNode = require("./SourceNode"); +const MappingsContext = require("./MappingsContext"); +const getNumberOfLines = require("./helpers").getNumberOfLines; + +class SourceListMap { + + constructor(generatedCode, source, originalSource) { + if(Array.isArray(generatedCode)) { + this.children = generatedCode; + } else { + this.children = []; + if(generatedCode || source) + this.add(generatedCode, source, originalSource); + } + } + + add(generatedCode, source, originalSource) { + if(typeof generatedCode === "string") { + if(source) { + this.children.push(new SourceNode(generatedCode, source, originalSource)); + } else if(this.children.length > 0 && this.children[this.children.length - 1] instanceof CodeNode) { + this.children[this.children.length - 1].addGeneratedCode(generatedCode); + } else { + this.children.push(new CodeNode(generatedCode)); + } + } else if(generatedCode.getMappings && generatedCode.getGeneratedCode) { + this.children.push(generatedCode); + } else if(generatedCode.children) { + generatedCode.children.forEach(function(sln) { + this.children.push(sln); + }, this); + } else { + throw new Error("Invalid arguments to SourceListMap.protfotype.add: Expected string, Node or SourceListMap"); + } + }; + + preprend(generatedCode, source, originalSource) { + if(typeof generatedCode === "string") { + if(source) { + this.children.unshift(new SourceNode(generatedCode, source, originalSource)); + } else if(this.children.length > 0 && this.children[this.children.length - 1].preprendGeneratedCode) { + this.children[this.children.length - 1].preprendGeneratedCode(generatedCode); + } else { + this.children.unshift(new CodeNode(generatedCode)); + } + } else if(generatedCode.getMappings && generatedCode.getGeneratedCode) { + this.children.unshift(generatedCode); + } else if(generatedCode.children) { + generatedCode.children.slice().reverse().forEach(function(sln) { + this.children.unshift(sln); + }, this); + } else { + throw new Error("Invalid arguments to SourceListMap.protfotype.prerend: Expected string, Node or SourceListMap"); + } + }; + + mapGeneratedCode(fn) { + const normalizedNodes = []; + this.children.forEach(function(sln) { + sln.getNormalizedNodes().forEach(function(newNode) { + normalizedNodes.push(newNode); + }); + }); + const optimizedNodes = []; + normalizedNodes.forEach(function(sln) { + sln = sln.mapGeneratedCode(fn); + if(optimizedNodes.length === 0) { + optimizedNodes.push(sln); + } else { + const last = optimizedNodes[optimizedNodes.length - 1]; + const mergedNode = last.merge(sln); + if(mergedNode) { + optimizedNodes[optimizedNodes.length - 1] = mergedNode; + } else { + optimizedNodes.push(sln); + } + } + }); + return new SourceListMap(optimizedNodes); + }; + + toString() { + return this.children.map(function(sln) { + return sln.getGeneratedCode(); + }).join(""); + }; + + toStringWithSourceMap(options) { + const mappingsContext = new MappingsContext(); + const source = this.children.map(function(sln) { + return sln.getGeneratedCode(); + }).join(""); + const mappings = this.children.map(function(sln) { + return sln.getMappings(mappingsContext); + }).join(""); + const arrays = mappingsContext.getArrays(); + return { + source, + map: { + version: 3, + file: options && options.file, + sources: arrays.sources, + sourcesContent: mappingsContext.hasSourceContent ? arrays.sourcesContent : undefined, + mappings: mappings + } + }; + } +} + +module.exports = SourceListMap; diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SourceNode.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SourceNode.js new file mode 100644 index 000000000..7dd235eb2 --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/SourceNode.js @@ -0,0 +1,129 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const base64VLQ = require("./base64-vlq"); +const getNumberOfLines = require("./helpers").getNumberOfLines; +const getUnfinishedLine = require("./helpers").getUnfinishedLine; + +const LINE_MAPPING = ";AACA"; + +class SourceNode { + + constructor(generatedCode, source, originalSource, startingLine) { + this.generatedCode = generatedCode; + this.originalSource = originalSource; + this.source = source; + this.startingLine = startingLine || 1; + this._numberOfLines = getNumberOfLines(this.generatedCode); + this._endsWithNewLine = generatedCode[generatedCode.length - 1] === "\n"; + } + + clone() { + return new SourceNode(this.generatedCode, this.source, this.originalSource, this.startingLine); + } + + getGeneratedCode() { + return this.generatedCode; + } + + addGeneratedCode(code) { + this.generatedCode += code; + this._numberOfLines += getNumberOfLines(code); + this._endsWithNewLine = code[code.length - 1] === "\n"; + } + + getMappings(mappingsContext) { + if(!this.generatedCode) + return ""; + const lines = this._numberOfLines; + const sourceIdx = mappingsContext.ensureSource(this.source, this.originalSource); + let mappings = "A"; // generated column 0 + if(mappingsContext.unfinishedGeneratedLine) + mappings = "," + base64VLQ.encode(mappingsContext.unfinishedGeneratedLine); + mappings += base64VLQ.encode(sourceIdx - mappingsContext.currentSource); // source index + mappings += base64VLQ.encode(this.startingLine - mappingsContext.currentOriginalLine); // original line index + mappings += "A"; // original column 0 + mappingsContext.currentSource = sourceIdx; + mappingsContext.currentOriginalLine = this.startingLine + lines - 1; + const unfinishedGeneratedLine = mappingsContext.unfinishedGeneratedLine = getUnfinishedLine(this.generatedCode) + mappings += Array(lines).join(LINE_MAPPING); + if(unfinishedGeneratedLine === 0) { + mappings += ";"; + } else { + if(lines !== 0) { + mappings += LINE_MAPPING; + } + mappingsContext.currentOriginalLine++; + } + return mappings; + } + + mapGeneratedCode(fn) { + throw new Error("Cannot map generated code on a SourceMap. Normalize to SingleLineNode first."); + } + + getNormalizedNodes() { + var results = []; + var currentLine = this.startingLine; + var generatedCode = this.generatedCode; + var index = 0; + var indexEnd = generatedCode.length; + while(index < indexEnd) { + // get one generated line + var nextLine = generatedCode.indexOf("\n", index) + 1; + if(nextLine === 0) nextLine = indexEnd; + var lineGenerated = generatedCode.substr(index, nextLine - index); + + results.push(new SingleLineNode(lineGenerated, this.source, this.originalSource, currentLine)); + + // move cursors + index = nextLine; + currentLine++; + } + return results; + } + + merge(otherNode) { + if(otherNode instanceof SourceNode) { + return this.mergeSourceNode(otherNode); + } else if(otherNode instanceof SingleLineNode) { + return this.mergeSingleLineNode(otherNode); + } + return false; + } + + mergeSourceNode(otherNode) { + if(this.source === otherNode.source && + this._endsWithNewLine && + this.startingLine + this._numberOfLines === otherNode.startingLine) { + this.generatedCode += otherNode.generatedCode; + this._numberOfLines += otherNode._numberOfLines; + this._endsWithNewLine = otherNode._endsWithNewLine; + return this; + } + return false; + } + + mergeSingleLineNode(otherNode) { + if(this.source === otherNode.source && + this._endsWithNewLine && + this.startingLine + this._numberOfLines === otherNode.line && + otherNode._numberOfLines <= 1) { + this.addSingleLineNode(otherNode); + return this; + } + return false; + } + + addSingleLineNode(otherNode) { + this.generatedCode += otherNode.generatedCode; + this._numberOfLines += otherNode._numberOfLines + this._endsWithNewLine = otherNode._endsWithNewLine; + } +} + +module.exports = SourceNode; +const SingleLineNode = require("./SingleLineNode"); // circular dependency diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/base64-vlq.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/base64-vlq.js new file mode 100644 index 000000000..4483a507a --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/base64-vlq.js @@ -0,0 +1,169 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/*eslint no-bitwise:0,quotes:0,global-strict:0*/ + +var charToIntMap = {}; +var intToCharMap = {}; + +'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + .split('') + .forEach(function (ch, index) { + charToIntMap[ch] = index; + intToCharMap[index] = ch; + }); + +var base64 = {}; +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +base64.encode = function base64_encode(aNumber) { + if (aNumber in intToCharMap) { + return intToCharMap[aNumber]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); +}; + +/** + * Decode a single base 64 digit to an integer. + */ +base64.decode = function base64_decode(aChar) { + if (aChar in charToIntMap) { + return charToIntMap[aChar]; + } + throw new TypeError("Not a valid base 64 digit: " + aChar); +}; + + + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aOutParam) { + var i = 0; + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (i >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charAt(i++)); + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aStr.slice(i); +}; diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/fromStringWithSourceMap.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/fromStringWithSourceMap.js new file mode 100644 index 000000000..0148d7e97 --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/fromStringWithSourceMap.js @@ -0,0 +1,102 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const base64VLQ = require("./base64-vlq"); +const SourceNode = require("./SourceNode"); +const CodeNode = require("./CodeNode"); +const SourceListMap = require("./SourceListMap"); + +module.exports = function fromStringWithSourceMap(code, map) { + const sources = map.sources; + const sourcesContent = map.sourcesContent; + const mappings = map.mappings.split(";"); + const lines = code.split("\n"); + const nodes = []; + let currentNode = null; + let currentLine = 1; + let currentSourceIdx = 0; + let currentSourceNodeLine; + function addCode(generatedCode) { + if(currentNode && currentNode instanceof CodeNode) { + currentNode.addGeneratedCode(generatedCode); + } else if(currentNode && currentNode instanceof SourceNode && !generatedCode.trim()) { + currentNode.addGeneratedCode(generatedCode); + currentSourceNodeLine++; + } else { + currentNode = new CodeNode(generatedCode); + nodes.push(currentNode); + } + } + function addSource(generatedCode, source, originalSource, linePosition) { + if(currentNode && currentNode instanceof SourceNode && + currentNode.source === source && + currentSourceNodeLine === linePosition + ) { + currentNode.addGeneratedCode(generatedCode); + currentSourceNodeLine++; + } else { + currentNode = new SourceNode(generatedCode, source, originalSource, linePosition); + currentSourceNodeLine = linePosition + 1; + nodes.push(currentNode); + } + } + mappings.forEach(function(mapping, idx) { + let line = lines[idx]; + if(typeof line === 'undefined') return; + if(idx !== lines.length - 1) line += "\n"; + if(!mapping) + return addCode(line); + mapping = { value: 0, rest: mapping }; + let lineAdded = false; + while(mapping.rest) + lineAdded = processMapping(mapping, line, lineAdded) || lineAdded; + if(!lineAdded) + addCode(line); + }); + if(mappings.length < lines.length) { + let idx = mappings.length; + while(!lines[idx].trim() && idx < lines.length-1) { + addCode(lines[idx] + "\n"); + idx++; + } + addCode(lines.slice(idx).join("\n")); + } + return new SourceListMap(nodes); + function processMapping(mapping, line, ignore) { + if(mapping.rest && mapping.rest[0] !== ",") { + base64VLQ.decode(mapping.rest, mapping); + } + if(!mapping.rest) + return false; + if(mapping.rest[0] === ",") { + mapping.rest = mapping.rest.substr(1); + return false; + } + + base64VLQ.decode(mapping.rest, mapping); + const sourceIdx = mapping.value + currentSourceIdx; + currentSourceIdx = sourceIdx; + + let linePosition; + if(mapping.rest && mapping.rest[0] !== ",") { + base64VLQ.decode(mapping.rest, mapping); + linePosition = mapping.value + currentLine; + currentLine = linePosition; + } else { + linePosition = currentLine; + } + + if(mapping.rest) { + const next = mapping.rest.indexOf(","); + mapping.rest = next === -1 ? "" : mapping.rest.substr(next); + } + + if(!ignore) { + addSource(line, sources ? sources[sourceIdx] : null, sourcesContent ? sourcesContent[sourceIdx] : null, linePosition) + return true; + } + } +}; diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/helpers.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/helpers.js new file mode 100644 index 000000000..d0b42923b --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/helpers.js @@ -0,0 +1,23 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +exports.getNumberOfLines = function getNumberOfLines(str) { + let nr = -1; + let idx = -1; + do { + nr++ + idx = str.indexOf("\n", idx + 1); + } while(idx >= 0); + return nr; +}; + +exports.getUnfinishedLine = function getUnfinishedLine(str) { + const idx = str.lastIndexOf("\n"); + if(idx === -1) + return str.length; + else + return str.length - idx - 1; +}; diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/index.js b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/index.js new file mode 100644 index 000000000..c1ad107f3 --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/lib/index.js @@ -0,0 +1,6 @@ +exports.SourceListMap = require("./SourceListMap"); +exports.SourceNode = require("./SourceNode"); +exports.SingleLineNode = require("./SingleLineNode"); +exports.CodeNode = require("./CodeNode"); +exports.MappingsContext = require("./MappingsContext"); +exports.fromStringWithSourceMap = require("./fromStringWithSourceMap"); diff --git a/public/node_modules/_source-list-map@2.0.1@source-list-map/package.json b/public/node_modules/_source-list-map@2.0.1@source-list-map/package.json new file mode 100644 index 000000000..1805b05cc --- /dev/null +++ b/public/node_modules/_source-list-map@2.0.1@source-list-map/package.json @@ -0,0 +1,32 @@ +{ + "name": "source-list-map", + "version": "2.0.1", + "description": "Fast line to line SourceMap generator.", + "author": "Tobias Koppers @sokra", + "main": "lib/index.js", + "scripts": { + "test": "mocha -R spec" + }, + "repository": { + "type": "git", + "url": "https://github.com/webpack/source-list-map.git" + }, + "keywords": [ + "source-map" + ], + "files": [ + "lib" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/webpack/source-list-map/issues" + }, + "homepage": "https://github.com/webpack/source-list-map", + "devDependencies": { + "mocha": "^2.2.1", + "should": "^5.2.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "source-list-map@2.0.1", + "_resolved": "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_source-map-support@0.5.16@source-map-support/LICENSE.md b/public/node_modules/_source-map-support@0.5.16@source-map-support/LICENSE.md new file mode 100644 index 000000000..6247ca912 --- /dev/null +++ b/public/node_modules/_source-map-support@0.5.16@source-map-support/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Evan Wallace + +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/public/node_modules/_source-map-support@0.5.16@source-map-support/README.md b/public/node_modules/_source-map-support@0.5.16@source-map-support/README.md new file mode 100644 index 000000000..40228b791 --- /dev/null +++ b/public/node_modules/_source-map-support@0.5.16@source-map-support/README.md @@ -0,0 +1,284 @@ +# Source Map Support +[![Build Status](https://travis-ci.org/evanw/node-source-map-support.svg?branch=master)](https://travis-ci.org/evanw/node-source-map-support) + +This module provides source map support for stack traces in node via the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen. Source maps are completely general (not specific to any one language) so you can use source maps with multiple compile-to-JS languages in the same node process. + +## Installation and Usage + +#### Node support + +``` +$ npm install source-map-support +``` + +Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler): + +``` +//# sourceMappingURL=path/to/source.map +``` + +If multiple sourceMappingURL comments exist in one file, the last sourceMappingURL comment will be +respected (e.g. if a file mentions the comment in code, or went through multiple transpilers). +The path should either be absolute or relative to the compiled file. + +From here you have two options. + +##### CLI Usage + +```bash +node -r source-map-support/register compiled.js +``` + +##### Programmatic Usage + +Put the following line at the top of the compiled file. + +```js +require('source-map-support').install(); +``` + +It is also possible to install the source map support directly by +requiring the `register` module which can be handy with ES6: + +```js +import 'source-map-support/register' + +// Instead of: +import sourceMapSupport from 'source-map-support' +sourceMapSupport.install() +``` +Note: if you're using babel-register, it includes source-map-support already. + +It is also very useful with Mocha: + +``` +$ mocha --require source-map-support/register tests/ +``` + +#### Browser support + +This library also works in Chrome. While the DevTools console already supports source maps, the V8 engine doesn't and `Error.prototype.stack` will be incorrect without this library. Everything will just work if you deploy your source files using [browserify](http://browserify.org/). Just make sure to pass the `--debug` flag to the browserify command so your source maps are included in the bundled code. + +This library also works if you use another build process or just include the source files directly. In this case, include the file `browser-source-map-support.js` in your page and call `sourceMapSupport.install()`. It contains the whole library already bundled for the browser using browserify. + +```html + + +``` + +This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: + +```html + +``` + +## Options + +This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: + +```js +require('source-map-support').install({ + handleUncaughtExceptions: false +}); +``` + +This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. + +```js +require('source-map-support').install({ + retrieveSourceMap: function(source) { + if (source === 'compiled.js') { + return { + url: 'original.js', + map: fs.readFileSync('compiled.js.map', 'utf8') + }; + } + return null; + } +}); +``` + +The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. +In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. + +```js +require('source-map-support').install({ + environment: 'node' +}); +``` + +To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. + + +```js +require('source-map-support').install({ + hookRequire: true +}); +``` + +This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. + +## Demos + +#### Basic Demo + +original.js: + +```js +throw new Error('test'); // This is the original code +``` + +compiled.js: + +```js +require('source-map-support').install(); + +throw new Error('test'); // This is the compiled code +// The next line defines the sourceMapping. +//# sourceMappingURL=compiled.js.map +``` + +compiled.js.map: + +```json +{ + "version": 3, + "file": "compiled.js", + "sources": ["original.js"], + "names": [], + "mappings": ";;AAAA,MAAM,IAAI" +} +``` + +Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): + +``` +$ node compiled.js + +original.js:1 +throw new Error('test'); // This is the original code + ^ +Error: test + at Object. (original.js:1:7) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### TypeScript Demo + +demo.ts: + +```typescript +declare function require(name: string); +require('source-map-support').install(); +class Foo { + constructor() { this.bar(); } + bar() { throw new Error('this is a demo'); } +} +new Foo(); +``` + +Compile and run the file using the TypeScript compiler from the terminal: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +There is also the option to use `-r source-map-support/register` with typescript, without the need add the `require('source-map-support').install()` in the code base: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node -r source-map-support/register demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### CoffeeScript Demo + +demo.coffee: + +```coffee +require('source-map-support').install() +foo = -> + bar = -> throw new Error 'this is a demo' + bar() +foo() +``` + +Compile and run the file using the CoffeeScript compiler from the terminal: + +```sh +$ npm install source-map-support coffeescript +$ node_modules/.bin/coffee --map --compile demo.coffee +$ node demo.js + +demo.coffee:3 + bar = -> throw new Error 'this is a demo' + ^ +Error: this is a demo + at bar (demo.coffee:3:22) + at foo (demo.coffee:4:3) + at Object. (demo.coffee:5:1) + at Object. (demo.coffee:1:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) +``` + +## Tests + +This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: + +* Build the tests using `build.js` +* Launch the HTTP server (`npm run serve-tests`) and visit + * http://127.0.0.1:1336/amd-test + * http://127.0.0.1:1336/browser-test + * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). +* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ + +## License + +This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/public/node_modules/_source-map-support@0.5.16@source-map-support/browser-source-map-support.js b/public/node_modules/_source-map-support@0.5.16@source-map-support/browser-source-map-support.js new file mode 100644 index 000000000..58be5d792 --- /dev/null +++ b/public/node_modules/_source-map-support@0.5.16@source-map-support/browser-source-map-support.js @@ -0,0 +1,113 @@ +/* + * Support for source maps in V8 stack traces + * https://github.com/evanw/node-source-map-support + */ +/* + The buffer module from node.js, for the browser. + + @author Feross Aboukhadijeh + license MIT +*/ +(this.define||function(G,J){this.sourceMapSupport=J()})("browser-source-map-support",function(G){(function b(p,u,m){function e(d,a){if(!u[d]){if(!p[d]){var l="function"==typeof require&&require;if(!a&&l)return l(d,!0);if(g)return g(d,!0);throw Error("Cannot find module '"+d+"'");}l=u[d]={exports:{}};p[d][0].call(l.exports,function(a){var b=p[d][1][a];return e(b?b:a)},l,l.exports,b,p,u,m)}return u[d].exports}for(var g="function"==typeof require&&require,h=0;hb)return-1;if(58>b)return b-48+52;if(91>b)return b-65;if(123>b)return b-97+26}var g="undefined"!==typeof Uint8Array?Uint8Array:Array;b.toByteArray=function(b){function d(a){r[w++]=a}if(0>16);d((h&65280)>>8);d(h&255)}2===l?(h=e(b.charAt(a))<<2|e(b.charAt(a+1))>>4,d(h&255)):1===l&&(h=e(b.charAt(a))<<10|e(b.charAt(a+1))<<4|e(b.charAt(a+2))>>2,d(h>>8&255),d(h&255));return r};b.fromByteArray=function(b){var d=b.length%3,a="",l;var e=0;for(l=b.length-d;e> +18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63);a+=g}switch(d){case 1:g=b[b.length-1];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<4&63);a+="==";break;case 2:g=(b[b.length-2]<<8)+ +b[b.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<2&63),a+="="}return a}})("undefined"===typeof m?this.base64js={}:m)},{}],3:[function(p,u,m){},{}],4:[function(p,u,m){(function(b){var e=Object.prototype.toString,g="function"===typeof b.alloc&&"function"===typeof b.allocUnsafe&&"function"=== +typeof b.from;u.exports=function(h,d,a){if("number"===typeof h)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===e.call(h).slice(8,-1)){d>>>=0;var l=h.byteLength-d;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===a)a=l;else if(a>>>=0,a>l)throw new RangeError("'length' is out of bounds");return g?b.from(h.slice(d,d+a)):new b(new Uint8Array(h.slice(d,d+a)))}if("string"===typeof h){a=d;if("string"!==typeof a||""===a)a="utf8";if(!b.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding'); +return g?b.from(h,a):new b(h,a)}return g?b.from(h):new b(h)}}).call(this,p("buffer").Buffer)},{buffer:5}],5:[function(p,u,m){function b(f,n,a){if(!(this instanceof b))return new b(f,n,a);var c=typeof f;if("number"===c)var d=0>>0:0;else if("string"===c){if("base64"===n)for(f=(f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")).replace(H,"");0!==f.length%4;)f+="=";d=b.byteLength(f,n)}else if("object"===c&&null!==f)"Buffer"===f.type&&F(f.data)&&(f=f.data),d=0<+f.length?Math.floor(+f.length):0;else throw new TypeError("must start with number, buffer, array or string"); +if(this.length>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");if(b.TYPED_ARRAY_SUPPORT)var k=b._augment(new Uint8Array(d));else k=this,k.length=d,k._isBuffer=!0;if(b.TYPED_ARRAY_SUPPORT&&"number"===typeof f.byteLength)k._set(f);else{var C=f;if(F(C)||b.isBuffer(C)||C&&"object"===typeof C&&"number"===typeof C.length)if(b.isBuffer(f))for(n=0;nf)throw new RangeError("offset is not uint");if(f+n>b)throw new RangeError("Trying to access beyond buffer length");}function h(f,n,a,c,d,k){if(!b.isBuffer(f))throw new TypeError("buffer must be a Buffer instance");if(n>d||nf.length)throw new TypeError("index out of range"); +}function d(f,n,b,a){0>n&&(n=65535+n+1);for(var c=0,d=Math.min(f.length-b,2);c>>8*(a?c:1-c)}function a(f,n,b,a){0>n&&(n=4294967295+n+1);for(var c=0,d=Math.min(f.length-b,4);c>>8*(a?c:3-c)&255}function l(f,n,b,a,c,d){if(n>c||nf.length)throw new TypeError("index out of range");}function r(f,n,b,a,c){c||l(f,n,b,4,3.4028234663852886E38,-3.4028234663852886E38);z.write(f,n,b,a,23,4);return b+4}function q(f, +n,b,a,c){c||l(f,n,b,8,1.7976931348623157E308,-1.7976931348623157E308);z.write(f,n,b,a,52,8);return b+8}function w(f){for(var n=[],b=0;b=a)n.push(a);else{var c=b;55296<=a&&57343>=a&&b++;a=encodeURIComponent(f.slice(c,b+1)).substr(1).split("%");for(c=0;c=b.length||d>=f.length);d++)b[d+ +a]=f[d];return d}function k(f){try{return decodeURIComponent(f)}catch(n){return String.fromCharCode(65533)}}var x=p("base64-js"),z=p("ieee754"),F=p("is-array");m.Buffer=b;m.SlowBuffer=b;m.INSPECT_MAX_BYTES=50;b.poolSize=8192;var D=1073741823;b.TYPED_ARRAY_SUPPORT=function(){try{var f=new ArrayBuffer(0),b=new Uint8Array(f);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(C){return!1}}();b.isBuffer=function(f){return!(null== +f||!f._isBuffer)};b.compare=function(f,a){if(!b.isBuffer(f)||!b.isBuffer(a))throw new TypeError("Arguments must be Buffers");for(var c=f.length,n=a.length,d=0,k=Math.min(c,n);d>>1;break;case "utf8":case "utf-8":b=w(f).length;break;case "base64":b=x.toByteArray(f).length; +break;default:b=f.length}return b};b.prototype.length=void 0;b.prototype.parent=void 0;b.prototype.toString=function(f,b,a){var c=!1;b>>>=0;a=void 0===a||Infinity===a?this.length:a>>>0;f||(f="utf8");0>b&&(b=0);a>this.length&&(a=this.length);if(a<=b)return"";for(;;)switch(f){case "hex":f=b;b=a;a=this.length;if(!f||0>f)f=0;if(!b||0>b||b>a)b=a;c="";for(a=f;ac?"0"+c.toString(16):c.toString(16),c=f+c;return c;case "utf8":case "utf-8":c=f="";for(a=Math.min(this.length,a);b= +this[b]?(f+=k(c)+String.fromCharCode(this[b]),c=""):c+="%"+this[b].toString(16);return f+k(c);case "ascii":return e(this,b,a);case "binary":return e(this,b,a);case "base64":return b=0===b&&a===this.length?x.fromByteArray(this):x.fromByteArray(this.slice(b,a)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,a);a="";for(f=0;fb&&(f+=" ... "));return""};b.prototype.compare=function(f){if(!b.isBuffer(f))throw new TypeError("Argument must be a Buffer");return b.compare(this,f)};b.prototype.get=function(f){console.log(".get() is deprecated. Access using array indexes instead."); +return this.readUInt8(f)};b.prototype.set=function(f,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(f,b)};b.prototype.write=function(f,b,a,d){if(isFinite(b))isFinite(a)||(d=a,a=void 0);else{var n=d;d=b;b=a;a=n}b=Number(b)||0;n=this.length-b;a?(a=Number(a),a>n&&(a=n)):a=n;d=String(d||"utf8").toLowerCase();switch(d){case "hex":b=Number(b)||0;d=this.length-b;a?(a=Number(a),a>d&&(a=d)):a=d;d=f.length;if(0!==d%2)throw Error("Invalid hex string");a>d/ +2&&(a=d/2);for(d=0;d>8;l%=256;n.push(l);n.push(d)}f=c(n,this,b,a,2);break;default:throw new TypeError("Unknown encoding: "+ +d);}return f};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};b.prototype.slice=function(f,a){var c=this.length;f=~~f;a=void 0===a?c:~~a;0>f?(f+=c,0>f&&(f=0)):f>c&&(f=c);0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c);a>>=0;d||h(this,a,c,1,255,0);b.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[c]=a;return c+1};b.prototype.writeUInt16LE=function(a, +c,k){a=+a;c>>>=0;k||h(this,a,c,2,65535,0);b.TYPED_ARRAY_SUPPORT?(this[c]=a,this[c+1]=a>>>8):d(this,a,c,!0);return c+2};b.prototype.writeUInt16BE=function(a,c,k){a=+a;c>>>=0;k||h(this,a,c,2,65535,0);b.TYPED_ARRAY_SUPPORT?(this[c]=a>>>8,this[c+1]=a):d(this,a,c,!1);return c+2};b.prototype.writeUInt32LE=function(f,c,d){f=+f;c>>>=0;d||h(this,f,c,4,4294967295,0);b.TYPED_ARRAY_SUPPORT?(this[c+3]=f>>>24,this[c+2]=f>>>16,this[c+1]=f>>>8,this[c]=f):a(this,f,c,!0);return c+4};b.prototype.writeUInt32BE=function(f, +c,d){f=+f;c>>>=0;d||h(this,f,c,4,4294967295,0);b.TYPED_ARRAY_SUPPORT?(this[c]=f>>>24,this[c+1]=f>>>16,this[c+2]=f>>>8,this[c+3]=f):a(this,f,c,!1);return c+4};b.prototype.writeInt8=function(a,c,d){a=+a;c>>>=0;d||h(this,a,c,1,127,-128);b.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[c]=a;return c+1};b.prototype.writeInt16LE=function(a,c,k){a=+a;c>>>=0;k||h(this,a,c,2,32767,-32768);b.TYPED_ARRAY_SUPPORT?(this[c]=a,this[c+1]=a>>>8):d(this,a,c,!0);return c+2};b.prototype.writeInt16BE=function(a, +c,k){a=+a;c>>>=0;k||h(this,a,c,2,32767,-32768);b.TYPED_ARRAY_SUPPORT?(this[c]=a>>>8,this[c+1]=a):d(this,a,c,!1);return c+2};b.prototype.writeInt32LE=function(c,d,k){c=+c;d>>>=0;k||h(this,c,d,4,2147483647,-2147483648);b.TYPED_ARRAY_SUPPORT?(this[d]=c,this[d+1]=c>>>8,this[d+2]=c>>>16,this[d+3]=c>>>24):a(this,c,d,!0);return d+4};b.prototype.writeInt32BE=function(c,d,k){c=+c;d>>>=0;k||h(this,c,d,4,2147483647,-2147483648);0>c&&(c=4294967295+c+1);b.TYPED_ARRAY_SUPPORT?(this[d]=c>>>24,this[d+1]=c>>>16,this[d+ +2]=c>>>8,this[d+3]=c):a(this,c,d,!1);return d+4};b.prototype.writeFloatLE=function(a,c,b){return r(this,a,c,!0,b)};b.prototype.writeFloatBE=function(a,c,b){return r(this,a,c,!1,b)};b.prototype.writeDoubleLE=function(a,c,b){return q(this,a,c,!0,b)};b.prototype.writeDoubleBE=function(a,c,b){return q(this,a,c,!1,b)};b.prototype.copy=function(a,c,d,k){d||(d=0);k||0===k||(k=this.length);c||(c=0);if(k!==d&&0!==a.length&&0!==this.length){if(kc||c>=a.length)throw new TypeError("targetStart out of bounds"); +if(0>d||d>=this.length)throw new TypeError("sourceStart out of bounds");if(0>k||k>this.length)throw new TypeError("sourceEnd out of bounds");k>this.length&&(k=this.length);a.length-ck||!b.TYPED_ARRAY_SUPPORT)for(var f=0;fc||c>=this.length)throw new TypeError("start out of bounds"); +if(0>b||b>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;c>1,q=-7;d=g?d-1:0;var w=g?-1:1,v=b[e+d];d+=w;g=v&(1<<-q)-1;v>>=-q;for(q+=a;0>=-q;for(q+=h;0>1,v=23===d?Math.pow(2,-24)-Math.pow(2,-77):0;a=h?0:a-1;var c=h?1:-1,k=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,h=q):(h=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-h))&&(h--,l*=2),e=1<=h+w?e+v/l:e+v*Math.pow(2,1-w),2<=e*l&&(h++,l/=2),h+w>=q?(e=0,h=q):1<=h+w?(e=(e*l-1)*Math.pow(2,d),h+=w):(e=e*Math.pow(2,w-1)*Math.pow(2,d),h=0));for(;8<=d;b[g+a]=e&255,a+= +c,e/=256,d-=8);h=h<b?[]:a.slice(c,b-c+1)}a=m.resolve(a).substr(1);b=m.resolve(b).substr(1); +for(var l=d(a.split("/")),w=d(b.split("/")),e=Math.min(l.length,w.length),c=e,k=0;kb&&(b=a.length+b);return a.substr(b,d)}}).call(this,p("g5I+bs"))},{"g5I+bs":9}],9:[function(p,u,m){function b(){}p=u.exports={};p.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(b){return window.setImmediate(b)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var b=[];window.addEventListener("message",function(e){var g=e.source;g!==window&&null!== +g||"process-tick"!==e.data||(e.stopPropagation(),0e?(-e<<1)+1:e<<1;do e=h&31,h>>>=5,0=d)throw Error("Expected more digits in base 64 VLQ value.");var r=b.decode(e.charCodeAt(g++));if(-1===r)throw Error("Invalid base64 digit: "+e.charAt(g-1));var q=!!(r&32);r&=31;a+=r<>1;h.value=1===(a&1)?-e:e;h.rest=g}},{"./base64":12}],12:[function(p, +u,m){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(e){if(0<=e&&e=b?b-65:97<=b&&122>=b?b-97+26:48<=b&&57>=b?b-48+52:43==b?62:47==b?63:-1}},{}],13:[function(p,u,m){function b(e,g,h,d,a,l){var r=Math.floor((g-e)/2)+e,q=a(h,d[r],!0);return 0===q?r:0e?-1:e}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(e,g,h,d){if(0===g.length)return-1;e=b(-1,g.length,e,g,h,d||m.GREATEST_LOWER_BOUND);if(0>e)return-1;for(;0<=e-1&&0===h(g[e],g[e-1],!0);)--e;return e}},{}],14:[function(p,u,m){function b(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var e=p("./util");b.prototype.unsortedForEach=function(b,e){this._array.forEach(b,e)};b.prototype.add=function(b){var g=this._last,d=g.generatedLine, +a=b.generatedLine,l=g.generatedColumn,r=b.generatedColumn;a>d||a==d&&r>=l||0>=e.compareByGeneratedPositionsInflated(g,b)?this._last=b:this._sorted=!1;this._array.push(b)};b.prototype.toArray=function(){this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};m.MappingList=b},{"./util":19}],15:[function(p,u,m){function b(b,e,d){var a=b[e];b[e]=b[d];b[d]=a}function e(g,h,d,a){if(d=h(g[q],r)&&(l+=1,b(g,l,q));b(g,l+1,q);l+=1;e(g,h,d,l-1);e(g,h,l+1,a)}}m.quickSort=function(b,h){e(b,h,0,b.length-1)}},{}],16:[function(p,u,m){function b(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));return null!=c.sections?new h(c,b):new e(c,b)}function e(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version"),e=d.getArg(c,"sources"),w=d.getArg(c,"names",[]),g=d.getArg(c,"sourceRoot",null),h=d.getArg(c,"sourcesContent",null),q=d.getArg(c, +"mappings");c=d.getArg(c,"file",null);if(k!=this._version)throw Error("Unsupported version: "+k);g&&(g=d.normalize(g));e=e.map(String).map(d.normalize).map(function(a){return g&&d.isAbsolute(g)&&d.isAbsolute(a)?d.relative(g,a):a});this._names=l.fromArray(w.map(String),!0);this._sources=l.fromArray(e,!0);this.sourceRoot=g;this.sourcesContent=h;this._mappings=q;this._sourceMapURL=b;this.file=c}function g(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= +null}function h(a,e){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version");c=d.getArg(c,"sections");if(k!=this._version)throw Error("Unsupported version: "+k);this._sources=new l;this._names=new l;var w={line:-1,column:0};this._sections=c.map(function(a){if(a.url)throw Error("Support for url field in sections not implemented.");var c=d.getArg(a,"offset"),k=d.getArg(c,"line"),g=d.getArg(c,"column");if(k=b[c])throw new TypeError("Line must be greater than or equal to 1, got "+ +b[c]);if(0>b[k])throw new TypeError("Column must be greater than or equal to 0, got "+b[k]);return a.search(b,d,e,g)};e.prototype.computeColumnSpans=function(){for(var a=0;a=this._sources.size()&&!this.sourcesContent.some(function(a){return null==a}):!1};e.prototype.sourceContentFor=function(a,b){if(!this.sourcesContent)return null;var c=a;null!=this.sourceRoot&&(c=d.relative(this.sourceRoot,c));if(this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)]; +var k=this.sources,e;for(e=0;e +b||95!==a.charCodeAt(b-1)||95!==a.charCodeAt(b-2)||111!==a.charCodeAt(b-3)||116!==a.charCodeAt(b-4)||111!==a.charCodeAt(b-5)||114!==a.charCodeAt(b-6)||112!==a.charCodeAt(b-7)||95!==a.charCodeAt(b-8)||95!==a.charCodeAt(b-9))return!1;for(b-=10;0<=b;b--)if(36!==a.charCodeAt(b))return!1;return!0}function q(a,b){return a===b?0:null===a?1:null===b?-1:a>b?1:-1}m.getArg=function(a,b,d){if(b in a)return a[b];if(3===arguments.length)return d;throw Error('"'+b+'" is a required argument.');};var w=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, +v=/^data:.+,.+$/;m.urlParse=b;m.urlGenerate=e;m.normalize=g;m.join=h;m.isAbsolute=function(a){return"/"===a.charAt(0)||w.test(a)};m.relative=function(a,b){""===a&&(a=".");a=a.replace(/\/$/,"");for(var c=0;0!==b.indexOf(a+"/");){var d=a.lastIndexOf("/");if(0>d)return b;a=a.slice(0,d);if(a.match(/^([^\/]+:\/)?\/*$/))return b;++c}return Array(c+1).join("../")+b.substr(a.length+1)};p=!("__proto__"in Object.create(null));m.toSetString=p?d:a;m.fromSetString=p?d:l;m.compareByOriginalPositions=function(a, +b,d){var c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;if(0!==c||d)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c)return c;c=a.generatedLine-b.generatedLine;return 0!==c?c:q(a.name,b.name)};m.compareByGeneratedPositionsDeflated=function(a,b,d){var c=a.generatedLine-b.generatedLine;if(0!==c)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c||d)return c;c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine- +b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;return 0!==c?c:q(a.name,b.name)};m.compareByGeneratedPositionsInflated=function(a,b){var c=a.generatedLine-b.generatedLine;if(0!==c)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c)return c;c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;return 0!==c?c:q(a.name,b.name)};m.parseSourceMapInput=function(a){return JSON.parse(a.replace(/^\)]}'[^\n]*\n/, +""))};m.computeSourceURL=function(a,d,l){d=d||"";a&&("/"!==a[a.length-1]&&"/"!==d[0]&&(a+="/"),d=a+d);if(l){a=b(l);if(!a)throw Error("sourceMapURL could not be parsed");a.path&&(l=a.path.lastIndexOf("/"),0<=l&&(a.path=a.path.substring(0,l+1)));d=h(e(a),d)}return g(d)}},{}],20:[function(p,u,m){m.SourceMapGenerator=p("./lib/source-map-generator").SourceMapGenerator;m.SourceMapConsumer=p("./lib/source-map-consumer").SourceMapConsumer;m.SourceNode=p("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16, +"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(p,u,m){(function(b){function e(){return"browser"===f?!0:"node"===f?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function g(a){return function(b){for(var c=0;c";b=this.getLineNumber();null!=b&&(a+=":"+b,(b= +this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?b+="new "+(c||""):c?b+=c:(b+=a,d=!1);else{e=this.getTypeName();"[object Object]"===e&&(e="null");var f=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(b+=e+"."),b+=c,f&&c.indexOf("."+f)!=c.length-f.length-1&&(b+=" [as "+f+"]")):b+=e+"."+(f||"")}d&&(b+=" ("+a+")");return b}function r(a){var b={};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]= +/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=l;return b}function q(c,f){void 0===f&&(f={nextPosition:null,curPosition:null});if(c.isNative())return f.curPosition=null,c;var g=c.getFileName()||c.getScriptNameOrSourceURL();if(g){var h=c.getLineNumber(),k=c.getColumnNumber()-1,l=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/.test(b.version)?0:62;1===h&&k>l&&!e()&&!c.isEval()&&(k-=l);var m=d({source:g,line:h,column:k});f.curPosition=m;c=r(c);var p= +c.getFunctionName;c.getFunctionName=function(){return null==f.nextPosition?p():f.nextPosition.name||p()};c.getFileName=function(){return m.source};c.getLineNumber=function(){return m.line};c.getColumnNumber=function(){return m.column+1};c.getScriptNameOrSourceURL=function(){return m.source};return c}var n=c.isEval()&&c.getEvalOrigin();n&&(n=a(n),c=r(c),c.getEvalOrigin=function(){return n});return c}function w(a,b){H&&(n={},C={});for(var c=(a.name||"Error")+": "+(a.message||""),d={nextPosition:null, +curPosition:null},e=[],f=b.length-1;0<=f;f--)e.push("\n at "+q(b[f],d)),d.nextPosition=d.curPosition;d.curPosition=d.nextPosition=null;return c+e.reverse().join("")}function v(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2];b=+b[3];var d=n[a];if(!d&&u&&u.existsSync(a))try{d=u.readFileSync(a,"utf8")}catch(N){d=""}if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function c(){var a=b.emit;b.emit=function(c){if("uncaughtException"=== +c){var d=arguments[1]&&arguments[1].stack,e=0 C:/dir/file + '/'; // file:///root-dir/file -> /root-dir/file + }); + } + if (path in fileContentsCache) { + return fileContentsCache[path]; + } + + var contents = ''; + try { + if (!fs) { + // Use SJAX if we are in the browser + var xhr = new XMLHttpRequest(); + xhr.open('GET', path, /** async */ false); + xhr.send(null); + if (xhr.readyState === 4 && xhr.status === 200) { + contents = xhr.responseText; + } + } else if (fs.existsSync(path)) { + // Otherwise, use the filesystem + contents = fs.readFileSync(path, 'utf8'); + } + } catch (er) { + /* ignore any errors */ + } + + return fileContentsCache[path] = contents; +}); + +// Support URLs relative to a directory, but be careful about a protocol prefix +// in case we are in the browser (i.e. directories may start with "http://" or "file:///") +function supportRelativeURL(file, url) { + if (!file) return url; + var dir = path.dirname(file); + var match = /^\w+:\/\/[^\/]*/.exec(dir); + var protocol = match ? match[0] : ''; + var startPath = dir.slice(protocol.length); + if (protocol && /^\/\w\:/.test(startPath)) { + // handle file:///C:/ paths + protocol += '/'; + return protocol + path.resolve(dir.slice(protocol.length), url).replace(/\\/g, '/'); + } + return protocol + path.resolve(dir.slice(protocol.length), url); +} + +function retrieveSourceMapURL(source) { + var fileData; + + if (isInBrowser()) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', source, false); + xhr.send(null); + fileData = xhr.readyState === 4 ? xhr.responseText : null; + + // Support providing a sourceMappingURL via the SourceMap header + var sourceMapHeader = xhr.getResponseHeader("SourceMap") || + xhr.getResponseHeader("X-SourceMap"); + if (sourceMapHeader) { + return sourceMapHeader; + } + } catch (e) { + } + } + + // Get the URL of the source map + fileData = retrieveFile(source); + var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg; + // Keep executing the search to find the *last* sourceMappingURL to avoid + // picking up sourceMappingURLs from comments, strings, etc. + var lastMatch, match; + while (match = re.exec(fileData)) lastMatch = match; + if (!lastMatch) return null; + return lastMatch[1]; +}; + +// Can be overridden by the retrieveSourceMap option to install. Takes a +// generated source filename; returns a {map, optional url} object, or null if +// there is no source map. The map field may be either a string or the parsed +// JSON object (ie, it must be a valid argument to the SourceMapConsumer +// constructor). +var retrieveSourceMap = handlerExec(retrieveMapHandlers); +retrieveMapHandlers.push(function(source) { + var sourceMappingURL = retrieveSourceMapURL(source); + if (!sourceMappingURL) return null; + + // Read the contents of the source map + var sourceMapData; + if (reSourceMap.test(sourceMappingURL)) { + // Support source map URL as a data url + var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1); + sourceMapData = bufferFrom(rawData, "base64").toString(); + sourceMappingURL = source; + } else { + // Support source map URLs relative to the source URL + sourceMappingURL = supportRelativeURL(source, sourceMappingURL); + sourceMapData = retrieveFile(sourceMappingURL); + } + + if (!sourceMapData) { + return null; + } + + return { + url: sourceMappingURL, + map: sourceMapData + }; +}); + +function mapSourcePosition(position) { + var sourceMap = sourceMapCache[position.source]; + if (!sourceMap) { + // Call the (overrideable) retrieveSourceMap function to get the source map. + var urlAndMap = retrieveSourceMap(position.source); + if (urlAndMap) { + sourceMap = sourceMapCache[position.source] = { + url: urlAndMap.url, + map: new SourceMapConsumer(urlAndMap.map) + }; + + // Load all sources stored inline with the source map into the file cache + // to pretend like they are already loaded. They may not exist on disk. + if (sourceMap.map.sourcesContent) { + sourceMap.map.sources.forEach(function(source, i) { + var contents = sourceMap.map.sourcesContent[i]; + if (contents) { + var url = supportRelativeURL(sourceMap.url, source); + fileContentsCache[url] = contents; + } + }); + } + } else { + sourceMap = sourceMapCache[position.source] = { + url: null, + map: null + }; + } + } + + // Resolve the source URL relative to the URL of the source map + if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === 'function') { + var originalPosition = sourceMap.map.originalPositionFor(position); + + // Only return the original position if a matching line was found. If no + // matching line is found then we return position instead, which will cause + // the stack trace to print the path and line for the compiled file. It is + // better to give a precise location in the compiled file than a vague + // location in the original file. + if (originalPosition.source !== null) { + originalPosition.source = supportRelativeURL( + sourceMap.url, originalPosition.source); + return originalPosition; + } + } + + return position; +} + +// Parses code generated by FormatEvalOrigin(), a function inside V8: +// https://code.google.com/p/v8/source/browse/trunk/src/messages.js +function mapEvalOrigin(origin) { + // Most eval() calls are in this format + var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin); + if (match) { + var position = mapSourcePosition({ + source: match[2], + line: +match[3], + column: match[4] - 1 + }); + return 'eval at ' + match[1] + ' (' + position.source + ':' + + position.line + ':' + (position.column + 1) + ')'; + } + + // Parse nested eval() calls using recursion + match = /^eval at ([^(]+) \((.+)\)$/.exec(origin); + if (match) { + return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')'; + } + + // Make sure we still return useful information if we didn't find anything + return origin; +} + +// This is copied almost verbatim from the V8 source code at +// https://code.google.com/p/v8/source/browse/trunk/src/messages.js. The +// implementation of wrapCallSite() used to just forward to the actual source +// code of CallSite.prototype.toString but unfortunately a new release of V8 +// did something to the prototype chain and broke the shim. The only fix I +// could find was copy/paste. +function CallSiteToString() { + var fileName; + var fileLocation = ""; + if (this.isNative()) { + fileLocation = "native"; + } else { + fileName = this.getScriptNameOrSourceURL(); + if (!fileName && this.isEval()) { + fileLocation = this.getEvalOrigin(); + fileLocation += ", "; // Expecting source position to follow. + } + + if (fileName) { + fileLocation += fileName; + } else { + // Source code does not originate from a file and is not native, but we + // can still get the source position inside the source string, e.g. in + // an eval string. + fileLocation += ""; + } + var lineNumber = this.getLineNumber(); + if (lineNumber != null) { + fileLocation += ":" + lineNumber; + var columnNumber = this.getColumnNumber(); + if (columnNumber) { + fileLocation += ":" + columnNumber; + } + } + } + + var line = ""; + var functionName = this.getFunctionName(); + var addSuffix = true; + var isConstructor = this.isConstructor(); + var isMethodCall = !(this.isToplevel() || isConstructor); + if (isMethodCall) { + var typeName = this.getTypeName(); + // Fixes shim to be backward compatable with Node v0 to v4 + if (typeName === "[object Object]") { + typeName = "null"; + } + var methodName = this.getMethodName(); + if (functionName) { + if (typeName && functionName.indexOf(typeName) != 0) { + line += typeName + "."; + } + line += functionName; + if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) { + line += " [as " + methodName + "]"; + } + } else { + line += typeName + "." + (methodName || ""); + } + } else if (isConstructor) { + line += "new " + (functionName || ""); + } else if (functionName) { + line += functionName; + } else { + line += fileLocation; + addSuffix = false; + } + if (addSuffix) { + line += " (" + fileLocation + ")"; + } + return line; +} + +function cloneCallSite(frame) { + var object = {}; + Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { + object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; + }); + object.toString = CallSiteToString; + return object; +} + +function wrapCallSite(frame, state) { + // provides interface backward compatibility + if (state === undefined) { + state = { nextPosition: null, curPosition: null } + } + if(frame.isNative()) { + state.curPosition = null; + return frame; + } + + // Most call sites will return the source file from getFileName(), but code + // passed to eval() ending in "//# sourceURL=..." will return the source file + // from getScriptNameOrSourceURL() instead + var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); + if (source) { + var line = frame.getLineNumber(); + var column = frame.getColumnNumber() - 1; + + // Fix position in Node where some (internal) code is prepended. + // See https://github.com/evanw/node-source-map-support/issues/36 + // Header removed in node at ^10.16 || >=11.11.0 + // v11 is not an LTS candidate, we can just test the one version with it. + // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11 + var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/; + var headerLength = noHeader.test(process.version) ? 0 : 62; + if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { + column -= headerLength; + } + + var position = mapSourcePosition({ + source: source, + line: line, + column: column + }); + state.curPosition = position; + frame = cloneCallSite(frame); + var originalFunctionName = frame.getFunctionName; + frame.getFunctionName = function() { + if (state.nextPosition == null) { + return originalFunctionName(); + } + return state.nextPosition.name || originalFunctionName(); + }; + frame.getFileName = function() { return position.source; }; + frame.getLineNumber = function() { return position.line; }; + frame.getColumnNumber = function() { return position.column + 1; }; + frame.getScriptNameOrSourceURL = function() { return position.source; }; + return frame; + } + + // Code called using eval() needs special handling + var origin = frame.isEval() && frame.getEvalOrigin(); + if (origin) { + origin = mapEvalOrigin(origin); + frame = cloneCallSite(frame); + frame.getEvalOrigin = function() { return origin; }; + return frame; + } + + // If we get here then we were unable to change the source position + return frame; +} + +// This function is part of the V8 stack trace API, for more info see: +// https://v8.dev/docs/stack-trace-api +function prepareStackTrace(error, stack) { + if (emptyCacheBetweenOperations) { + fileContentsCache = {}; + sourceMapCache = {}; + } + + var name = error.name || 'Error'; + var message = error.message || ''; + var errorString = name + ": " + message; + + var state = { nextPosition: null, curPosition: null }; + var processedStack = []; + for (var i = stack.length - 1; i >= 0; i--) { + processedStack.push('\n at ' + wrapCallSite(stack[i], state)); + state.nextPosition = state.curPosition; + } + state.curPosition = state.nextPosition = null; + return errorString + processedStack.reverse().join(''); +} + +// Generate position and snippet of original source with pointer +function getErrorSource(error) { + var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); + if (match) { + var source = match[1]; + var line = +match[2]; + var column = +match[3]; + + // Support the inline sourceContents inside the source map + var contents = fileContentsCache[source]; + + // Support files on disk + if (!contents && fs && fs.existsSync(source)) { + try { + contents = fs.readFileSync(source, 'utf8'); + } catch (er) { + contents = ''; + } + } + + // Format the line from the original source code like node does + if (contents) { + var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; + if (code) { + return source + ':' + line + '\n' + code + '\n' + + new Array(column).join(' ') + '^'; + } + } + } + return null; +} + +function printErrorAndExit (error) { + var source = getErrorSource(error); + + // Ensure error is printed synchronously and not truncated + if (process.stderr._handle && process.stderr._handle.setBlocking) { + process.stderr._handle.setBlocking(true); + } + + if (source) { + console.error(); + console.error(source); + } + + console.error(error.stack); + process.exit(1); +} + +function shimEmitUncaughtException () { + var origEmit = process.emit; + + process.emit = function (type) { + if (type === 'uncaughtException') { + var hasStack = (arguments[1] && arguments[1].stack); + var hasListeners = (this.listeners(type).length > 0); + + if (hasStack && !hasListeners) { + return printErrorAndExit(arguments[1]); + } + } + + return origEmit.apply(this, arguments); + }; +} + +var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0); +var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0); + +exports.wrapCallSite = wrapCallSite; +exports.getErrorSource = getErrorSource; +exports.mapSourcePosition = mapSourcePosition; +exports.retrieveSourceMap = retrieveSourceMap; + +exports.install = function(options) { + options = options || {}; + + if (options.environment) { + environment = options.environment; + if (["node", "browser", "auto"].indexOf(environment) === -1) { + throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") + } + } + + // Allow sources to be found by methods other than reading the files + // directly from disk. + if (options.retrieveFile) { + if (options.overrideRetrieveFile) { + retrieveFileHandlers.length = 0; + } + + retrieveFileHandlers.unshift(options.retrieveFile); + } + + // Allow source maps to be found by methods other than reading the files + // directly from disk. + if (options.retrieveSourceMap) { + if (options.overrideRetrieveSourceMap) { + retrieveMapHandlers.length = 0; + } + + retrieveMapHandlers.unshift(options.retrieveSourceMap); + } + + // Support runtime transpilers that include inline source maps + if (options.hookRequire && !isInBrowser()) { + var Module; + try { + Module = require('module'); + } catch (err) { + // NOP: Loading in catch block to convert webpack error to warning. + } + var $compile = Module.prototype._compile; + + if (!$compile.__sourceMapSupport) { + Module.prototype._compile = function(content, filename) { + fileContentsCache[filename] = content; + sourceMapCache[filename] = undefined; + return $compile.call(this, content, filename); + }; + + Module.prototype._compile.__sourceMapSupport = true; + } + } + + // Configure options + if (!emptyCacheBetweenOperations) { + emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? + options.emptyCacheBetweenOperations : false; + } + + // Install the error reformatter + if (!errorFormatterInstalled) { + errorFormatterInstalled = true; + Error.prepareStackTrace = prepareStackTrace; + } + + if (!uncaughtShimInstalled) { + var installHandler = 'handleUncaughtExceptions' in options ? + options.handleUncaughtExceptions : true; + + // Provide the option to not install the uncaught exception handler. This is + // to support other uncaught exception handlers (in test frameworks, for + // example). If this handler is not installed and there are no other uncaught + // exception handlers, uncaught exceptions will be caught by node's built-in + // exception handler and the process will still be terminated. However, the + // generated JavaScript code will be shown above the stack trace instead of + // the original source code. + if (installHandler && hasGlobalProcessEventEmitter()) { + uncaughtShimInstalled = true; + shimEmitUncaughtException(); + } + } +}; + +exports.resetRetrieveHandlers = function() { + retrieveFileHandlers.length = 0; + retrieveMapHandlers.length = 0; + + retrieveFileHandlers = originalRetrieveFileHandlers.slice(0); + retrieveMapHandlers = originalRetrieveMapHandlers.slice(0); + + retrieveSourceMap = handlerExec(retrieveMapHandlers); + retrieveFile = handlerExec(retrieveFileHandlers); +} diff --git a/public/node_modules/_source-map@0.6.1@source-map/CHANGELOG.md b/public/node_modules/_source-map@0.6.1@source-map/CHANGELOG.md new file mode 100644 index 000000000..3a8c066c6 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/CHANGELOG.md @@ -0,0 +1,301 @@ +# Change Log + +## 0.5.6 + +* Fix for regression when people were using numbers as names in source maps. See + #236. + +## 0.5.5 + +* Fix "regression" of unsupported, implementation behavior that half the world + happens to have come to depend on. See #235. + +* Fix regression involving function hoisting in SpiderMonkey. See #233. + +## 0.5.4 + +* Large performance improvements to source-map serialization. See #228 and #229. + +## 0.5.3 + +* Do not include unnecessary distribution files. See + commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. + +## 0.5.2 + +* Include browser distributions of the library in package.json's `files`. See + issue #212. + +## 0.5.1 + +* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See + ff05274becc9e6e1295ed60f3ea090d31d843379. + +## 0.5.0 + +* Node 0.8 is no longer supported. + +* Use webpack instead of dryice for bundling. + +* Big speedups serializing source maps. See pull request #203. + +* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that + explicitly start with the source root. See issue #199. + +## 0.4.4 + +* Fix an issue where using a `SourceMapGenerator` after having created a + `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See + issue #191. + +* Fix an issue with where `SourceMapGenerator` would mistakenly consider + different mappings as duplicates of each other and avoid generating them. See + issue #192. + +## 0.4.3 + +* A very large number of performance improvements, particularly when parsing + source maps. Collectively about 75% of time shaved off of the source map + parsing benchmark! + +* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy + searching in the presence of a column option. See issue #177. + +* Fix a bug with joining a source and its source root when the source is above + the root. See issue #182. + +* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to + determine when all sources' contents are inlined into the source map. See + issue #190. + +## 0.4.2 + +* Add an `.npmignore` file so that the benchmarks aren't pulled down by + dependent projects. Issue #169. + +* Add an optional `column` argument to + `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines + with no mappings. Issues #172 and #173. + +## 0.4.1 + +* Fix accidentally defining a global variable. #170. + +## 0.4.0 + +* The default direction for fuzzy searching was changed back to its original + direction. See #164. + +* There is now a `bias` option you can supply to `SourceMapConsumer` to control + the fuzzy searching direction. See #167. + +* About an 8% speed up in parsing source maps. See #159. + +* Added a benchmark for parsing and generating source maps. + +## 0.3.0 + +* Change the default direction that searching for positions fuzzes when there is + not an exact match. See #154. + +* Support for environments using json2.js for JSON serialization. See #156. + +## 0.2.0 + +* Support for consuming "indexed" source maps which do not have any remote + sections. See pull request #127. This introduces a minor backwards + incompatibility if you are monkey patching `SourceMapConsumer.prototype` + methods. + +## 0.1.43 + +* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue + #148 for some discussion and issues #150, #151, and #152 for implementations. + +## 0.1.42 + +* Fix an issue where `SourceNode`s from different versions of the source-map + library couldn't be used in conjunction with each other. See issue #142. + +## 0.1.41 + +* Fix a bug with getting the source content of relative sources with a "./" + prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). + +* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the + column span of each mapping. + +* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find + all generated positions associated with a given original source and line. + +## 0.1.40 + +* Performance improvements for parsing source maps in SourceMapConsumer. + +## 0.1.39 + +* Fix a bug where setting a source's contents to null before any source content + had been set before threw a TypeError. See issue #131. + +## 0.1.38 + +* Fix a bug where finding relative paths from an empty path were creating + absolute paths. See issue #129. + +## 0.1.37 + +* Fix a bug where if the source root was an empty string, relative source paths + would turn into absolute source paths. Issue #124. + +## 0.1.36 + +* Allow the `names` mapping property to be an empty string. Issue #121. + +## 0.1.35 + +* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` + to specify a path that relative sources in the second parameter should be + relative to. Issue #105. + +* If no file property is given to a `SourceMapGenerator`, then the resulting + source map will no longer have a `null` file property. The property will + simply not exist. Issue #104. + +* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. + Issue #116. + +## 0.1.34 + +* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. + +* Fix bug involving source contents and the + `SourceMapGenerator.prototype.applySourceMap`. Issue #100. + +## 0.1.33 + +* Fix some edge cases surrounding path joining and URL resolution. + +* Add a third parameter for relative path to + `SourceMapGenerator.prototype.applySourceMap`. + +* Fix issues with mappings and EOLs. + +## 0.1.32 + +* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns + (issue 92). + +* Fixed test runner to actually report number of failed tests as its process + exit code. + +* Fixed a typo when reporting bad mappings (issue 87). + +## 0.1.31 + +* Delay parsing the mappings in SourceMapConsumer until queried for a source + location. + +* Support Sass source maps (which at the time of writing deviate from the spec + in small ways) in SourceMapConsumer. + +## 0.1.30 + +* Do not join source root with a source, when the source is a data URI. + +* Extend the test runner to allow running single specific test files at a time. + +* Performance improvements in `SourceNode.prototype.walk` and + `SourceMapConsumer.prototype.eachMapping`. + +* Source map browser builds will now work inside Workers. + +* Better error messages when attempting to add an invalid mapping to a + `SourceMapGenerator`. + +## 0.1.29 + +* Allow duplicate entries in the `names` and `sources` arrays of source maps + (usually from TypeScript) we are parsing. Fixes github issue 72. + +## 0.1.28 + +* Skip duplicate mappings when creating source maps from SourceNode; github + issue 75. + +## 0.1.27 + +* Don't throw an error when the `file` property is missing in SourceMapConsumer, + we don't use it anyway. + +## 0.1.26 + +* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. + +## 0.1.25 + +* Make compatible with browserify + +## 0.1.24 + +* Fix issue with absolute paths and `file://` URIs. See + https://bugzilla.mozilla.org/show_bug.cgi?id=885597 + +## 0.1.23 + +* Fix issue with absolute paths and sourcesContent, github issue 64. + +## 0.1.22 + +* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. + +## 0.1.21 + +* Fixed handling of sources that start with a slash so that they are relative to + the source root's host. + +## 0.1.20 + +* Fixed github issue #43: absolute URLs aren't joined with the source root + anymore. + +## 0.1.19 + +* Using Travis CI to run tests. + +## 0.1.18 + +* Fixed a bug in the handling of sourceRoot. + +## 0.1.17 + +* Added SourceNode.fromStringWithSourceMap. + +## 0.1.16 + +* Added missing documentation. + +* Fixed the generating of empty mappings in SourceNode. + +## 0.1.15 + +* Added SourceMapGenerator.applySourceMap. + +## 0.1.14 + +* The sourceRoot is now handled consistently. + +## 0.1.13 + +* Added SourceMapGenerator.fromSourceMap. + +## 0.1.12 + +* SourceNode now generates empty mappings too. + +## 0.1.11 + +* Added name support to SourceNode. + +## 0.1.10 + +* Added sourcesContent support to the customer and generator. diff --git a/public/node_modules/_source-map@0.6.1@source-map/LICENSE b/public/node_modules/_source-map@0.6.1@source-map/LICENSE new file mode 100644 index 000000000..ed1b7cf27 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +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/public/node_modules/_source-map@0.6.1@source-map/README.md b/public/node_modules/_source-map@0.6.1@source-map/README.md new file mode 100644 index 000000000..fea4beb19 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/README.md @@ -0,0 +1,742 @@ +# Source Map + +[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) + +[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) + +This is a library to generate and consume the source map format +[described here][format]. + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +## Use with Node + + $ npm install source-map + +## Use on the Web + + + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. Line numbers in + this library are 1-based (note that the underlying source map + specification uses 0-based line numbers -- this library handles the + translation). + +* `column`: The column number in the generated source. Column numbers + in this library are 0-based. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. The line number is 1-based. + +* `column`: The column number in the original source, or null if this + information is not available. The column number is 0-based. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: The column number in the original source. The column + number is 0-based. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: Optional. The column number in the original source. The + column number is 0-based. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. The line number is 1-based. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. The column number + is 0-based. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.debug.js b/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.debug.js new file mode 100644 index 000000000..aad0620d7 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.debug.js @@ -0,0 +1,3234 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; + }; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAxNjI0YzcyOTliODg3ZjdiZGY2NCIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIv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gICAgICAgICAgIC0gcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKG1hcHBpbmcuc291cmNlICE9IG51bGwpIHtcbiAgICAgICAgc291cmNlSWR4ID0gdGhpcy5fc291cmNlcy5pbmRleE9mKG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKHNvdXJjZUlkeCAtIHByZXZpb3VzU291cmNlKTtcbiAgICAgICAgcHJldmlvdXNTb3VyY2UgPSBzb3VyY2VJZHg7XG5cbiAgICAgICAgLy8gbGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkIGluIFNvdXJjZU1hcCBzcGVjIHZlcnNpb24gM1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbExpbmUgLSAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbExpbmUpO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lIC0gMTtcblxuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4pO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gbWFwcGluZy5vcmlnaW5hbENvbHVtbjtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuYW1lSWR4ID0gdGhpcy5fbmFtZXMuaW5kZXhPZihtYXBwaW5nLm5hbWUpO1xuICAgICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29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ICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tT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XcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1xuICAgICAgdGhpcy5jaGlsZHJlbi5wdXNoKGFDaHVuayk7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3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WQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.js b/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.js new file mode 100644 index 000000000..b4eb08742 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.js @@ -0,0 +1,3233 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; + }; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; \ No newline at end of file diff --git a/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.min.js b/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.min.js new file mode 100644 index 000000000..c7c72dad8 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/dist/source-map.min.js @@ -0,0 +1,2 @@ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(t){var o=t;null!==n&&(o=i.relative(n,t)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(t);null!=s&&r.setSourceContent(t,s)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(y))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=f(e.source,n.source);return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:f(e.name,n.name)))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=f(e.source,n.source),0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:f(e.name,n.name)))))}function f(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}function m(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}function _(e,n,r){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),r){var a=t(r);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var u=a.path.lastIndexOf("/");u>=0&&(a.path=a.path.substring(0,u+1))}n=s(o(a),n)}return i(n)}n.getArg=r;var v=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,y=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||v.test(e)},n.relative=a;var C=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=C?u:l,n.fromSetString=C?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d,n.parseSourceMapInput=m,n.computeSourceURL=_},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e,n){var r=e;return"string"==typeof e&&(r=a.parseSourceMapInput(e)),null!=r.sections?new s(r,n):new o(r,n)}function o(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var t=a.getArg(r,"version"),o=a.getArg(r,"sources"),i=a.getArg(r,"names",[]),s=a.getArg(r,"sourceRoot",null),u=a.getArg(r,"sourcesContent",null),c=a.getArg(r,"mappings"),g=a.getArg(r,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);s&&(s=a.normalize(s)),o=o.map(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return a.computeSourceURL(s,e,n)}),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=n,this.file=g}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var o=a.getArg(r,"version"),i=a.getArg(r,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);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 r=a.getArg(e,"offset"),o=a.getArg(r,"line"),i=a.getArg(r,"column");if(o=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.prototype._findSourceIndex=function(e){var n=e;if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),A.push(r),"number"==typeof r.originalLine&&S.push(r)}g(A,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,g(S,a.compareByOriginalPositions),this.__originalMappings=S},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=a.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var t=e;null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t));var o;if(null!=this.sourceRoot&&(o=a.urlParse(this.sourceRoot))){var i=t.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!o.path||"/"==o.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(n)return null;throw new Error('"'+t+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 === null) {\n\t return 1; // aStr2 !== null\n\t }\n\t\n\t if (aStr2 === null) {\n\t return -1; // aStr1 !== null\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t\n\t/**\n\t * Strip any JSON XSSI avoidance prefix from the string (as documented\n\t * in the source maps specification), and then parse the string as\n\t * JSON.\n\t */\n\tfunction parseSourceMapInput(str) {\n\t return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n\t}\n\texports.parseSourceMapInput = parseSourceMapInput;\n\t\n\t/**\n\t * Compute the URL of a source given the the source root, the source's\n\t * URL, and the source map's URL.\n\t */\n\tfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n\t sourceURL = sourceURL || '';\n\t\n\t if (sourceRoot) {\n\t // This follows what Chrome does.\n\t if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n\t sourceRoot += '/';\n\t }\n\t // The spec says:\n\t // Line 4: An optional source root, useful for relocating source\n\t // files on a server or removing repeated values in the\n\t // “sources” entry. This value is prepended to the individual\n\t // entries in the “source” field.\n\t sourceURL = sourceRoot + sourceURL;\n\t }\n\t\n\t // Historically, SourceMapConsumer did not take the sourceMapURL as\n\t // a parameter. This mode is still somewhat supported, which is why\n\t // this code block is conditional. However, it's preferable to pass\n\t // the source map URL to SourceMapConsumer, so that this function\n\t // can implement the source URL resolution algorithm as outlined in\n\t // the spec. This block is basically the equivalent of:\n\t // new URL(sourceURL, sourceMapURL).toString()\n\t // ... except it avoids using URL, which wasn't available in the\n\t // older releases of node still supported by this library.\n\t //\n\t // The spec says:\n\t // If the sources are not absolute URLs after prepending of the\n\t // “sourceRoot”, the sources are resolved relative to the\n\t // SourceMap (like resolving script src in a html document).\n\t if (sourceMapURL) {\n\t var parsed = urlParse(sourceMapURL);\n\t if (!parsed) {\n\t throw new Error(\"sourceMapURL could not be parsed\");\n\t }\n\t if (parsed.path) {\n\t // Strip the last path component, but keep the \"/\".\n\t var index = parsed.path.lastIndexOf('/');\n\t if (index >= 0) {\n\t parsed.path = parsed.path.substring(0, index + 1);\n\t }\n\t }\n\t sourceURL = join(urlGenerate(parsed), sourceURL);\n\t }\n\t\n\t return normalize(sourceURL);\n\t}\n\texports.computeSourceURL = computeSourceURL;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n\t : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number is 1-based.\n\t * - column: Optional. the column number in the original source.\n\t * The column number is 0-based.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t needle.source = this._findSourceIndex(needle.source);\n\t if (needle.source < 0) {\n\t return [];\n\t }\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The first parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t if (sourceRoot) {\n\t sourceRoot = util.normalize(sourceRoot);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this._absoluteSources = this._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this._sourceMapURL = aSourceMapURL;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Utility function to find the index of a source. Returns -1 if not\n\t * found.\n\t */\n\tBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t if (this._sources.has(relativeSource)) {\n\t return this._sources.indexOf(relativeSource);\n\t }\n\t\n\t // Maybe aSource is an absolute URL as returned by |sources|. In\n\t // this case we can't simply undo the transform.\n\t var i;\n\t for (i = 0; i < this._absoluteSources.length; ++i) {\n\t if (this._absoluteSources[i] == aSource) {\n\t return i;\n\t }\n\t }\n\t\n\t return -1;\n\t};\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @param String aSourceMapURL\n\t * The URL at which the source map can be found (optional)\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t smc._sourceMapURL = aSourceMapURL;\n\t smc._absoluteSources = smc._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._absoluteSources.slice();\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t var index = this._findSourceIndex(aSource);\n\t if (index >= 0) {\n\t return this.sourcesContent[index];\n\t }\n\t\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + relativeSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t source = this._findSourceIndex(source);\n\t if (source < 0) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The first parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based. \n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = null;\n\t if (mapping.name) {\n\t name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t }\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0fd5815da764db5fb9fe","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // “sources” entry. This value is prepended to the individual\n // entries in the “source” field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // “sourceRoot”, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/array-set.js b/public/node_modules/_source-map@0.6.1@source-map/lib/array-set.js new file mode 100644 index 000000000..fbd5c81ca --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/base64-vlq.js b/public/node_modules/_source-map@0.6.1@source-map/lib/base64-vlq.js new file mode 100644 index 000000000..612b40401 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/base64.js b/public/node_modules/_source-map@0.6.1@source-map/lib/base64.js new file mode 100644 index 000000000..8aa86b302 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/binary-search.js b/public/node_modules/_source-map@0.6.1@source-map/lib/binary-search.js new file mode 100644 index 000000000..010ac941e --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/mapping-list.js b/public/node_modules/_source-map@0.6.1@source-map/lib/mapping-list.js new file mode 100644 index 000000000..06d1274a0 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/quick-sort.js b/public/node_modules/_source-map@0.6.1@source-map/lib/quick-sort.js new file mode 100644 index 000000000..6a7caadbb --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/quick-sort.js @@ -0,0 +1,114 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/source-map-consumer.js b/public/node_modules/_source-map@0.6.1@source-map/lib/source-map-consumer.js new file mode 100644 index 000000000..7b99d1da7 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/source-map-consumer.js @@ -0,0 +1,1145 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/source-map-generator.js b/public/node_modules/_source-map@0.6.1@source-map/lib/source-map-generator.js new file mode 100644 index 000000000..508bcfbbc --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/source-map-generator.js @@ -0,0 +1,425 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/source-node.js b/public/node_modules/_source-map@0.6.1@source-map/lib/source-node.js new file mode 100644 index 000000000..8bcdbe385 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/public/node_modules/_source-map@0.6.1@source-map/lib/util.js b/public/node_modules/_source-map@0.6.1@source-map/lib/util.js new file mode 100644 index 000000000..3ca92e56f --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/lib/util.js @@ -0,0 +1,488 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +} +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; + +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; diff --git a/public/node_modules/_source-map@0.6.1@source-map/package.json b/public/node_modules/_source-map@0.6.1@source-map/package.json new file mode 100644 index 000000000..1910deb73 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/package.json @@ -0,0 +1,76 @@ +{ + "name": "source-map", + "description": "Generates and consumes source maps", + "version": "0.6.1", + "homepage": "https://github.com/mozilla/source-map", + "author": "Nick Fitzgerald ", + "contributors": [ + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": { + "type": "git", + "url": "http://github.com/mozilla/source-map.git" + }, + "main": "./source-map.js", + "files": [ + "source-map.js", + "source-map.d.ts", + "lib/", + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "typings": "source-map", + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "source-map@0.6.1", + "_resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_source-map@0.6.1@source-map/source-map.d.ts b/public/node_modules/_source-map@0.6.1@source-map/source-map.d.ts new file mode 100644 index 000000000..8f972b0cf --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/source-map.d.ts @@ -0,0 +1,98 @@ +export interface StartOfSourceMap { + file?: string; + sourceRoot?: string; +} + +export interface RawSourceMap extends StartOfSourceMap { + version: string; + sources: string[]; + names: string[]; + sourcesContent?: string[]; + mappings: string; +} + +export interface Position { + line: number; + column: number; +} + +export interface LineRange extends Position { + lastColumn: number; +} + +export interface FindPosition extends Position { + // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND + bias?: number; +} + +export interface SourceFindPosition extends FindPosition { + source: string; +} + +export interface MappedPosition extends Position { + source: string; + name?: string; +} + +export interface MappingItem { + source: string; + generatedLine: number; + generatedColumn: number; + originalLine: number; + originalColumn: number; + name: string; +} + +export class SourceMapConsumer { + static GENERATED_ORDER: number; + static ORIGINAL_ORDER: number; + + static GREATEST_LOWER_BOUND: number; + static LEAST_UPPER_BOUND: number; + + constructor(rawSourceMap: RawSourceMap); + computeColumnSpans(): void; + originalPositionFor(generatedPosition: FindPosition): MappedPosition; + generatedPositionFor(originalPosition: SourceFindPosition): LineRange; + allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; + hasContentsOfAllSources(): boolean; + sourceContentFor(source: string, returnNullOnMissing?: boolean): string; + eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; +} + +export interface Mapping { + generated: Position; + original: Position; + source: string; + name?: string; +} + +export class SourceMapGenerator { + constructor(startOfSourceMap?: StartOfSourceMap); + static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; + addMapping(mapping: Mapping): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; + toString(): string; +} + +export interface CodeWithSourceMap { + code: string; + map: SourceMapGenerator; +} + +export class SourceNode { + constructor(); + constructor(line: number, column: number, source: string); + constructor(line: number, column: number, source: string, chunk?: string, name?: string); + static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; + add(chunk: string): void; + prepend(chunk: string): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + walk(fn: (chunk: string, mapping: MappedPosition) => void): void; + walkSourceContents(fn: (file: string, content: string) => void): void; + join(sep: string): SourceNode; + replaceRight(pattern: string, replacement: string): SourceNode; + toString(): string; + toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; +} diff --git a/public/node_modules/_source-map@0.6.1@source-map/source-map.js b/public/node_modules/_source-map@0.6.1@source-map/source-map.js new file mode 100644 index 000000000..bc88fe820 --- /dev/null +++ b/public/node_modules/_source-map@0.6.1@source-map/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/public/node_modules/_ssri@7.1.0@ssri/CHANGELOG.md b/public/node_modules/_ssri@7.1.0@ssri/CHANGELOG.md new file mode 100644 index 000000000..1d5447aea --- /dev/null +++ b/public/node_modules/_ssri@7.1.0@ssri/CHANGELOG.md @@ -0,0 +1,323 @@ +# Changelog + +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. + +## [7.1.0](https://github.com/npm/ssri/compare/v7.0.1...v7.1.0) (2019-10-24) + + +### Bug Fixes + +* Do not blow up if the opts object is mutated ([806e8c8](https://github.com/npm/ssri/commit/806e8c8)) + + +### Features + +* Add Integrity#merge method ([0572c1d](https://github.com/npm/ssri/commit/0572c1d)), closes [#4](https://github.com/npm/ssri/issues/4) + +### [7.0.1](https://github.com/npm/ssri/compare/v7.0.0...v7.0.1) (2019-09-30) + +## [7.0.0](https://github.com/npm/ssri/compare/v6.0.1...v7.0.0) (2019-09-18) + + +### ⚠ BREAKING CHANGES + +* ssri no longer accepts a Promise option, and does not +use, return, or rely on Bluebird promises. +* drop support for Node.js v6. + +We knew this was coming, and the Stream changes are breaking anyway. +May as well do this now. +* **streams:** this replaces the Node.js stream with a Minipass +stream. See http://npm.im/minipass for documentation. + +### Bug Fixes + +* return super.write() return value ([55b055d](https://github.com/npm/ssri/commit/55b055d)) + + +* Use native promises only ([6d13165](https://github.com/npm/ssri/commit/6d13165)) +* update tap, standard, standard-version, travis ([2e54956](https://github.com/npm/ssri/commit/2e54956)) +* **streams:** replace transform streams with minipass ([363995e](https://github.com/npm/ssri/commit/363995e)) + + +## [6.0.1](https://github.com/npm/ssri/compare/v6.0.0...v6.0.1) (2018-08-27) + + +### Bug Fixes + +* **opts:** use figgy-pudding to specify consumed opts ([cf86553](https://github.com/npm/ssri/commit/cf86553)) + + + + +# [6.0.0](https://github.com/npm/ssri/compare/v5.3.0...v6.0.0) (2018-04-09) + + +### Bug Fixes + +* **docs:** minor typo ([b71ef17](https://github.com/npm/ssri/commit/b71ef17)) + + +### meta + +* drop support for node@4 ([d9bf359](https://github.com/npm/ssri/commit/d9bf359)) + + +### BREAKING CHANGES + +* node@4 is no longer supported + + + + +# [5.3.0](https://github.com/npm/ssri/compare/v5.2.4...v5.3.0) (2018-03-13) + + +### Features + +* **checkData:** optionally throw when checkData fails ([bf26b84](https://github.com/npm/ssri/commit/bf26b84)) + + + + +## [5.2.4](https://github.com/npm/ssri/compare/v5.2.3...v5.2.4) (2018-02-16) + + + + +## [5.2.3](https://github.com/npm/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/npm/ssri/commit/2fa30b8)) +* **integrityStream:** dedupe algorithms to generate ([d56c654](https://github.com/npm/ssri/commit/d56c654)) + + + + +## [5.2.2](https://github.com/npm/ssri/compare/v5.2.1...v5.2.2) (2018-02-14) + + +### Bug Fixes + +* **security:** tweak strict SRI regex ([#10](https://github.com/npm/ssri/issues/10)) ([d0ebcdc](https://github.com/npm/ssri/commit/d0ebcdc)) + + + + +## [5.2.1](https://github.com/npm/ssri/compare/v5.2.0...v5.2.1) (2018-02-06) + + + + +# [5.2.0](https://github.com/npm/ssri/compare/v5.1.0...v5.2.0) (2018-02-06) + + +### Features + +* **match:** add integrity.match() ([3c49cc4](https://github.com/npm/ssri/commit/3c49cc4)) + + + + +# [5.1.0](https://github.com/npm/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/npm/ssri/commit/d262910)) + + +### Features + +* **sha3:** do some guesswork about upcoming sha3 ([7fdd9df](https://github.com/npm/ssri/commit/7fdd9df)) + + + + +# [5.0.0](https://github.com/npm/ssri/compare/v4.1.6...v5.0.0) (2017-10-23) + + +### Features + +* **license:** relicense to ISC (#9) ([c82983a](https://github.com/npm/ssri/commit/c82983a)) + + +### BREAKING CHANGES + +* **license:** the license has been changed from CC0-1.0 to ISC. + + + + +## [4.1.6](https://github.com/npm/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/npm/ssri/commit/0b1bcbe)) + + + + +## [4.1.5](https://github.com/npm/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/npm/ssri/commit/fb1293e)) + + + + +## [4.1.4](https://github.com/npm/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/npm/ssri/commit/513df4e)) + + + + +## [4.1.3](https://github.com/npm/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/npm/ssri/commit/c2c262b)) + + + + +## [4.1.2](https://github.com/npm/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/npm/ssri/commit/b1c4805)) + + + + +## [4.1.1](https://github.com/npm/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/npm/ssri/commit/fab470e)) + + + + +# [4.1.0](https://github.com/npm/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/npm/ssri/commit/96f52ad)) + + + + +# [4.0.0](https://github.com/npm/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/npm/ssri/commit/8381afa)) + + +### BREAKING CHANGES + +* **integrity:** EBADCHECKSUM -> EINTEGRITY for verification errors + + + + +## [3.0.2](https://github.com/npm/ssri/compare/v3.0.1...v3.0.2) (2017-04-03) + + + + +## [3.0.1](https://github.com/npm/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/npm/ssri/commit/a6ac6d0)) + + + + +# [3.0.0](https://github.com/npm/ssri/compare/v2.0.0...v3.0.0) (2017-04-03) + + +### Bug Fixes + +* **hashes:** IntegrityMetadata -> Hash ([d04aa1f](https://github.com/npm/ssri/commit/d04aa1f)) + + +### Features + +* **check:** return IntegrityMetadata on check success ([2301e74](https://github.com/npm/ssri/commit/2301e74)) +* **fromHex:** ssri.fromHex to make it easier to generate them from hex valus ([049b89e](https://github.com/npm/ssri/commit/049b89e)) +* **hex:** utility function for getting hex version of digest ([a9f021c](https://github.com/npm/ssri/commit/a9f021c)) +* **hexDigest:** added hexDigest method to Integrity objects too ([85208ba](https://github.com/npm/ssri/commit/85208ba)) +* **integrity:** add .isIntegrity and .isIntegrityMetadata ([1b29e6f](https://github.com/npm/ssri/commit/1b29e6f)) +* **integrityStream:** new stream that can both generate and check streamed data ([fd23e1b](https://github.com/npm/ssri/commit/fd23e1b)) +* **parse:** allow parsing straight into a single IntegrityMetadata object ([c8ddf48](https://github.com/npm/ssri/commit/c8ddf48)) +* **pickAlgorithm:** Intergrity#pickAlgorithm() added ([b97a796](https://github.com/npm/ssri/commit/b97a796)) +* **size:** calculate and update stream sizes ([02ed1ad](https://github.com/npm/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. + + + + +# [2.0.0](https://github.com/npm/ssri/compare/v1.0.0...v2.0.0) (2017-03-24) + + +### Bug Fixes + +* **strict-mode:** make regexes more rigid ([122a32c](https://github.com/npm/ssri/commit/122a32c)) + + +### Features + +* **api:** added serialize alias for unparse ([999b421](https://github.com/npm/ssri/commit/999b421)) +* **concat:** add Integrity#concat() ([cae12c7](https://github.com/npm/ssri/commit/cae12c7)) +* **pickAlgo:** pick the strongest algorithm provided, by default ([58c18f7](https://github.com/npm/ssri/commit/58c18f7)) +* **strict-mode:** strict SRI support ([3f0b64c](https://github.com/npm/ssri/commit/3f0b64c)) +* **stringify:** replaced unparse/serialize with stringify ([4acad30](https://github.com/npm/ssri/commit/4acad30)) +* **verification:** add opts.pickAlgorithm ([f72e658](https://github.com/npm/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`. + + + + +# 1.0.0 (2017-03-23) + + +### Features + +* **api:** implemented initial api ([4fbb16b](https://github.com/npm/ssri/commit/4fbb16b)) + + +### BREAKING CHANGES + +* **api:** Initial API established. diff --git a/public/node_modules/_ssri@7.1.0@ssri/LICENSE.md b/public/node_modules/_ssri@7.1.0@ssri/LICENSE.md new file mode 100644 index 000000000..8d28acf86 --- /dev/null +++ b/public/node_modules/_ssri@7.1.0@ssri/LICENSE.md @@ -0,0 +1,16 @@ +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/public/node_modules/_ssri@7.1.0@ssri/README.md b/public/node_modules/_ssri@7.1.0@ssri/README.md new file mode 100644 index 000000000..0cd41be89 --- /dev/null +++ b/public/node_modules/_ssri@7.1.0@ssri/README.md @@ -0,0 +1,528 @@ +# 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/npm/ssri.svg)](https://travis-ci.org/npm/ssri) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/ssri?svg=true)](https://ci.appveyor.com/project/npm/ssri) [![Coverage Status](https://coveralls.io/repos/github/npm/ssri/badge.svg?branch=latest)](https://coveralls.io/github/npm/ssri?branch=latest) + +[`ssri`](https://github.com/npm/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#merge`](#integrity-merge) + * [`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 + +#### `> 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 +``` + +#### `> 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' +``` + +#### `> 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 ` + +``` + +There is a single high level function, **`minify(code, options)`**, +which will perform all minification [phases](#minify-options) in a configurable +manner. By default `minify()` will enable the options [`compress`](#compress-options) +and [`mangle`](#mangle-options). Example: +```javascript +var code = "function add(first, second) { return first + second; }"; +var result = Terser.minify(code); +console.log(result.error); // runtime error, or `undefined` if no error +console.log(result.code); // minified output: function add(n,d){return n+d} +``` + +You can `minify` more than one JavaScript file at a time by using an object +for the first argument where the keys are file names and the values are source +code: +```javascript +var code = { + "file1.js": "function add(first, second) { return first + second; }", + "file2.js": "console.log(add(1 + 2, 3 + 4));" +}; +var result = Terser.minify(code); +console.log(result.code); +// function add(d,n){return d+n}console.log(add(3,7)); +``` + +The `toplevel` option: +```javascript +var code = { + "file1.js": "function add(first, second) { return first + second; }", + "file2.js": "console.log(add(1 + 2, 3 + 4));" +}; +var options = { toplevel: true }; +var result = Terser.minify(code, options); +console.log(result.code); +// console.log(3+7); +``` + +The `nameCache` option: +```javascript +var options = { + mangle: { + toplevel: true, + }, + nameCache: {} +}; +var result1 = Terser.minify({ + "file1.js": "function add(first, second) { return first + second; }" +}, options); +var result2 = Terser.minify({ + "file2.js": "console.log(add(1 + 2, 3 + 4));" +}, options); +console.log(result1.code); +// function n(n,r){return n+r} +console.log(result2.code); +// console.log(n(3,7)); +``` + +You may persist the name cache to the file system in the following way: +```javascript +var cacheFileName = "/tmp/cache.json"; +var options = { + mangle: { + properties: true, + }, + nameCache: JSON.parse(fs.readFileSync(cacheFileName, "utf8")) +}; +fs.writeFileSync("part1.js", Terser.minify({ + "file1.js": fs.readFileSync("file1.js", "utf8"), + "file2.js": fs.readFileSync("file2.js", "utf8") +}, options).code, "utf8"); +fs.writeFileSync("part2.js", Terser.minify({ + "file3.js": fs.readFileSync("file3.js", "utf8"), + "file4.js": fs.readFileSync("file4.js", "utf8") +}, options).code, "utf8"); +fs.writeFileSync(cacheFileName, JSON.stringify(options.nameCache), "utf8"); +``` + +An example of a combination of `minify()` options: +```javascript +var code = { + "file1.js": "function add(first, second) { return first + second; }", + "file2.js": "console.log(add(1 + 2, 3 + 4));" +}; +var options = { + toplevel: true, + compress: { + global_defs: { + "@console.log": "alert" + }, + passes: 2 + }, + output: { + beautify: false, + preamble: "/* minified */" + } +}; +var result = Terser.minify(code, options); +console.log(result.code); +// /* minified */ +// alert(10);" +``` + +To produce warnings: +```javascript +var code = "function f(){ var u; return 2 + 3; }"; +var options = { warnings: true }; +var result = Terser.minify(code, options); +console.log(result.error); // runtime error, `undefined` in this case +console.log(result.warnings); // [ 'Dropping unused variable u [0:1,18]' ] +console.log(result.code); // function f(){return 5} +``` + +An error example: +```javascript +var result = Terser.minify({"foo.js" : "if (0) else console.log(1);"}); +console.log(JSON.stringify(result.error)); +// {"message":"Unexpected token: keyword (else)","filename":"foo.js","line":1,"col":7,"pos":7} +``` +Note: unlike `uglify-js@2.x`, the Terser API does not throw errors. +To achieve a similar effect one could do the following: +```javascript +var result = Terser.minify(code, options); +if (result.error) throw result.error; +``` + +## Minify options + +- `ecma` (default `undefined`) - pass `5`, `2015`, `2016` or `2017` to override `parse`, + `compress` and `output`'s `ecma` options. + +- `warnings` (default `false`) — pass `true` to return compressor warnings + in `result.warnings`. Use the value `"verbose"` for more detailed warnings. + +- `parse` (default `{}`) — pass an object if you wish to specify some + additional [parse options](#parse-options). + +- `compress` (default `{}`) — pass `false` to skip compressing entirely. + Pass an object to specify custom [compress options](#compress-options). + +- `mangle` (default `true`) — pass `false` to skip mangling names, or pass + an object to specify [mangle options](#mangle-options) (see below). + + - `mangle.properties` (default `false`) — a subcategory of the mangle option. + Pass an object to specify custom [mangle property options](#mangle-properties-options). + +- `module` (default `false`) — Use when minifying an ES6 module. "use strict" + is implied and names can be mangled on the top scope. If `compress` or + `mangle` is enabled then the `toplevel` option will be enabled. + +- `output` (default `null`) — pass an object if you wish to specify + additional [output options](#output-options). The defaults are optimized + for best compression. + +- `sourceMap` (default `false`) - pass an object if you wish to specify + [source map options](#source-map-options). + +- `toplevel` (default `false`) - set to `true` if you wish to enable top level + variable and function name mangling and to drop unused variables and functions. + +- `nameCache` (default `null`) - pass an empty object `{}` or a previously + used `nameCache` object if you wish to cache mangled variable and + property names across multiple invocations of `minify()`. Note: this is + a read/write property. `minify()` will read the name cache state of this + object and update it during minification so that it may be + reused or externally persisted by the user. + +- `ie8` (default `false`) - set to `true` to support IE8. + +- `keep_classnames` (default: `undefined`) - pass `true` to prevent discarding or mangling + of class names. Pass a regular expression to only keep class names matching that regex. + +- `keep_fnames` (default: `false`) - pass `true` to prevent discarding or mangling + of function names. Pass a regular expression to only keep class names matching that regex. + Useful for code relying on `Function.prototype.name`. If the top level minify option + `keep_classnames` is `undefined` it will be overridden with the value of the top level + minify option `keep_fnames`. + +- `safari10` (default: `false`) - pass `true` to work around Safari 10/11 bugs in + loop scoping and `await`. See `safari10` options in [`mangle`](#mangle-options) + and [`output`](#output-options) for details. + +## Minify options structure + +```javascript +{ + parse: { + // parse options + }, + compress: { + // compress options + }, + mangle: { + // mangle options + + properties: { + // mangle property options + } + }, + output: { + // output options + }, + sourceMap: { + // source map options + }, + ecma: 5, // specify one of: 5, 2015, 2016, 2017 or 2018 + keep_classnames: false, + keep_fnames: false, + ie8: false, + module: false, + nameCache: null, // or specify a name cache object + safari10: false, + toplevel: false, + warnings: false, +} +``` + +### Source map options + +To generate a source map: +```javascript +var result = Terser.minify({"file1.js": "var a = function() {};"}, { + sourceMap: { + filename: "out.js", + url: "out.js.map" + } +}); +console.log(result.code); // minified output +console.log(result.map); // source map +``` + +Note that the source map is not saved in a file, it's just returned in +`result.map`. The value passed for `sourceMap.url` is only used to set +`//# sourceMappingURL=out.js.map` in `result.code`. The value of +`filename` is only used to set `file` attribute (see [the spec][sm-spec]) +in source map file. + +You can set option `sourceMap.url` to be `"inline"` and source map will +be appended to code. + +You can also specify sourceRoot property to be included in source map: +```javascript +var result = Terser.minify({"file1.js": "var a = function() {};"}, { + sourceMap: { + root: "http://example.com/src", + url: "out.js.map" + } +}); +``` + +If you're compressing compiled JavaScript and have a source map for it, you +can use `sourceMap.content`: +```javascript +var result = Terser.minify({"compiled.js": "compiled code"}, { + sourceMap: { + content: "content from compiled.js.map", + url: "minified.js.map" + } +}); +// same as before, it returns `code` and `map` +``` + +If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.url`. + +If you happen to need the source map as a raw object, set `sourceMap.asObject` to `true`. + +## Parse options + +- `bare_returns` (default `false`) -- support top level `return` statements + +- `ecma` (default: `2017`) -- specify one of `5`, `2015`, `2016` or `2017`. Note: this setting + is not presently enforced except for ES8 optional trailing commas in function + parameter lists and calls with `ecma` `2017`. + +- `html5_comments` (default `true`) + +- `shebang` (default `true`) -- support `#!command` as the first line + +## Compress options + +- `arrows` (default: `true`) -- Class and object literal methods are converted + will also be converted to arrow expressions if the resultant code is shorter: + `m(){return x}` becomes `m:()=>x`. To do this to regular ES5 functions which + don't use `this` or `arguments`, see `unsafe_arrows`. + +- `arguments` (default: `false`) -- replace `arguments[index]` with function + parameter name whenever possible. + +- `booleans` (default: `true`) -- various optimizations for boolean context, + for example `!!a ? b : c → a ? b : c` + +- `booleans_as_integers` (default: `false`) -- Turn booleans into 0 and 1, also + makes comparisons with booleans use `==` and `!=` instead of `===` and `!==`. + +- `collapse_vars` (default: `true`) -- Collapse single-use non-constant variables, + side effects permitting. + +- `comparisons` (default: `true`) -- apply certain optimizations to binary nodes, + e.g. `!(a <= b) → a > b` (only when `unsafe_comps`), attempts to negate binary + nodes, e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc. + +- `computed_props` (default: `true`) -- Transforms constant computed properties + into regular ones: `{["computed"]: 1}` is converted to `{computed: 1}`. + +- `conditionals` (default: `true`) -- apply optimizations for `if`-s and conditional + expressions + +- `dead_code` (default: `true`) -- remove unreachable code + +- `defaults` (default: `true`) -- Pass `false` to disable most default + enabled `compress` transforms. Useful when you only want to enable a few + `compress` options while disabling the rest. + +- `directives` (default: `true`) -- remove redundant or non-standard directives + +- `drop_console` (default: `false`) -- Pass `true` to discard calls to + `console.*` functions. If you wish to drop a specific function call + such as `console.info` and/or retain side effects from function arguments + after dropping the function call then use `pure_funcs` instead. + +- `drop_debugger` (default: `true`) -- remove `debugger;` statements + +- `ecma` (default: `5`) -- Pass `2015` or greater to enable `compress` options that + will transform ES5 code into smaller ES6+ equivalent forms. + +- `evaluate` (default: `true`) -- attempt to evaluate constant expressions + +- `expression` (default: `false`) -- Pass `true` to preserve completion values + from terminal statements without `return`, e.g. in bookmarklets. + +- `global_defs` (default: `{}`) -- see [conditional compilation](#conditional-compilation) + +- `hoist_funs` (default: `false`) -- hoist function declarations + +- `hoist_props` (default: `true`) -- hoist properties from constant object and + array literals into regular variables subject to a set of constraints. For example: + `var o={p:1, q:2}; f(o.p, o.q);` is converted to `f(1, 2);`. Note: `hoist_props` + works best with `mangle` enabled, the `compress` option `passes` set to `2` or higher, + and the `compress` option `toplevel` enabled. + +- `hoist_vars` (default: `false`) -- hoist `var` declarations (this is `false` + by default because it seems to increase the size of the output in general) + +- `if_return` (default: `true`) -- optimizations for if/return and if/continue + +- `inline` (default: `true`) -- inline calls to function with simple/`return` statement: + - `false` -- same as `0` + - `0` -- disabled inlining + - `1` -- inline simple functions + - `2` -- inline functions with arguments + - `3` -- inline functions with arguments and variables + - `true` -- same as `3` + +- `join_vars` (default: `true`) -- join consecutive `var` statements + +- `keep_classnames` (default: `false`) -- Pass `true` to prevent the compressor from + discarding class names. Pass a regular expression to only keep class names matching + that regex. See also: the `keep_classnames` [mangle option](#mangle). + +- `keep_fargs` (default: `true`) -- Prevents the compressor from discarding unused + function arguments. You need this for code which relies on `Function.length`. + +- `keep_fnames` (default: `false`) -- Pass `true` to prevent the + compressor from discarding function names. Pass a regular expression to only keep + function names matching that regex. Useful for code relying on `Function.prototype.name`. + See also: the `keep_fnames` [mangle option](#mangle). + +- `keep_infinity` (default: `false`) -- Pass `true` to prevent `Infinity` from + being compressed into `1/0`, which may cause performance issues on Chrome. + +- `loops` (default: `true`) -- optimizations for `do`, `while` and `for` loops + when we can statically determine the condition. + +- `module` (default `false`) -- Pass `true` when compressing an ES6 module. Strict + mode is implied and the `toplevel` option as well. + +- `negate_iife` (default: `true`) -- negate "Immediately-Called Function Expressions" + where the return value is discarded, to avoid the parens that the + code generator would insert. + +- `passes` (default: `1`) -- The maximum number of times to run compress. + In some cases more than one pass leads to further compressed code. Keep in + mind more passes will take more time. + +- `properties` (default: `true`) -- rewrite property access using the dot notation, for + example `foo["bar"] → foo.bar` + +- `pure_funcs` (default: `null`) -- You can pass an array of names and + Terser will assume that those functions do not produce side + effects. DANGER: will not check if the name is redefined in scope. + An example case here, for instance `var q = Math.floor(a/b)`. If + variable `q` is not used elsewhere, Terser will drop it, but will + still keep the `Math.floor(a/b)`, not knowing what it does. You can + pass `pure_funcs: [ 'Math.floor' ]` to let it know that this + function won't produce any side effect, in which case the whole + statement would get discarded. The current implementation adds some + overhead (compression will be slower). + +- `pure_getters` (default: `"strict"`) -- If you pass `true` for + this, Terser will assume that object property access + (e.g. `foo.bar` or `foo["bar"]`) doesn't have any side effects. + Specify `"strict"` to treat `foo.bar` as side-effect-free only when + `foo` is certain to not throw, i.e. not `null` or `undefined`. + +- `reduce_funcs` (legacy option, safely ignored for backwards compatibility). + +- `reduce_vars` (default: `true`) -- Improve optimization on variables assigned with and + used as constant values. + +- `sequences` (default: `true`) -- join consecutive simple statements using the + comma operator. May be set to a positive integer to specify the maximum number + of consecutive comma sequences that will be generated. If this option is set to + `true` then the default `sequences` limit is `200`. Set option to `false` or `0` + to disable. The smallest `sequences` length is `2`. A `sequences` value of `1` + is grandfathered to be equivalent to `true` and as such means `200`. On rare + occasions the default sequences limit leads to very slow compress times in which + case a value of `20` or less is recommended. + +- `side_effects` (default: `true`) -- Pass `false` to disable potentially dropping + function calls marked as "pure". A function call is marked as "pure" if a comment + annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For + example: `/*@__PURE__*/foo();` + +- `switches` (default: `true`) -- de-duplicate and remove unreachable `switch` branches + +- `toplevel` (default: `false`) -- drop unreferenced functions (`"funcs"`) and/or + variables (`"vars"`) in the top level scope (`false` by default, `true` to drop + both unreferenced functions and variables) + +- `top_retain` (default: `null`) -- prevent specific toplevel functions and + variables from `unused` removal (can be array, comma-separated, RegExp or + function. Implies `toplevel`) + +- `typeofs` (default: `true`) -- Transforms `typeof foo == "undefined"` into + `foo === void 0`. Note: recommend to set this value to `false` for IE10 and + earlier versions due to known issues. + +- `unsafe` (default: `false`) -- apply "unsafe" transformations + ([details](#the-unsafe-compress-option)). + +- `unsafe_arrows` (default: `false`) -- Convert ES5 style anonymous function + expressions to arrow functions if the function body does not reference `this`. + Note: it is not always safe to perform this conversion if code relies on the + the function having a `prototype`, which arrow functions lack. + This transform requires that the `ecma` compress option is set to `2015` or greater. + +- `unsafe_comps` (default: `false`) -- Reverse `<` and `<=` to `>` and `>=` to + allow improved compression. This might be unsafe when an at least one of two + operands is an object with computed values due the use of methods like `get`, + or `valueOf`. This could cause change in execution order after operands in the + comparison are switching. Compression only works if both `comparisons` and + `unsafe_comps` are both set to true. + +- `unsafe_Function` (default: `false`) -- compress and mangle `Function(args, code)` + when both `args` and `code` are string literals. + +- `unsafe_math` (default: `false`) -- optimize numerical expressions like + `2 * x * 3` into `6 * x`, which may give imprecise floating point results. + +- `unsafe_methods` (default: false) -- Converts `{ m: function(){} }` to + `{ m(){} }`. `ecma` must be set to `6` or greater to enable this transform. + If `unsafe_methods` is a RegExp then key/value pairs with keys matching the + RegExp will be converted to concise methods. + Note: if enabled there is a risk of getting a "`` is not a + constructor" TypeError should any code try to `new` the former function. + +- `unsafe_proto` (default: `false`) -- optimize expressions like + `Array.prototype.slice.call(a)` into `[].slice.call(a)` + +- `unsafe_regexp` (default: `false`) -- enable substitutions of variables with + `RegExp` values the same way as if they are constants. + +- `unsafe_undefined` (default: `false`) -- substitute `void 0` if there is a + variable named `undefined` in scope (variable name will be mangled, typically + reduced to a single character) + +- `unused` (default: `true`) -- drop unreferenced functions and variables (simple + direct variable assignments do not count as references unless set to `"keep_assign"`) + +- `warnings` (default: `false`) -- display warnings when dropping unreachable + code or unused declarations etc. + +## Mangle options + +- `eval` (default `false`) -- Pass `true` to mangle names visible in scopes + where `eval` or `with` are used. + +- `keep_classnames` (default `false`) -- Pass `true` to not mangle class names. + Pass a regular expression to only keep class names matching that regex. + See also: the `keep_classnames` [compress option](#compress-options). + +- `keep_fnames` (default `false`) -- Pass `true` to not mangle function names. + Pass a regular expression to only keep class names matching that regex. + Useful for code relying on `Function.prototype.name`. See also: the `keep_fnames` + [compress option](#compress-options). + +- `module` (default `false`) -- Pass `true` an ES6 modules, where the toplevel + scope is not the global scope. Implies `toplevel`. + +- `reserved` (default `[]`) -- Pass an array of identifiers that should be + excluded from mangling. Example: `["foo", "bar"]`. + +- `toplevel` (default `false`) -- Pass `true` to mangle names declared in the + top level scope. + +- `safari10` (default `false`) -- Pass `true` to work around the Safari 10 loop + iterator [bug](https://bugs.webkit.org/show_bug.cgi?id=171041) + "Cannot declare a let variable twice". + See also: the `safari10` [output option](#output-options). + +Examples: + +```javascript +// test.js +var globalVar; +function funcName(firstLongName, anotherLongName) { + var myVariable = firstLongName + anotherLongName; +} +``` +```javascript +var code = fs.readFileSync("test.js", "utf8"); + +Terser.minify(code).code; +// 'function funcName(a,n){}var globalVar;' + +Terser.minify(code, { mangle: { reserved: ['firstLongName'] } }).code; +// 'function funcName(firstLongName,a){}var globalVar;' + +Terser.minify(code, { mangle: { toplevel: true } }).code; +// 'function n(n,a){}var a;' +``` + +### Mangle properties options + +- `builtins` (default: `false`) — Use `true` to allow the mangling of builtin + DOM properties. Not recommended to override this setting. + +- `debug` (default: `false`) — Mangle names with the original name still present. + Pass an empty string `""` to enable, or a non-empty string to set the debug suffix. + +- `keep_quoted` (default: `false`) — Only mangle unquoted property names. + - `true` -- Quoted property names are automatically reserved and any unquoted + property names will not be mangled. + - `"strict"` -- Advanced, all unquoted property names are mangled unless + explicitly reserved. + +- `regex` (default: `null`) — Pass a [RegExp literal or pattern string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to only mangle property matching the regular expression. + +- `reserved` (default: `[]`) — Do not mangle property names listed in the + `reserved` array. + +- `undeclared` (default: `false`) - Mangle those names when they are accessed + as properties of known top level variables but their declarations are never + found in input code. May be useful when only minifying parts of a project. + See [#397](https://github.com/terser/terser/issues/397) for more details. + +## Output options + +The code generator tries to output shortest code possible by default. In +case you want beautified output, pass `--beautify` (`-b`). Optionally you +can pass additional arguments that control the code output: + +- `ascii_only` (default `false`) -- escape Unicode characters in strings and + regexps (affects directives with non-ascii characters becoming invalid) + +- `beautify` (default `true`) -- whether to actually beautify the output. + Passing `-b` will set this to true, but you might need to pass `-b` even + when you want to generate minified code, in order to specify additional + arguments, so you can use `-b beautify=false` to override it. + +- `braces` (default `false`) -- always insert braces in `if`, `for`, + `do`, `while` or `with` statements, even if their body is a single + statement. + +- `comments` (default `"some"`) -- by default it keeps JSDoc-style comments + that contain "@license" or "@preserve", pass `true` or `"all"` to preserve all + comments, `false` to omit comments in the output, a regular expression string + (e.g. `/^!/`) or a function. + +- `ecma` (default `5`) -- set output printing mode. Set `ecma` to `2015` or + greater to emit shorthand object properties - i.e.: `{a}` instead of `{a: a}`. + The `ecma` option will only change the output in direct control of the + beautifier. Non-compatible features in the abstract syntax tree will still + be output as is. For example: an `ecma` setting of `5` will **not** convert + ES6+ code to ES5. + +- `indent_level` (default `4`) + +- `indent_start` (default `0`) -- prefix all lines by that many spaces + +- `inline_script` (default `true`) -- escape HTML comments and the slash in + occurrences of `` in strings + +- `keep_numbers` (default `false`) -- keep number literals as it was in original code + (disables optimizations like converting `1000000` into `1e6`) + +- `keep_quoted_props` (default `false`) -- when turned on, prevents stripping + quotes from property names in object literals. + +- `max_line_len` (default `false`) -- maximum line length (for minified code) + +- `preamble` (default `null`) -- when passed it must be a string and + it will be prepended to the output literally. The source map will + adjust for this text. Can be used to insert a comment containing + licensing information, for example. + +- `quote_keys` (default `false`) -- pass `true` to quote all keys in literal + objects + +- `quote_style` (default `0`) -- preferred quote style for strings (affects + quoted property names and directives as well): + - `0` -- prefers double quotes, switches to single quotes when there are + more double quotes in the string itself. `0` is best for gzip size. + - `1` -- always use single quotes + - `2` -- always use double quotes + - `3` -- always use the original quotes + +- `safari10` (default `false`) -- set this option to `true` to work around + the [Safari 10/11 await bug](https://bugs.webkit.org/show_bug.cgi?id=176685). + See also: the `safari10` [mangle option](#mangle-options). + +- `semicolons` (default `true`) -- separate statements with semicolons. If + you pass `false` then whenever possible we will use a newline instead of a + semicolon, leading to more readable output of minified code (size before + gzip could be smaller; size after gzip insignificantly larger). + +- `shebang` (default `true`) -- preserve shebang `#!` in preamble (bash scripts) + +- `webkit` (default `false`) -- enable workarounds for WebKit bugs. + PhantomJS users should set this option to `true`. + +- `wrap_iife` (default `false`) -- pass `true` to wrap immediately invoked + function expressions. See + [#640](https://github.com/mishoo/UglifyJS2/issues/640) for more details. + +- `wrap_func_args` (default `true`) -- pass `false` if you do not want to wrap + function expressions that are passed as arguments, in parenthesis. See + [OptimizeJS](https://github.com/nolanlawson/optimize-js) for more details. + +# Miscellaneous + +### Keeping copyright notices or other comments + +You can pass `--comments` to retain certain comments in the output. By +default it will keep JSDoc-style comments that contain "@preserve", +"@license" or "@cc_on" (conditional compilation for IE). You can pass +`--comments all` to keep all the comments, or a valid JavaScript regexp to +keep only comments that match this regexp. For example `--comments /^!/` +will keep comments like `/*! Copyright Notice */`. + +Note, however, that there might be situations where comments are lost. For +example: +```javascript +function f() { + /** @preserve Foo Bar */ + function g() { + // this function is never called + } + return something(); +} +``` + +Even though it has "@preserve", the comment will be lost because the inner +function `g` (which is the AST node to which the comment is attached to) is +discarded by the compressor as not referenced. + +The safest comments where to place copyright information (or other info that +needs to be kept in the output) are comments attached to toplevel nodes. + +### The `unsafe` `compress` option + +It enables some transformations that *might* break code logic in certain +contrived cases, but should be fine for most code. It assumes that standard +built-in ECMAScript functions and classes have not been altered or replaced. +You might want to try it on your own code; it should reduce the minified size. +Some examples of the optimizations made when this option is enabled: + +- `new Array(1, 2, 3)` or `Array(1, 2, 3)` → `[ 1, 2, 3 ]` +- `new Object()` → `{}` +- `String(exp)` or `exp.toString()` → `"" + exp` +- `new Object/RegExp/Function/Error/Array (...)` → we discard the `new` +- `"foo bar".substr(4)` → `"bar"` + +### Conditional compilation + +You can use the `--define` (`-d`) switch in order to declare global +variables that Terser will assume to be constants (unless defined in +scope). For example if you pass `--define DEBUG=false` then, coupled with +dead code removal Terser will discard the following from the output: +```javascript +if (DEBUG) { + console.log("debug stuff"); +} +``` + +You can specify nested constants in the form of `--define env.DEBUG=false`. + +Terser will warn about the condition being always false and about dropping +unreachable code; for now there is no option to turn off only this specific +warning, you can pass `warnings=false` to turn off *all* warnings. + +Another way of doing that is to declare your globals as constants in a +separate file and include it into the build. For example you can have a +`build/defines.js` file with the following: +```javascript +var DEBUG = false; +var PRODUCTION = true; +// etc. +``` + +and build your code like this: + + terser build/defines.js js/foo.js js/bar.js... -c + +Terser will notice the constants and, since they cannot be altered, it +will evaluate references to them to the value itself and drop unreachable +code as usual. The build will contain the `const` declarations if you use +them. If you are targeting < ES6 environments which does not support `const`, +using `var` with `reduce_vars` (enabled by default) should suffice. + +### Conditional compilation API + +You can also use conditional compilation via the programmatic API. With the difference that the +property name is `global_defs` and is a compressor property: + +```javascript +var result = Terser.minify(fs.readFileSync("input.js", "utf8"), { + compress: { + dead_code: true, + global_defs: { + DEBUG: false + } + } +}); +``` + +To replace an identifier with an arbitrary non-constant expression it is +necessary to prefix the `global_defs` key with `"@"` to instruct Terser +to parse the value as an expression: +```javascript +Terser.minify("alert('hello');", { + compress: { + global_defs: { + "@alert": "console.log" + } + } +}).code; +// returns: 'console.log("hello");' +``` + +Otherwise it would be replaced as string literal: +```javascript +Terser.minify("alert('hello');", { + compress: { + global_defs: { + "alert": "console.log" + } + } +}).code; +// returns: '"console.log"("hello");' +``` + +### Using native Terser AST with `minify()` +```javascript +// example: parse only, produce native Terser AST + +var result = Terser.minify(code, { + parse: {}, + compress: false, + mangle: false, + output: { + ast: true, + code: false // optional - faster if false + } +}); + +// result.ast contains native Terser AST +``` +```javascript +// example: accept native Terser AST input and then compress and mangle +// to produce both code and native AST. + +var result = Terser.minify(ast, { + compress: {}, + mangle: {}, + output: { + ast: true, + code: true // optional - faster if false + } +}); + +// result.ast contains native Terser AST +// result.code contains the minified code in string form. +``` + + +### Annotations + +Annotations in Terser are a way to tell it to treat a certain function call differently. The following annotations are available: + + * `/*@__INLINE__*/` - forces a function to be inlined somewhere. + * `/*@__NOINLINE__*/` - Makes sure the called function is not inlined into the call site. + * `/*@__PURE__*/` - Marks a function call as pure. That means, it can safely be dropped. + +You can use either a `@` sign at the start, or a `#`. + +Here are some examples on how to use them: + +```javascript +/*@__INLINE__*/ +function_always_inlined_here() + +/*#__NOINLINE__*/ +function_cant_be_inlined_into_here() + +const x = /*#__PURE__*/i_am_dropped_if_x_is_not_used() +``` + + +### Working with Terser AST + +Traversal and transformation of the native AST can be performed through +[`TreeWalker`](https://github.com/fabiosantoscode/terser/blob/master/lib/ast.js) and +[`TreeTransformer`](https://github.com/fabiosantoscode/terser/blob/master/lib/transform.js) +respectively. + +Largely compatible native AST examples can be found in the original UglifyJS +documentation. See: [tree walker](http://lisperator.net/uglifyjs/walk) and +[tree transform](http://lisperator.net/uglifyjs/transform). + +### ESTree / SpiderMonkey AST + +Terser has its own abstract syntax tree format; for +[practical reasons](http://lisperator.net/blog/uglifyjs-why-not-switching-to-spidermonkey-ast/) +we can't easily change to using the SpiderMonkey AST internally. However, +Terser now has a converter which can import a SpiderMonkey AST. + +For example [Acorn][acorn] is a super-fast parser that produces a +SpiderMonkey AST. It has a small CLI utility that parses one file and dumps +the AST in JSON on the standard output. To use Terser to mangle and +compress that: + + acorn file.js | terser -p spidermonkey -m -c + +The `-p spidermonkey` option tells Terser that all input files are not +JavaScript, but JS code described in SpiderMonkey AST in JSON. Therefore we +don't use our own parser in this case, but just transform that AST into our +internal AST. + +### Use Acorn for parsing + +More for fun, I added the `-p acorn` option which will use Acorn to do all +the parsing. If you pass this option, Terser will `require("acorn")`. + +Acorn is really fast (e.g. 250ms instead of 380ms on some 650K code), but +converting the SpiderMonkey tree that Acorn produces takes another 150ms so +in total it's a bit more than just using Terser's own parser. + +[acorn]: https://github.com/ternjs/acorn +[sm-spec]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k + +### Terser Fast Minify Mode + +It's not well known, but whitespace removal and symbol mangling accounts +for 95% of the size reduction in minified code for most JavaScript - not +elaborate code transforms. One can simply disable `compress` to speed up +Terser builds by 3 to 4 times. + +| d3.js | size | gzip size | time (s) | +| --- | ---: | ---: | ---: | +| original | 451,131 | 108,733 | - | +| terser@3.7.5 mangle=false, compress=false | 316,600 | 85,245 | 0.82 | +| terser@3.7.5 mangle=true, compress=false | 220,216 | 72,730 | 1.45 | +| terser@3.7.5 mangle=true, compress=true | 212,046 | 70,954 | 5.87 | +| babili@0.1.4 | 210,713 | 72,140 | 12.64 | +| babel-minify@0.4.3 | 210,321 | 72,242 | 48.67 | +| babel-minify@0.5.0-alpha.01eac1c3 | 210,421 | 72,238 | 14.17 | + +To enable fast minify mode from the CLI use: +``` +terser file.js -m +``` +To enable fast minify mode with the API use: +```js +Terser.minify(code, { compress: false, mangle: true }); +``` + +#### Source maps and debugging + +Various `compress` transforms that simplify, rearrange, inline and remove code +are known to have an adverse effect on debugging with source maps. This is +expected as code is optimized and mappings are often simply not possible as +some code no longer exists. For highest fidelity in source map debugging +disable the `compress` option and just use `mangle`. + +### Compiler assumptions + +To allow for better optimizations, the compiler makes various assumptions: + +- `.toString()` and `.valueOf()` don't have side effects, and for built-in + objects they have not been overridden. +- `undefined`, `NaN` and `Infinity` have not been externally redefined. +- `arguments.callee`, `arguments.caller` and `Function.prototype.caller` are not used. +- The code doesn't expect the contents of `Function.prototype.toString()` or + `Error.prototype.stack` to be anything in particular. +- Getting and setting properties on a plain object does not cause other side effects + (using `.watch()` or `Proxy`). +- Object properties can be added, removed and modified (not prevented with + `Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`, + `Object.preventExtensions()` or `Object.seal()`). + +### Build Tools and Adaptors using Terser + +https://www.npmjs.com/browse/depended/terser + +### Replacing `uglify-es` with `terser` in a project using `yarn` + +A number of JS bundlers and uglify wrappers are still using buggy versions +of `uglify-es` and have not yet upgraded to `terser`. If you are using `yarn` +you can add the following alias to your project's `package.json` file: + +```js + "resolutions": { + "uglify-es": "npm:terser" + } +``` + +to use `terser` instead of `uglify-es` in all deeply nested dependencies +without changing any code. + +Note: for this change to take effect you must run the following commands +to remove the existing `yarn` lock file and reinstall all packages: + +``` +$ rm -rf node_modules yarn.lock +$ yarn +``` + +# Reporting issues + +In the terser CLI we use [source-map-support](https://npmjs.com/source-map-support) to produce good error stacks. In your own app, you're expected to enable source-map-support (read their docs) to have nice stack traces that will make good issues. + +# README.md Patrons: + +*note*: You can support this project on patreon: patron. Check out [PATRONS.md](https://github.com/terser/terser/blob/master/PATRONS.md) for our first-tier patrons. + +These are the second-tier patrons. Great thanks for your support! + + * CKEditor ![](https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/15452278/f8548dcf48d740619071e8d614459280/1?token-time=2145916800&token-hash=SIQ54PhIPHv3M7CVz9LxS8_8v4sOw4H304HaXsXj8MM%3D) + * 38elements ![](https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12501844/88e7fc5dd62d45c6a5626533bbd48cfb/1?token-time=2145916800&token-hash=c3AsQ5T0IQWic0zKxFHu-bGGQJkXQFvafvJ4bPerFR4%3D) + +## Contributors + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/terser/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/terser/contribute)] + + + + + + + + + + + diff --git a/public/node_modules/_terser@4.5.1@terser/bin/terser b/public/node_modules/_terser@4.5.1@terser/bin/terser new file mode 100755 index 000000000..f8d285759 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/bin/terser @@ -0,0 +1,476 @@ +#!/usr/bin/env node +// -*- js -*- +/* eslint-env node */ + +"use strict"; + +require("../tools/exit.js"); + +var fs = require("fs"); +var info = require("../package.json"); +var path = require("path"); +var program = require("commander"); + +var Terser = require(".."); +try { + require("source-map-support").install(); +} catch (err) {} + +const skip_keys = new Set([ "cname", "parent_scope", "scope", "uses_eval", "uses_with", "_var_name_cache" ]); +var files = {}; +var options = { + compress: false, + mangle: false +}; +program.version(info.name + " " + info.version); +program.parseArgv = program.parse; +program.parse = undefined; +if (process.argv.includes("ast")) program.helpInformation = describe_ast; +else if (process.argv.includes("options")) program.helpInformation = function() { + var text = []; + var options = Terser.default_options(); + for (var option in options) { + text.push("--" + (option === "output" ? "beautify" : option === "sourceMap" ? "source-map" : option) + " options:"); + text.push(format_object(options[option])); + text.push(""); + } + return text.join("\n"); +}; +program.option("-p, --parse ", "Specify parser options.", parse_js()); +program.option("-c, --compress [options]", "Enable compressor/specify compressor options.", parse_js()); +program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js()); +program.option("--mangle-props [options]", "Mangle properties/specify mangler options.", parse_js()); +program.option("-b, --beautify [options]", "Beautify output/specify output options.", parse_js()); +program.option("-o, --output ", "Output file (default STDOUT)."); +program.option("--comments [filter]", "Preserve copyright comments in the output."); +program.option("--config-file ", "Read minify() options from JSON file."); +program.option("-d, --define [=value]", "Global definitions.", parse_js("define")); +program.option("--ecma ", "Specify ECMAScript release: 5, 2015, 2016 or 2017..."); +program.option("-e, --enclose [arg[,...][:value[,...]]]", "Embed output in a big function with configurable arguments and values."); +program.option("--ie8", "Support non-standard Internet Explorer 8."); +program.option("--keep-classnames", "Do not mangle/drop class names."); +program.option("--keep-fnames", "Do not mangle/drop function names. Useful for code relying on Function.prototype.name."); +program.option("--module", "Input is an ES6 module"); +program.option("--name-cache ", "File to hold mangled name mappings."); +program.option("--rename", "Force symbol expansion."); +program.option("--no-rename", "Disable symbol expansion."); +program.option("--safari10", "Support non-standard Safari 10."); +program.option("--source-map [options]", "Enable source map/specify source map options.", parse_js()); +program.option("--timings", "Display operations run time on STDERR."); +program.option("--toplevel", "Compress and/or mangle variables in toplevel scope."); +program.option("--verbose", "Print diagnostic messages."); +program.option("--warn", "Print warning messages."); +program.option("--wrap ", "Embed everything as a function with “exports” corresponding to “name” globally."); +program.arguments("[files...]").parseArgv(process.argv); +if (program.configFile) { + options = JSON.parse(read_file(program.configFile)); +} +if (!program.output && program.sourceMap && program.sourceMap.url != "inline") { + fatal("ERROR: cannot write source map to STDOUT"); +} +[ + "compress", + "enclose", + "ie8", + "mangle", + "module", + "safari10", + "sourceMap", + "toplevel", + "wrap" +].forEach(function(name) { + if (name in program) { + options[name] = program[name]; + } +}); +if ("ecma" in program) { + if (program.ecma != (program.ecma | 0)) fatal("ERROR: ecma must be an integer"); + const ecma = program.ecma | 0; + if (ecma > 5 && ecma < 2015) + options.ecma = ecma + 2009; + else + options.ecma = ecma; +} +if (program.beautify) { + options.output = typeof program.beautify == "object" ? program.beautify : {}; + if (!("beautify" in options.output)) { + options.output.beautify = true; + } +} +if (program.comments) { + if (typeof options.output != "object") options.output = {}; + options.output.comments = typeof program.comments == "string" ? program.comments : "some"; +} +if (program.define) { + if (typeof options.compress != "object") options.compress = {}; + if (typeof options.compress.global_defs != "object") options.compress.global_defs = {}; + for (var expr in program.define) { + options.compress.global_defs[expr] = program.define[expr]; + } +} +if (program.keepClassnames) { + options.keep_classnames = true; +} +if (program.keepFnames) { + options.keep_fnames = true; +} +if (program.mangleProps) { + if (program.mangleProps.domprops) { + delete program.mangleProps.domprops; + } else { + if (typeof program.mangleProps != "object") program.mangleProps = {}; + if (!Array.isArray(program.mangleProps.reserved)) program.mangleProps.reserved = []; + } + if (typeof options.mangle != "object") options.mangle = {}; + options.mangle.properties = program.mangleProps; +} +if (program.nameCache) { + options.nameCache = JSON.parse(read_file(program.nameCache, "{}")); +} +if (program.output == "ast") { + options.output = { + ast: true, + code: false + }; +} +if (program.parse) { + if (!program.parse.acorn && !program.parse.spidermonkey) { + options.parse = program.parse; + } else if (program.sourceMap && program.sourceMap.content == "inline") { + fatal("ERROR: inline source map only works with built-in parser"); + } +} +if (~program.rawArgs.indexOf("--rename")) { + options.rename = true; +} else if (!program.rename) { + options.rename = false; +} +var convert_path = function(name) { + return name; +}; +if (typeof program.sourceMap == "object" && "base" in program.sourceMap) { + convert_path = function() { + var base = program.sourceMap.base; + delete options.sourceMap.base; + return function(name) { + return path.relative(base, name); + }; + }(); +} +if (program.verbose) { + options.warnings = "verbose"; +} else if (program.warn) { + options.warnings = true; +} + +let filesList; +if (options.files && options.files.length) { + filesList = options.files; + + delete options.files; +} else if (program.args.length) { + filesList = program.args; +} + +if (filesList) { + simple_glob(filesList).forEach(function(name) { + files[convert_path(name)] = read_file(name); + }); + run(); +} else { + var chunks = []; + process.stdin.setEncoding("utf8"); + process.stdin.on("data", function(chunk) { + chunks.push(chunk); + }).on("end", function() { + files = [ chunks.join("") ]; + run(); + }); + process.stdin.resume(); +} + +function convert_ast(fn) { + return Terser.AST_Node.from_mozilla_ast(Object.keys(files).reduce(fn, null)); +} + +function run() { + Terser.AST_Node.warn_function = function(msg) { + print_error("WARN: " + msg); + }; + var content = program.sourceMap && program.sourceMap.content; + if (content && content !== "inline") { + options.sourceMap.content = read_file(content, content); + } + if (program.timings) options.timings = true; + try { + if (program.parse) { + if (program.parse.acorn) { + files = convert_ast(function(toplevel, name) { + return require("acorn").parse(files[name], { + ecmaVersion: 2018, + locations: true, + program: toplevel, + sourceFile: name, + sourceType: options.module || program.parse.module ? "module" : "script" + }); + }); + } else if (program.parse.spidermonkey) { + files = convert_ast(function(toplevel, name) { + var obj = JSON.parse(files[name]); + if (!toplevel) return obj; + toplevel.body = toplevel.body.concat(obj.body); + return toplevel; + }); + } + } + } catch (ex) { + fatal(ex); + } + var result = Terser.minify(files, options); + if (result.error) { + var ex = result.error; + if (ex.name == "SyntaxError") { + print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col); + var col = ex.col; + var lines = files[ex.filename].split(/\r?\n/); + var line = lines[ex.line - 1]; + if (!line && !col) { + line = lines[ex.line - 2]; + col = line.length; + } + if (line) { + var limit = 70; + if (col > limit) { + line = line.slice(col - limit); + col = limit; + } + print_error(line.slice(0, 80)); + print_error(line.slice(0, col).replace(/\S/g, " ") + "^"); + } + } + if (ex.defs) { + print_error("Supported options:"); + print_error(format_object(ex.defs)); + } + fatal(ex); + } else if (program.output == "ast") { + if (!options.compress && !options.mangle) { + result.ast.figure_out_scope({}); + } + print(JSON.stringify(result.ast, function(key, value) { + if (value) switch (key) { + case "thedef": + return symdef(value); + case "enclosed": + return value.length ? value.map(symdef) : undefined; + case "variables": + case "functions": + case "globals": + return value.size ? collect_from_map(value, symdef) : undefined; + } + if (skip_keys.has(key)) return; + if (value instanceof Terser.AST_Token) return; + if (value instanceof Map) return; + if (value instanceof Terser.AST_Node) { + var result = { + _class: "AST_" + value.TYPE + }; + if (value.block_scope) { + result.variables = value.block_scope.variables; + result.functions = value.block_scope.functions; + result.enclosed = value.block_scope.enclosed; + } + value.CTOR.PROPS.forEach(function(prop) { + result[prop] = value[prop]; + }); + return result; + } + return value; + }, 2)); + } else if (program.output == "spidermonkey") { + print(JSON.stringify(Terser.minify(result.code, { + compress: false, + mangle: false, + output: { + ast: true, + code: false + } + }).ast.to_mozilla_ast(), null, 2)); + } else if (program.output) { + fs.writeFileSync(program.output, result.code); + if (options.sourceMap.url !== "inline" && result.map) { + fs.writeFileSync(program.output + ".map", result.map); + } + } else { + print(result.code); + } + if (program.nameCache) { + fs.writeFileSync(program.nameCache, JSON.stringify(options.nameCache)); + } + if (result.timings) for (var phase in result.timings) { + print_error("- " + phase + ": " + result.timings[phase].toFixed(3) + "s"); + } +} + +function fatal(message) { + if (message instanceof Error) message = message.stack.replace(/^\S*?Error:/, "ERROR:"); + print_error(message); + process.exit(1); +} + +// A file glob function that only supports "*" and "?" wildcards in the basename. +// Example: "foo/bar/*baz??.*.js" +// Argument `glob` may be a string or an array of strings. +// Returns an array of strings. Garbage in, garbage out. +function simple_glob(glob) { + if (Array.isArray(glob)) { + return [].concat.apply([], glob.map(simple_glob)); + } + if (glob && glob.match(/[*?]/)) { + var dir = path.dirname(glob); + try { + var entries = fs.readdirSync(dir); + } catch (ex) {} + if (entries) { + var pattern = "^" + path.basename(glob) + .replace(/[.+^$[\]\\(){}]/g, "\\$&") + .replace(/\*/g, "[^/\\\\]*") + .replace(/\?/g, "[^/\\\\]") + "$"; + var mod = process.platform === "win32" ? "i" : ""; + var rx = new RegExp(pattern, mod); + var results = entries.filter(function(name) { + return rx.test(name); + }).map(function(name) { + return path.join(dir, name); + }); + if (results.length) return results; + } + } + return [ glob ]; +} + +function read_file(path, default_value) { + try { + return fs.readFileSync(path, "utf8"); + } catch (ex) { + if ((ex.code == "ENOENT" || ex.code == "ENAMETOOLONG") && default_value != null) return default_value; + fatal(ex); + } +} + +function parse_js(flag) { + return function(value, options) { + options = options || {}; + try { + Terser.parse(value, { + expression: true + }).walk(new Terser.TreeWalker(function(node) { + if (node instanceof Terser.AST_Assign) { + var name = node.left.print_to_string(); + var value = node.right; + if (flag) { + options[name] = value; + } else if (value instanceof Terser.AST_Array) { + options[name] = value.elements.map(to_string); + } else if (value instanceof Terser.AST_RegExp) { + value = value.value; + options[name] = new RegExp(value.source, value.flags); + } else { + options[name] = to_string(value); + } + return true; + } + if (node instanceof Terser.AST_Symbol || node instanceof Terser.AST_PropAccess) { + var name = node.print_to_string(); + options[name] = true; + return true; + } + if (!(node instanceof Terser.AST_Sequence)) throw node; + + function to_string(value) { + return value instanceof Terser.AST_Constant ? value.getValue() : value.print_to_string({ + quote_keys: true + }); + } + })); + } catch(ex) { + if (flag) { + fatal("Error parsing arguments for '" + flag + "': " + value); + } else { + options[value] = null; + } + } + return options; + }; +} + +function symdef(def) { + var ret = (1e6 + def.id) + " " + def.name; + if (def.mangled_name) ret += " " + def.mangled_name; + return ret; +} + +function collect_from_map(map, callback) { + var result = []; + map.forEach(function (def) { + result.push(callback(def)); + }); + return result; +} + +function format_object(obj) { + var lines = []; + var padding = ""; + Object.keys(obj).map(function(name) { + if (padding.length < name.length) padding = Array(name.length + 1).join(" "); + return [ name, JSON.stringify(obj[name]) ]; + }).forEach(function(tokens) { + lines.push(" " + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]); + }); + return lines.join("\n"); +} + +function print_error(msg) { + process.stderr.write(msg); + process.stderr.write("\n"); +} + +function print(txt) { + process.stdout.write(txt); + process.stdout.write("\n"); +} + +function describe_ast() { + var out = Terser.OutputStream({ beautify: true }); + function doitem(ctor) { + out.print("AST_" + ctor.TYPE); + var props = ctor.SELF_PROPS.filter(function(prop) { + return !/^\$/.test(prop); + }); + if (props.length > 0) { + out.space(); + out.with_parens(function() { + props.forEach(function(prop, i) { + if (i) out.space(); + out.print(prop); + }); + }); + } + if (ctor.documentation) { + out.space(); + out.print_string(ctor.documentation); + } + if (ctor.SUBCLASSES.length > 0) { + out.space(); + out.with_block(function() { + ctor.SUBCLASSES.forEach(function(ctor, i) { + out.indent(); + doitem(ctor); + out.newline(); + }); + }); + } + } + doitem(Terser.AST_Node); + return out + "\n"; +} diff --git a/public/node_modules/_terser@4.5.1@terser/bin/uglifyjs b/public/node_modules/_terser@4.5.1@terser/bin/uglifyjs new file mode 100755 index 000000000..f19302507 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/bin/uglifyjs @@ -0,0 +1,10 @@ +#!/usr/bin/env node +// -*- js -*- +/* eslint-env node */ + +"use strict"; + +process.stderr.write( "DEPRECATION WARNING: uglifyjs binary will soon be discontinued!\n"); +process.stderr.write("Please use \"terser\" instead.\n\n"); + +require("./terser"); diff --git a/public/node_modules/_terser@4.5.1@terser/dist/.gitkeep b/public/node_modules/_terser@4.5.1@terser/dist/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/public/node_modules/_terser@4.5.1@terser/dist/bundle.min.js b/public/node_modules/_terser@4.5.1@terser/dist/bundle.min.js new file mode 100644 index 000000000..dd5589eda --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/dist/bundle.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("source-map")):"function"==typeof define&&define.amd?define(["exports","source-map"],t):t((e=e||self).Terser={},e.sourceMap)}(this,(function(e,t){"use strict";function n(e){return e.split("")}function i(e,t){return t.includes(e)}t=t&&t.hasOwnProperty("default")?t.default:t;class r extends Error{constructor(e,t){super(),this.name="DefaultsError",this.message=e,this.defs=t}}function o(e,t,n){!0===e&&(e={});const i=e||{};if(n)for(const e in i)if(g(i,e)&&!g(t,e))throw new r("`"+e+"` is not a supported option",t);for(const n in t)if(g(t,n))if(e&&g(e,n))if("ecma"===n){let t=0|e[n];t>5&&t<2015&&(t+=2009),i[n]=t}else i[n]=e&&g(e,n)?e[n]:t[n];else i[n]=t[n];return i}function a(){}function s(){return!1}function u(){return!0}function c(){return this}function l(){return null}var f=function(){function e(e,o,a){var s,u=[],c=[];function l(){var l=o(e[s],s),f=l instanceof r;return f&&(l=l.v),l instanceof n?(l=l.v)instanceof i?c.push.apply(c,a?l.v.slice().reverse():l.v):c.push(l):l!==t&&(l instanceof i?u.push.apply(u,a?l.v.slice().reverse():l.v):u.push(l)),f}if(Array.isArray(e))if(a){for(s=e.length;--s>=0&&!l(););u.reverse(),c.reverse()}else for(s=0;s=0;)e[n]===t&&e.splice(n,1)}function E(e,t){if(e.length<2)return e.slice();return function e(n){if(n.length<=1)return n;var i=Math.floor(n.length/2),r=n.slice(0,i),o=n.slice(i);return function(e,n){for(var i=[],r=0,o=0,a=0;r!?|~^")),N=/[0-9a-f]/i,w=/^0x[0-9a-f]+$/i,x=/^0[0-7]+$/,k=/^0o[0-7]+$/i,I=/^0b[01]+$/i,L=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,V=/^(0[xob])?[0-9a-f]+n$/i,P=h(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","**","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]),B=h(n("  \n\r\t\f\v​           \u2028\u2029   \ufeff")),K=h(n("\n\r\u2028\u2029")),U=h(n(";]),:")),G=h(n("[{(,;:")),H=h(n("[]{}(),;:")),X={ID_Start:/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\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-\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-\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]/,ID_Continue:/[0-9A-Z_a-z\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\u0A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DB3-\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\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-\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C76\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-\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-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function z(e,t){var n=e.charAt(t);if(W(n)){var i=e.charAt(t+1);if(Y(i))return n+i}else if(Y(n)){var r=e.charAt(t-1);if(W(r))return r+n}return n}function W(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e>=55296&&e<=56319}function Y(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e>=56320&&e<=57343}function q(e){return e>=48&&e<=57}function $(e){var t=e.charCodeAt(0);return X.ID_Start.test(e)||36==t||95==t}function j(e){var t=e.charCodeAt(0);return X.ID_Continue.test(e)||36==t||95==t||8204==t||8205==t}function Z(e){return/^[a-z_$][a-z0-9_$]*$/i.test(e)}function J(e,t=!0){if(!t&&e.includes("e"))return NaN;if(w.test(e))return parseInt(e.substr(2),16);if(x.test(e))return parseInt(e.substr(1),8);if(k.test(e))return parseInt(e.substr(2),8);if(I.test(e))return parseInt(e.substr(2),2);if(L.test(e))return parseFloat(e);var n=parseFloat(e);return n==e?n:void 0}class Q extends Error{constructor(e,t,n,i,r){super(),this.name="SyntaxError",this.message=e,this.filename=t,this.line=n,this.col=i,this.pos=r}}function ee(e,t,n,i,r){throw new Q(e,t,n,i,r)}function te(e,t,n){return e.type==t&&(null==n||e.value==n)}var ne={};function ie(e,t,n,i){var r={text:e,filename:t,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,brace_counter:0,template_braces:[],comments_before:[],directives:{},directive_stack:[]};function o(){return z(r.text,r.pos)}function a(e,t){var n=z(r.text,r.pos++);if(e&&!n)throw ne;return K.has(n)?(r.newline_before=r.newline_before||!t,++r.line,r.col=0,"\r"==n&&"\n"==o()&&(++r.pos,n="\n")):(n.length>1&&(++r.pos,++r.col),++r.col),n}function s(e){for(;e-- >0;)a()}function u(e){return r.text.substr(r.pos,e.length)==e}function c(e,t){var n=r.text.indexOf(e,r.pos);if(t&&-1==n)throw ne;return n}function l(){r.tokline=r.line,r.tokcol=r.col,r.tokpos=r.pos}var f=!1,p=null;function _(n,i,o){r.regex_allowed="operator"==n&&!oe.has(i)||"keyword"==n&&M.has(i)||"punc"==n&&G.has(i)||"arrow"==n,"punc"==n&&"."==i?f=!0:o||(f=!1);var a={type:n,value:i,line:r.tokline,col:r.tokcol,pos:r.tokpos,endline:r.line,endcol:r.col,endpos:r.pos,nlb:r.newline_before,file:t};return/^(?:num|string|regexp)$/i.test(n)&&(a.raw=e.substring(a.pos,a.endpos)),o||(a.comments_before=r.comments_before,a.comments_after=r.comments_before=[]),r.newline_before=!1,a=new fe(a),o||(p=a),a}function d(){for(;B.has(o());)a()}function m(e){ee(e,t,r.tokline,r.tokcol,r.tokpos)}function E(e){var t=!1,n=!1,i=!1,r="."==e,s=!1,u=function(e){for(var t,n="",i=0;(t=o())&&e(t,i++);)n+=a();return n}((function(o,a){if(s)return!1;switch(o.charCodeAt(0)){case 98:case 66:return i=!0;case 111:case 79:case 120:case 88:return!i&&(i=!0);case 101:case 69:return!!i||!t&&(t=n=!0);case 45:return n||0==a&&!e;case 43:return n;case n=!1,46:return!(r||i||t)&&(r=!0)}return"n"===o?(s=!0,!0):N.test(o)}));if(e&&(u=e+u),x.test(u)&&L.has_directive("use strict")&&m("Legacy octal literals are not allowed in strict mode"),u.endsWith("n")){const e=u.slice(0,-1),t=J(e,!1);if(!r&&V.test(u)&&!isNaN(t))return _("big_int",e);m("Invalid or unexpected token")}var c=J(u);if(!isNaN(c))return _("num",c);m("Invalid syntax: "+u)}function h(e){return e>="0"&&e<="7"}function D(e,t,n){var i,s=a(!0,e);switch(s.charCodeAt(0)){case 110:return"\n";case 114:return"\r";case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 120:return String.fromCharCode(g(2,t));case 117:if("{"==o()){for(a(!0),"}"===o()&&m("Expecting hex-character between {}");"0"==o();)a(!0);var u,l=c("}",!0)-r.pos;return(l>6||(u=g(l,t))>1114111)&&m("Unicode reference out of bounds"),a(!0),(i=u)>65535?(i-=65536,String.fromCharCode(55296+(i>>10))+String.fromCharCode(i%1024+56320)):String.fromCharCode(i)}return String.fromCharCode(g(4,t));case 10:return"";case 13:if("\n"==o())return a(!0,e),""}if(h(s)){if(n&&t){"0"===s&&!h(o())||m("Octal escape sequences are not allowed in template strings")}return function(e,t){var n=o();n>="0"&&n<="7"&&(e+=a(!0))[0]<="3"&&(n=o())>="0"&&n<="7"&&(e+=a(!0));if("0"===e)return"\0";e.length>0&&L.has_directive("use strict")&&t&&m("Legacy octal escape sequences are not allowed in strict mode");return String.fromCharCode(parseInt(e,8))}(s,t)}return s}function g(e,t){for(var n=0;e>0;--e){if(!t&&isNaN(parseInt(o(),16)))return parseInt(n,16)||"";var i=a(!0);isNaN(parseInt(i,16))&&m("Invalid hex-character pattern in string"),n+=i}return parseInt(n,16)}var S=I("Unterminated string constant",(function(){for(var e=a(),t="";;){var n=a(!0,!0);if("\\"==n)n=D(!0,!0);else if("\r"==n||"\n"==n)m("Unterminated string constant");else if(n==e)break;t+=n}var i=_("string",t);return i.quote=e,i})),A=I("Unterminated template",(function(e){e&&r.template_braces.push(r.brace_counter);var t,n,i="",s="";for(a(!0,!0);"`"!=(t=a(!0,!0));){if("\r"==t)"\n"==o()&&++r.pos,t="\n";else if("$"==t&&"{"==o())return a(!0,!0),r.brace_counter++,(n=_(e?"template_head":"template_substitution",i)).raw=s,n;if(s+=t,"\\"==t){var u=r.pos;t=D(!0,!(p&&("name"===p.type||"punc"===p.type&&(")"===p.value||"]"===p.value))),!0),s+=r.text.substr(u,r.pos-u)}i+=t}return r.template_braces.pop(),(n=_(e?"template_head":"template_substitution",i)).raw=s,n.end=!0,n}));function v(e){var t,n=r.regex_allowed,i=function(){for(var e=r.text,t=r.pos,n=r.text.length;t"===o()?(a(),_("arrow","=>")):w("=");case 96:return A(!0);case 123:r.brace_counter++;break;case 125:if(r.brace_counter--,r.template_braces.length>0&&r.template_braces[r.template_braces.length-1]===r.brace_counter)return A(!1)}if(q(c))return E();if(H.has(t))return _("punc",a());if(R.has(t))return w();if(92==c||$(t))return h=void 0,h=b(),f?_("name",h):O.has(h)?_("atom",h):C.has(h)?P.has(h)?_("operator",h):_("keyword",h):_("name",h);break}var h;m("Unexpected character '"+t+"'")}return L.next=a,L.peek=o,L.context=function(e){return e&&(r=e),r},L.add_directive=function(e){r.directive_stack[r.directive_stack.length-1].push(e),void 0===r.directives[e]?r.directives[e]=1:r.directives[e]++},L.push_directives_stack=function(){r.directive_stack.push([])},L.pop_directives_stack=function(){for(var e=r.directive_stack[r.directive_stack.length-1],t=0;t0},L}var re=h(["typeof","void","delete","--","++","!","~","-","+"]),oe=h(["--","++"]),ae=h(["=","+=","-=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&="]),se=function(e,t){for(var n=0;n","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],{}),ue=h(["atom","num","big_int","string","regexp","name"]);function ce(e,t){const n=new Map;t=o(t,{bare_returns:!1,ecma:2017,expression:!1,filename:null,html5_comments:!0,module:!1,shebang:!0,strict:!1,toplevel:null},!0);var i={input:"string"==typeof e?ie(e,t.filename,t.html5_comments,t.shebang):e,token:null,prev:null,peeked:null,in_function:0,in_async:-1,in_generator:-1,in_directives:!0,in_loop:0,labels:[]};function r(e,t){return te(i.token,e,t)}function a(){return i.peeked||(i.peeked=i.input())}function s(){return i.prev=i.token,i.peeked||a(),i.token=i.peeked,i.peeked=null,i.in_directives=i.in_directives&&("string"==i.token.type||r("punc",";")),i.token}function u(){return i.prev}function c(e,t,n,r){var o=i.input.context();ee(e,o.filename,null!=t?t:o.tokline,null!=n?n:o.tokcol,null!=r?r:o.tokpos)}function l(e,t){c(t,e.line,e.col)}function f(e){null==e&&(e=i.token),l(e,"Unexpected token: "+e.type+" ("+e.value+")")}function p(e,t){if(r(e,t))return s();l(i.token,"Unexpected token "+i.token.type+" «"+i.token.value+"», expected "+e+" «"+t+"»")}function _(e){return p("punc",e)}function d(e){return e.nlb||!e.comments_before.every(e=>!e.nlb)}function m(){return!t.strict&&(r("eof")||r("punc","}")||d(i.token))}function E(){return i.in_generator===i.in_function}function h(){return i.in_async===i.in_function}function D(e){r("punc",";")?s():e||m()||f()}function g(){_("(");var e=qe(!0);return _(")"),e}function S(e){return function(...t){const n=i.token,r=e(...t);return r.start=n,r.end=u(),r}}function A(){(r("operator","/")||r("operator","/="))&&(i.peeked=null,i.token=i.input(i.token.value.substr(1)))}i.token=s();var v=S((function(e,n,o){switch(A(),i.token.type){case"string":if(i.in_directives){var E=a();!i.token.raw.includes("\\")&&(te(E,"punc",";")||te(E,"punc","}")||d(E)||te(E,"eof"))?i.input.add_directive(i.token.value):i.in_directives=!1}var S=i.in_directives,y=T();return S&&y.body instanceof sn?new me(y.body):y;case"template_head":case"num":case"big_int":case"regexp":case"operator":case"atom":return T();case"name":if("async"==i.token.value&&te(a(),"keyword","function"))return s(),s(),n&&c("functions are not allowed as the body of a loop"),O(Be,!1,!0,e);if("import"==i.token.value&&!te(a(),"punc","(")){s();var C=function(){var e,t,n=u();r("name")&&(e=le(jt));r("punc",",")&&s();((t=J(!0))||e)&&p("name","from");var o=i.token;"string"!==o.type&&f();return s(),new lt({start:n,imported_name:e,imported_names:t,module_name:new sn({start:o,value:o.value,quote:o.quote,end:o}),end:i.token})}();return D(),C}return te(a(),"punc",":")?function(){var e=le(Jt);"await"===e.name&&h()&&l(i.prev,"await cannot be used as label inside async function");i.labels.some(t=>t.name===e.name)&&c("Label "+e.name+" defined twice");_(":"),i.labels.push(e);var t=v();i.labels.pop(),t instanceof be||e.references.forEach((function(t){t instanceof je&&(t=t.label.start,c("Continue label `"+e.name+"` refers to non-IterationStatement.",t.line,t.col,t.pos))}));return new Te({body:t,label:e})}():T();case"punc":switch(i.token.value){case"{":return new Se({start:i.token,body:x(),end:u()});case"[":case"(":return T();case";":return i.in_directives=!1,s(),new Ae;default:f()}case"keyword":switch(i.token.value){case"break":return s(),b($e);case"continue":return s(),b(je);case"debugger":return s(),D(),new de;case"do":s();var F=Qe(v);p("keyword","while");var M=g();return D(!0),new Ce({body:F,condition:M});case"while":return s(),new Oe({condition:g(),body:Qe((function(){return v(!1,!0)}))});case"for":return s(),function(){var e="`for await` invalid in this context",t=i.token;"name"==t.type&&"await"==t.value?(h()||l(t,e),s()):t=!1;_("(");var n=null;if(r("punc",";"))t&&l(t,e);else{n=r("keyword","var")?(s(),L(!0)):r("keyword","let")?(s(),V(!0)):r("keyword","const")?(s(),P(!0)):qe(!0,!0);var o=r("operator","in"),a=r("name","of");if(t&&!a&&l(t,e),o||a)return n instanceof ot?n.definitions.length>1&&l(n.start,"Only one variable declaration allowed in for..in loop"):we(n)||(n=Xe(n))instanceof Ke||l(n.start,"Invalid left-hand side in for..in loop"),s(),o?function(e){var t=qe(!0);return _(")"),new Me({init:e,object:t,body:Qe((function(){return v(!1,!0)}))})}(n):function(e,t){var n=e instanceof ot?e.definitions[0].name:null,i=qe(!0);return _(")"),new Re({await:t,init:e,name:n,object:i,body:Qe((function(){return v(!1,!0)}))})}(n,!!t)}return function(e){_(";");var t=r("punc",";")?null:qe(!0);_(";");var n=r("punc",")")?null:qe(!0);return _(")"),new Fe({init:e,condition:t,step:n,body:Qe((function(){return v(!1,!0)}))})}(n)}();case"class":return s(),n&&c("classes are not allowed as the body of a loop"),o&&c("classes are not allowed as the body of an if"),q(kt);case"function":return s(),n&&c("functions are not allowed as the body of a loop"),O(Be,!1,!1,e);case"if":return s(),function(){var e=g(),t=v(!1,!1,!0),n=null;r("keyword","else")&&(s(),n=v(!1,!1,!0));return new Ze({condition:e,body:t,alternative:n})}();case"return":0!=i.in_function||t.bare_returns||c("'return' outside of function"),s();var N=null;return r("punc",";")?s():m()||(N=qe(!0),D()),new We({value:N});case"switch":return s(),new Je({expression:g(),body:Qe(k)});case"throw":s(),d(i.token)&&c("Illegal newline after 'throw'");N=qe(!0);return D(),new Ye({value:N});case"try":return s(),function(){var e=x(),t=null,n=null;if(r("keyword","catch")){var o=i.token;if(s(),r("punc","{"))var a=null;else{_("(");a=R(void 0,$t);_(")")}t=new it({start:o,argname:a,body:x(),end:u()})}if(r("keyword","finally")){o=i.token;s(),n=new rt({start:o,body:x(),end:u()})}t||n||c("Missing catch/finally blocks");return new nt({body:e,bcatch:t,bfinally:n})}();case"var":s();C=L();return D(),C;case"let":s();C=V();return D(),C;case"const":s();C=P();return D(),C;case"with":return i.input.has_directive("use strict")&&c("Strict mode may not include a with statement"),s(),new Ne({expression:g(),body:v()});case"export":if(!te(a(),"punc","(")){s();C=function(){var e,t,n,o,c,l=i.token;if(r("keyword","default"))e=!0,s();else if(t=J(!1)){if(r("name","from")){s();var p=i.token;return"string"!==p.type&&f(),s(),new ft({start:l,is_default:e,exported_names:t,module_name:new sn({start:p,value:p.value,quote:p.quote,end:p}),end:u()})}return new ft({start:l,is_default:e,exported_names:t,end:u()})}r("punc","{")||e&&(r("keyword","class")||r("keyword","function"))&&te(a(),"punc")?(o=qe(!1),D()):(n=v(e))instanceof ot&&e?f(n.start):n instanceof ot||n instanceof Ie||n instanceof kt?c=n:n instanceof Ee?o=n.body:f(n.start);return new ft({start:l,is_default:e,exported_value:o,exported_definition:c,end:u()})}();return r("punc",";")&&D(),C}}}f()}));function T(e){return new Ee({body:(e=qe(!0),D(),e)})}function b(e){var t,n=null;m()||(n=le(nn,!0)),null!=n?((t=i.labels.find(e=>e.name===n.name))||c("Undefined label "+n.name),n.thedef=t):0==i.in_loop&&c(e.TYPE+" not inside a loop or switch"),D();var r=new e({label:n});return t&&t.references.push(r),r}var C=function(e,t,n){d(i.token)&&c("Unexpected newline before arrow (=>)"),p("arrow","=>");var o=w(r("punc","{"),!1,n),a=o instanceof Array&&o.length?o[o.length-1].end:o instanceof Array?e:o.end;return new Pe({start:e,end:a,async:n,argnames:t,body:o})},O=function(e,t,n,i){var o=e===Be,a=r("operator","*");a&&s();var c=r("name")?le(o?Xt:Wt):null;o&&!c&&(i?e=Ve:f()),!c||e===Le||c instanceof Pt||f(u());var l=[],p=w(!0,a||t,n,c,l);return new e({start:l.start,end:p.end,is_generator:a,async:n,name:c,argnames:l,body:p})};function M(e,t){var n=new Set,i=!1,r=!1,o=!1,a=!!t,s={add_parameter:function(t){if(n.has(t.value))!1===i&&(i=t),s.check_strict();else if(n.add(t.value),e)switch(t.value){case"arguments":case"eval":case"yield":a&&l(t,"Unexpected "+t.value+" identifier as parameter inside strict mode");break;default:F.has(t.value)&&f()}},mark_default_assignment:function(e){!1===r&&(r=e)},mark_spread:function(e){!1===o&&(o=e)},mark_strict_mode:function(){a=!0},is_strict:function(){return!1!==r||!1!==o||a},check_strict:function(){s.is_strict()&&!1!==i&&l(i,"Parameter "+i.value+" was used already")}};return s}function R(e,t){var n,o=!1;return void 0===e&&(e=M(!0,i.input.has_directive("use strict"))),r("expand","...")&&(o=i.token,e.mark_spread(i.token),s()),n=N(e,t),r("operator","=")&&!1===o&&(e.mark_default_assignment(i.token),s(),n=new yt({start:n.start,left:n,operator:"=",right:qe(!1),end:i.token})),!1!==o&&(r("punc",")")||f(),n=new ke({start:o,expression:n,end:o})),e.check_strict(),n}function N(e,t){var n,o=[],l=!0,p=!1,d=i.token;if(void 0===e&&(e=M(!1,i.input.has_directive("use strict"))),t=void 0===t?Ht:t,r("punc","[")){for(s();!r("punc","]");){if(l?l=!1:_(","),r("expand","...")&&(p=!0,n=i.token,e.mark_spread(i.token),s()),r("punc"))switch(i.token.value){case",":o.push(new mn({start:i.token,end:i.token}));continue;case"]":break;case"[":case"{":o.push(N(e,t));break;default:f()}else r("name")?(e.add_parameter(i.token),o.push(le(t))):c("Invalid function parameter");r("operator","=")&&!1===p&&(e.mark_default_assignment(i.token),s(),o[o.length-1]=new yt({start:o[o.length-1].start,left:o[o.length-1],operator:"=",right:qe(!1),end:i.token})),p&&(r("punc","]")||c("Rest element must be last element"),o[o.length-1]=new ke({start:n,expression:o[o.length-1],end:n}))}return _("]"),e.check_strict(),new Ke({start:d,names:o,is_array:!0,end:u()})}if(r("punc","{")){for(s();!r("punc","}");){if(l?l=!1:_(","),r("expand","...")&&(p=!0,n=i.token,e.mark_spread(i.token),s()),r("name")&&(te(a(),"punc")||te(a(),"operator"))&&[",","}","="].includes(a().value)){e.add_parameter(i.token);var m=u(),E=le(t);p?o.push(new ke({start:n,expression:E,end:E.end})):o.push(new Mt({start:m,key:E.name,value:E,end:E.end}))}else{if(r("punc","}"))continue;var h=i.token,D=Q();null===D?f(u()):"name"!==u().type||r("punc",":")?(_(":"),o.push(new Mt({start:h,quote:h.quote,key:D,value:N(e,t),end:u()}))):o.push(new Mt({start:u(),key:D,value:new t({start:u(),name:D,end:u()}),end:u()}))}p?r("punc","}")||c("Rest element must be last element"):r("operator","=")&&(e.mark_default_assignment(i.token),s(),o[o.length-1].value=new yt({start:o[o.length-1].value.start,left:o[o.length-1].value,operator:"=",right:qe(!1),end:i.token}))}return _("}"),e.check_strict(),new Ke({start:d,names:o,is_array:!1,end:u()})}if(r("name"))return e.add_parameter(i.token),le(t);c("Invalid function parameter")}function w(e,n,o,a,u){var c=i.in_loop,l=i.labels,p=i.in_generator,d=i.in_async;if(++i.in_function,n&&(i.in_generator=i.in_function),o&&(i.in_async=i.in_function),u&&function(e){var n=M(!0,i.input.has_directive("use strict"));for(_("(");!r("punc",")");){var o=R(n);if(e.push(o),r("punc",")")||(_(","),r("punc",")")&&t.ecma<2017&&f()),o instanceof ke)break}s()}(u),e&&(i.in_directives=!0),i.in_loop=0,i.labels=[],e){i.input.push_directives_stack();var m=x();a&&ce(a),u&&u.forEach(ce),i.input.pop_directives_stack()}else m=[new We({start:i.token,value:qe(!1),end:i.token})];return--i.in_function,i.in_loop=c,i.labels=l,i.in_generator=p,i.in_async=d,m}function x(){_("{");for(var e=[];!r("punc","}");)r("eof")&&f(),e.push(v());return s(),e}function k(){_("{");for(var e,t=[],n=null,o=null;!r("punc","}");)r("eof")&&f(),r("keyword","case")?(o&&(o.end=u()),n=[],o=new tt({start:(e=i.token,s(),e),expression:qe(!0),body:n}),t.push(o),_(":")):r("keyword","default")?(o&&(o.end=u()),n=[],o=new et({start:(e=i.token,s(),_(":"),e),body:n}),t.push(o)):(n||f(),n.push(v()));return o&&(o.end=u()),s(),t}function I(e,t){for(var n,o=[];;){var a="var"===t?Bt:"const"===t?Ut:"let"===t?Gt:null;if(r("punc","{")||r("punc","[")?n=new pt({start:i.token,name:N(void 0,a),value:r("operator","=")?(p("operator","="),qe(!1,e)):null,end:u()}):"import"==(n=new pt({start:i.token,name:le(a),value:r("operator","=")?(s(),qe(!1,e)):e||"const"!==t?null:c("Missing initializer in const declaration"),end:u()})).name.name&&c("Unexpected token: import"),o.push(n),!r("punc",","))break;s()}return o}var L=function(e){return new at({start:u(),definitions:I(e,"var"),end:u()})},V=function(e){return new st({start:u(),definitions:I(e,"let"),end:u()})},P=function(e){return new ut({start:u(),definitions:I(e,"const"),end:u()})};function B(){var e,t=i.token;switch(t.type){case"name":e=ne(Qt);break;case"num":e=new un({start:t,end:t,value:t.value});break;case"big_int":e=new cn({start:t,end:t,value:t.value});break;case"string":e=new sn({start:t,end:t,value:t.value,quote:t.quote});break;case"regexp":e=new ln({start:t,end:t,value:t.value});break;case"atom":switch(t.value){case"false":e=new Dn({start:t,end:t});break;case"true":e=new gn({start:t,end:t});break;case"null":e=new pn({start:t,end:t})}}return s(),e}function K(e,t,n,i){var r=function(e,t){return t?new yt({start:e.start,left:e,operator:"=",right:t,end:t.end}):e};return e instanceof Ot?r(new Ke({start:e.start,end:e.end,is_array:!1,names:e.properties.map(K)}),i):e instanceof Mt?(e.value=K(e.value,0,[e.key]),r(e,i)):e instanceof mn?e:e instanceof Ke?(e.names=e.names.map(K),r(e,i)):e instanceof Qt?r(new Ht({name:e.name,start:e.start,end:e.end}),i):e instanceof ke?(e.expression=K(e.expression),r(e,i)):e instanceof Ct?r(new Ke({start:e.start,end:e.end,is_array:!0,names:e.elements.map(K)}),i):e instanceof bt?r(K(e.left,void 0,void 0,e.right),i):e instanceof yt?(e.left=K(e.left,0,[e.left]),e):void c("Invalid function parameter",e.start.line,e.start.col)}var G=function(e,o){if(r("operator","new"))return function(e){var n=i.token;if(p("operator","new"),r("punc","."))return s(),p("name","target"),_e(new Vt({start:n,end:u()}),e);var o,a=G(!1);r("punc","(")?(s(),o=X(")",t.ecma>=2017)):o=[];var c=new dt({start:n,expression:a,args:o,end:u()});return fe(c),_e(c,e)}(e);var c,l=i.token,d=r("name","async")&&"["!=(c=a()).value&&"arrow"!=c.type&&B();if(r("punc")){switch(i.token.value){case"(":if(d&&!e)break;var m=function(e,n){var o,a,c,l=[];for(_("(");!r("punc",")");)o&&f(o),r("expand","...")?(o=i.token,n&&(a=i.token),s(),l.push(new ke({start:u(),expression:qe(),end:i.token}))):l.push(qe()),r("punc",")")||(_(","),r("punc",")")&&(t.ecma<2017&&f(),c=u(),n&&(a=c)));return _(")"),e&&r("arrow","=>")?o&&c&&f(c):a&&f(a),l}(o,!d);if(o&&r("arrow","=>"))return C(l,m.map(K),!!d);var E=d?new _t({expression:d,args:m}):1==m.length?m[0]:new mt({expressions:m});if(E.start){const e=l.comments_before.length;if(n.set(l,e),E.start.comments_before.unshift(...l.comments_before),l.comments_before=E.start.comments_before,0==e&&l.comments_before.length>0){var h=l.comments_before[0];h.nlb||(h.nlb=l.nlb,l.nlb=!1)}l.comments_after=E.start.comments_after}E.start=l;var D=u();return E.end&&(D.comments_before=E.end.comments_before,E.end.comments_after.push(...D.comments_after),D.comments_after=E.end.comments_after),E.end=D,E instanceof _t&&fe(E),_e(E,e);case"[":return _e(z(),e);case"{":return _e(Y(),e)}d||f()}if(o&&r("name")&&te(a(),"arrow")){var g=new Ht({name:i.token.value,start:l,end:l});return s(),C(l,[g],!!d)}if(r("keyword","function")){s();var S=O(Ve,!1,!!d);return S.start=l,S.end=u(),_e(S,e)}if(d)return _e(d,e);if(r("keyword","class")){s();var A=q(It);return A.start=l,A.end=u(),_e(A,e)}return r("template_head")?_e(H(),e):ue.has(i.token.type)?_e(B(),e):void f()};function H(e){var t=[],n=i.token;for(t.push(new He({start:i.token,raw:i.token.raw,value:i.token.value,end:i.token}));!i.token.end;)s(),A(),t.push(qe(!0)),te("template_substitution")||f(),t.push(new He({start:i.token,raw:i.token.raw,value:i.token.value,end:i.token}));return s(),new Ge({start:n,segments:t,end:i.token})}function X(e,t,n){for(var o=!0,a=[];!r("punc",e)&&(o?o=!1:_(","),!t||!r("punc",e));)r("punc",",")&&n?a.push(new mn({start:i.token,end:i.token})):r("expand","...")?(s(),a.push(new ke({start:u(),expression:qe(),end:i.token}))):a.push(qe(!1));return s(),a}var z=S((function(){return _("["),new Ct({elements:X("]",!t.strict,!0)})})),W=S((e,t)=>O(Le,e,t)),Y=S((function(){var e=i.token,n=!0,o=[];for(_("{");!r("punc","}")&&(n?n=!1:_(","),t.strict||!r("punc","}"));)if("expand"!=(e=i.token).type){var a,c=Q();if(r("punc",":"))null===c?f(u()):(s(),a=qe(!1));else{var l=$(c,e);if(l){o.push(l);continue}a=new Qt({start:u(),name:c,end:u()})}r("operator","=")&&(s(),a=new bt({start:e,left:a,operator:"=",right:qe(!1),end:u()})),o.push(new Mt({start:e,quote:e.quote,key:c instanceof pe?c:""+c,value:a,end:u()}))}else s(),o.push(new ke({start:e,expression:qe(!1),end:u()}));return s(),new Ot({properties:o})}));function q(e){var t,n,o,a,c=[];for(i.input.push_directives_stack(),i.input.add_directive("use strict"),"name"==i.token.type&&"extends"!=i.token.value&&(o=le(e===kt?Yt:qt)),e!==kt||o||f(),"extends"==i.token.value&&(s(),a=qe(!0)),_("{");r("punc",";");)s();for(;!r("punc","}");)for(t=i.token,(n=$(Q(),t,!0))||f(),c.push(n);r("punc",";");)s();return i.input.pop_directives_stack(),s(),new e({start:t,name:o,extends:a,properties:c,end:u()})}function $(e,t,n){var o=function(e,t){return"string"==typeof e||"number"==typeof e?new zt({start:t,name:""+e,end:u()}):(null===e&&f(),e)},a=!1,s=!1,c=!1,l=t;if(n&&"static"===e&&!r("punc","(")&&(s=!0,l=i.token,e=Q()),"async"!==e||r("punc","(")||r("punc",",")||r("punc","}")||r("operator","=")||(a=!0,l=i.token,e=Q()),null===e&&(c=!0,l=i.token,null===(e=Q())&&f()),r("punc","("))return e=o(e,t),new wt({start:t,static:s,is_generator:c,async:a,key:e,quote:e instanceof zt?l.quote:void 0,value:W(c,a),end:u()});if(l=i.token,"get"==e){if(!r("punc")||r("punc","["))return e=o(Q(),t),new Nt({start:t,static:s,key:e,quote:e instanceof zt?l.quote:void 0,value:W(),end:u()})}else if("set"==e&&(!r("punc")||r("punc","[")))return e=o(Q(),t),new Rt({start:t,static:s,key:e,quote:e instanceof zt?l.quote:void 0,value:W(),end:u()})}function j(e){function t(e){return new e({name:Q(),start:u(),end:u()})}var n,o,a=e?Zt:tn,c=e?jt:en,l=i.token;return e?n=t(a):o=t(c),r("name","as")?(s(),e?o=t(c):n=t(a)):e?o=new c(n):n=new a(o),new ct({start:l,foreign_name:n,name:o,end:u()})}function Z(e,t){var n,r=e?Zt:tn,o=e?jt:en,a=i.token,s=u();return t=t||new o({name:"*",start:a,end:s}),n=new r({name:"*",start:a,end:s}),new ct({start:a,foreign_name:n,name:t,end:s})}function J(e){var t;if(r("punc","{")){for(s(),t=[];!r("punc","}");)t.push(j(e)),r("punc",",")&&s();s()}else if(r("operator","*")){var n;s(),e&&r("name","as")&&(s(),n=le(e?jt:tn)),t=[Z(e,n)]}return t}function Q(){var e=i.token;switch(e.type){case"punc":if("["===e.value){s();var t=qe(!1);return _("]"),t}f(e);case"operator":if("*"===e.value)return s(),null;["delete","in","instanceof","new","typeof","void"].includes(e.value)||f(e);case"name":"yield"==e.value&&(E()?l(e,"Yield cannot be used as identifier inside generators"):te(a(),"punc",":")||te(a(),"punc","(")||!i.input.has_directive("use strict")||l(e,"Unexpected yield identifier inside strict mode"));case"string":case"num":case"big_int":case"keyword":case"atom":return s(),e.value;default:f(e)}}function ne(e){var t=i.token.value;return new("this"==t?rn:"super"==t?on:e)({name:String(t),start:i.token,end:i.token})}function ce(e){var t=e.name;E()&&"yield"==t&&l(e.start,"Yield cannot be used as identifier inside generators"),i.input.has_directive("use strict")&&("yield"==t&&l(e.start,"Unexpected yield identifier inside strict mode"),e instanceof Pt&&("arguments"==t||"eval"==t)&&l(e.start,"Unexpected "+t+" in strict mode"))}function le(e,t){if(!r("name"))return t||c("Name expected"),null;var n=ne(e);return ce(n),s(),n}function fe(e){var t=e.start,i=t.comments_before;const r=n.get(t);for(var o=null!=r?r:i.length;--o>=0;){var a=i[o];if(/[@#]__/.test(a.value)){if(/[@#]__PURE__/.test(a.value)){y(e,bn);break}if(/[@#]__INLINE__/.test(a.value)){y(e,yn);break}if(/[@#]__NOINLINE__/.test(a.value)){y(e,Cn);break}}}}var _e=function(e,t){var n,o=e.start;if(r("punc","."))return s(),_e(new ht({start:o,expression:e,property:(n=i.token,"name"!=n.type&&f(),s(),n.value),end:u()}),t);if(r("punc","[")){s();var a=qe(!0);return _("]"),_e(new Dt({start:o,expression:e,property:a,end:u()}),t)}if(t&&r("punc","(")){s();var c=new _t({start:o,expression:e,args:he(),end:u()});return fe(c),_e(c,!0)}return r("template_head")?_e(new Ue({start:o,prefix:e,template_string:H(),end:u()}),t):e};function he(){for(var e=[];!r("punc",")");)r("expand","...")?(s(),e.push(new ke({start:u(),expression:qe(!1),end:u()}))):e.push(qe(!1)),r("punc",")")||(_(","),r("punc",")")&&t.ecma<2017&&f());return s(),e}var De=function(e,t){var n=i.token;if("name"==n.type&&"await"==n.value){if(h())return s(),h()||c("Unexpected await expression outside async function",i.prev.line,i.prev.col,i.prev.pos),new Sn({start:u(),end:i.token,expression:De(!0)});i.input.has_directive("use strict")&&l(i.token,"Unexpected await identifier inside strict mode")}if(r("operator")&&re.has(n.value)){s(),A();var o=ge(St,n,De(e));return o.start=n,o.end=u(),o}for(var a=G(e,t);r("operator")&&oe.has(i.token.value)&&!d(i.token);)a instanceof Pe&&f(),(a=ge(At,i.token,a)).start=n,a.end=i.token,s();return a};function ge(e,t,n){var r=t.value;switch(r){case"++":case"--":we(n)||c("Invalid use of "+r+" operator",t.line,t.col,t.pos);break;case"delete":n instanceof Qt&&i.input.has_directive("use strict")&&c("Calling delete on expression not allowed in strict mode",n.start.line,n.start.col,n.start.pos)}return new e({operator:r,expression:n})}var ve=function(e,t,n){var o=r("operator")?i.token.value:null;"in"==o&&n&&(o=null),"**"==o&&e instanceof St&&!te(e.start,"punc","(")&&"--"!==e.operator&&"++"!==e.operator&&f(e.start);var a=null!=o?se[o]:null;if(null!=a&&(a>t||"**"===o&&t===a)){s();var u=ve(De(!0),a,n);return ve(new vt({start:e.start,left:e,operator:o,right:u,end:u.end}),t,n)}return e};var ye=function(e){var t=i.token,n=function(e){return ve(De(!0,!0),0,e)}(e);if(r("operator","?")){s();var o=qe(!1);return _(":"),new Tt({start:t,condition:n,consequent:o,alternative:qe(!1,e),end:u()})}return n};function we(e){return e instanceof Et||e instanceof Qt}function Xe(e){if(e instanceof Ot)e=new Ke({start:e.start,names:e.properties.map(Xe),is_array:!1,end:e.end});else if(e instanceof Ct){for(var t=[],n=0;n=0;)o+="this."+t[a]+" = props."+t[a]+";";const s=i&&Object.create(i.prototype);(s&&s.initialize||n&&n.initialize)&&(o+="this.initialize();"),o+="}",o+="this.flags = 0;",o+="}";var u=new Function(o)();if(s&&(u.prototype=s,u.BASE=i),i&&i.SUBCLASSES.push(u),u.prototype.CTOR=u,u.PROPS=t||null,u.SELF_PROPS=r,u.SUBCLASSES=[],e&&(u.prototype.TYPE=u.TYPE=e),n)for(a in n)g(n,a)&&("$"===a[0]?u[a.substr(1)]=n[a]:u.prototype[a]=n[a]);return u.DEFMETHOD=function(e,t){this.prototype[e]=t},u}var fe=le("Token","type value line col pos endline endcol endpos nlb comments_before comments_after file raw quote end",{},null),pe=le("Node","start end",{_clone:function(e){if(e){var t=this.clone();return t.transform(new Tn((function(e){if(e!==t)return e.clone(!0)})))}return new this.CTOR(this)},clone:function(e){return this._clone(e)},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},_walk:function(e){return e._visit(this)},walk:function(e){return this._walk(e)}},null);pe.warn_function=null,pe.warn=function(e,t){pe.warn_function&&pe.warn_function(d(e,t))};var _e=le("Statement",null,{$documentation:"Base class of all statements"}),de=le("Debugger",null,{$documentation:"Represents a debugger statement"},_e),me=le("Directive","value quote",{$documentation:'Represents a directive, like "use strict";',$propdoc:{value:"[string] The value of this directive as a plain string (it's not an AST_String!)",quote:"[string] the original quote character"}},_e),Ee=le("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},_walk:function(e){return e._visit(this,(function(){this.body._walk(e)}))}},_e);function he(e,t){var n=e.body;if(n instanceof pe)n._walk(t);else for(var i=0,r=n.length;i SymbolDef for all variables/functions defined in this scope",functions:"[Map/S] like `variables`, but only lists function declarations",uses_with:"[boolean/S] tells whether this scope uses the `with` statement",uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",parent_scope:"[AST_Scope?/S] link to the parent scope",enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",cname:"[integer/S] current index for mangling variables (used internally by the mangler)"},get_defun_scope:function(){for(var e=this;e.is_block_scope();)e=e.parent_scope;return e},clone:function(e){var t=this._clone(e);return this.variables&&(t.variables=new Map(this.variables)),this.functions&&(t.functions=new Map(this.functions)),this.enclosed&&(t.enclosed=this.enclosed.slice()),t},pinned:function(){return this.uses_eval||this.uses_with}},ge),xe=le("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Map/S] a map of name -> SymbolDef for all undeclared names"},wrap_commonjs:function(e){var t=this.body,n="(function(exports){'$ORIG';})(typeof "+e+"=='undefined'?("+e+"={}):"+e+");";return n=(n=ce(n)).transform(new Tn((function(e){if(e instanceof me&&"$ORIG"==e.value)return f.splice(t)})))},wrap_enclose:function(e){"string"!=typeof e&&(e="");var t=e.indexOf(":");t<0&&(t=e.length);var n=this.body;return ce(["(function(",e.slice(0,t),'){"$ORIG"})(',e.slice(t+1),")"].join("")).transform(new Tn((function(e){if(e instanceof me&&"$ORIG"==e.value)return f.splice(n)})))}},we),ke=le("Expansion","expression",{$documentation:"An expandible argument, such as ...rest, a splat, such as [1,2,...all], or an expansion in a variable declaration, such as var [first, ...rest] = list",$propdoc:{expression:"[AST_Node] the thing to be expanded"},_walk:function(e){var t=this;return e._visit(this,(function(){t.expression.walk(e)}))}}),Ie=le("Lambda","name argnames uses_arguments is_generator async",{$documentation:"Base class for functions",$propdoc:{name:"[AST_SymbolDeclaration?] the name of this function",argnames:"[AST_SymbolFunarg|AST_Destructuring|AST_Expansion|AST_DefaultAssign*] array of function arguments, destructurings, or expanding arguments",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array",is_generator:"[boolean] is this a generator method",async:"[boolean] is this method async"},args_as_names:function(){for(var e=[],t=0;t b)"},Ie),Be=le("Defun",null,{$documentation:"A function definition"},Ie),Ke=le("Destructuring","names is_array",{$documentation:"A destructuring of several names. Used in destructuring assignment and with destructuring function argument names",$propdoc:{names:"[AST_Node*] Array of properties or elements",is_array:"[Boolean] Whether the destructuring represents an object or array"},_walk:function(e){return e._visit(this,(function(){this.names.forEach((function(t){t._walk(e)}))}))},all_symbols:function(){var e=[];return this.walk(new vn((function(t){t instanceof Lt&&e.push(t)}))),e}}),Ue=le("PrefixedTemplateString","template_string prefix",{$documentation:"A templatestring with a prefix, such as String.raw`foobarbaz`",$propdoc:{template_string:"[AST_TemplateString] The template string",prefix:"[AST_SymbolRef|AST_PropAccess] The prefix, which can be a symbol such as `foo` or a dotted expression such as `String.raw`."},_walk:function(e){this.prefix._walk(e),this.template_string._walk(e)}}),Ge=le("TemplateString","segments",{$documentation:"A template string literal",$propdoc:{segments:"[AST_Node*] One or more segments, starting with AST_TemplateSegment. AST_Node may follow AST_TemplateSegment, but each AST_Node must be followed by AST_TemplateSegment."},_walk:function(e){return e._visit(this,(function(){this.segments.forEach((function(t){t._walk(e)}))}))}}),He=le("TemplateSegment","value raw",{$documentation:"A segment of a template string literal",$propdoc:{value:"Content of the segment",raw:"Raw content of the segment"}}),Xe=le("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},_e),ze=le("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},_walk:function(e){return e._visit(this,this.value&&function(){this.value._walk(e)})}},Xe),We=le("Return",null,{$documentation:"A `return` statement"},ze),Ye=le("Throw",null,{$documentation:"A `throw` statement"},ze),qe=le("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},_walk:function(e){return e._visit(this,this.label&&function(){this.label._walk(e)})}},Xe),$e=le("Break",null,{$documentation:"A `break` statement"},qe),je=le("Continue",null,{$documentation:"A `continue` statement"},qe),Ze=le("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},_walk:function(e){return e._visit(this,(function(){this.condition._walk(e),this.body._walk(e),this.alternative&&this.alternative._walk(e)}))}},ve),Je=le("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},_walk:function(e){return e._visit(this,(function(){this.expression._walk(e),he(this,e)}))}},ge),Qe=le("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},ge),et=le("Default",null,{$documentation:"A `default` switch branch"},Qe),tt=le("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},_walk:function(e){return e._visit(this,(function(){this.expression._walk(e),he(this,e)}))}},Qe),nt=le("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},_walk:function(e){return e._visit(this,(function(){he(this,e),this.bcatch&&this.bcatch._walk(e),this.bfinally&&this.bfinally._walk(e)}))}},ge),it=le("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[AST_SymbolCatch|AST_Destructuring|AST_Expansion|AST_DefaultAssign] symbol for the exception"},_walk:function(e){return e._visit(this,(function(){this.argname&&this.argname._walk(e),he(this,e)}))}},ge),rt=le("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},ge),ot=le("Definitions","definitions",{$documentation:"Base class for `var` or `const` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},_walk:function(e){return e._visit(this,(function(){for(var t=this.definitions,n=0,i=t.length;n a`"},vt),Ct=le("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},_walk:function(e){return e._visit(this,(function(){for(var t=this.elements,n=0,i=t.length;nt._walk(e))}))}},we),kt=le("DefClass",null,{$documentation:"A class definition"},xt),It=le("ClassExpression",null,{$documentation:"A class expression."},xt),Lt=le("Symbol","scope name thedef",{$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},$documentation:"Base class for all symbols"}),Vt=le("NewTarget",null,{$documentation:"A reference to new.target"}),Pt=le("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var/const, function name or argument, symbol in catch)"},Lt),Bt=le("SymbolVar",null,{$documentation:"Symbol defining a variable"},Pt),Kt=le("SymbolBlockDeclaration",null,{$documentation:"Base class for block-scoped declaration symbols"},Pt),Ut=le("SymbolConst",null,{$documentation:"A constant declaration"},Kt),Gt=le("SymbolLet",null,{$documentation:"A block-scoped `let` declaration"},Kt),Ht=le("SymbolFunarg",null,{$documentation:"Symbol naming a function argument"},Bt),Xt=le("SymbolDefun",null,{$documentation:"Symbol defining a function"},Pt),zt=le("SymbolMethod",null,{$documentation:"Symbol in an object defining a method"},Lt),Wt=le("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},Pt),Yt=le("SymbolDefClass",null,{$documentation:"Symbol naming a class's name in a class declaration. Lexically scoped to its containing scope, and accessible within the class."},Kt),qt=le("SymbolClass",null,{$documentation:"Symbol naming a class's name. Lexically scoped to the class."},Pt),$t=le("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},Kt),jt=le("SymbolImport",null,{$documentation:"Symbol referring to an imported name"},Kt),Zt=le("SymbolImportForeign",null,{$documentation:"A symbol imported from a module, but it is defined in the other module, and its real name is irrelevant for this module's purposes"},Lt),Jt=le("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LoopControl*] a list of nodes referring to this label"},initialize:function(){this.references=[],this.thedef=this}},Lt),Qt=le("SymbolRef",null,{$documentation:"Reference to some symbol (not definition/declaration)"},Lt),en=le("SymbolExport",null,{$documentation:"Symbol referring to a name to export"},Qt),tn=le("SymbolExportForeign",null,{$documentation:"A symbol exported from this module, but it is used in the other module, and its real name is irrelevant for this module's purposes"},Lt),nn=le("LabelRef",null,{$documentation:"Reference to a label symbol"},Lt),rn=le("This",null,{$documentation:"The `this` symbol"},Lt),on=le("Super",null,{$documentation:"The `super` symbol"},rn),an=le("Constant",null,{$documentation:"Base class for all constants",getValue:function(){return this.value}}),sn=le("String","value quote",{$documentation:"A string literal",$propdoc:{value:"[string] the contents of this string",quote:"[string] the original quote character"}},an),un=le("Number","value literal",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value",literal:"[string] numeric value as string (optional)"}},an),cn=le("BigInt","value",{$documentation:"A big int literal",$propdoc:{value:"[string] big int value"}},an),ln=le("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"}},an),fn=le("Atom",null,{$documentation:"Base class for atoms"},an),pn=le("Null",null,{$documentation:"The `null` atom",value:null},fn),_n=le("NaN",null,{$documentation:"The impossible value",value:NaN},fn),dn=le("Undefined",null,{$documentation:"The `undefined` value",value:void 0},fn),mn=le("Hole",null,{$documentation:"A hole in an array",value:void 0},fn),En=le("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},fn),hn=le("Boolean",null,{$documentation:"Base class for booleans"},fn),Dn=le("False",null,{$documentation:"The `false` atom",value:!1},hn),gn=le("True",null,{$documentation:"The `true` atom",value:!0},hn),Sn=le("Await","expression",{$documentation:"An `await` statement",$propdoc:{expression:"[AST_Node] the mandatory expression being awaited"},_walk:function(e){return e._visit(this,(function(){this.expression._walk(e)}))}}),An=le("Yield","expression is_star",{$documentation:"A `yield` statement",$propdoc:{expression:"[AST_Node?] the value returned or thrown by this statement; could be null (representing undefined) but only when is_star is set to false",is_star:"[Boolean] Whether this is a yield or yield* statement"},_walk:function(e){return e._visit(this,this.expression&&function(){this.expression._walk(e)})}});class vn{constructor(e){this.visit=e,this.stack=[],this.directives=Object.create(null)}_visit(e,t){this.push(e);var n=this.visit(e,t?function(){t.call(e)}:a);return!n&&t&&t.call(e),this.pop(),n}parent(e){return this.stack[this.stack.length-2-(e||0)]}push(e){e instanceof Ie?this.directives=Object.create(this.directives):e instanceof me&&!this.directives[e.value]?this.directives[e.value]=e:e instanceof xt&&(this.directives=Object.create(this.directives),this.directives["use strict"]||(this.directives["use strict"]=e)),this.stack.push(e)}pop(){var e=this.stack.pop();(e instanceof Ie||e instanceof xt)&&(this.directives=Object.getPrototypeOf(this.directives))}self(){return this.stack[this.stack.length-1]}find_parent(e){for(var t=this.stack,n=t.length;--n>=0;){var i=t[n];if(i instanceof e)return i}}has_directive(e){var t=this.directives[e];if(t)return t;var n=this.stack[this.stack.length-1];if(n instanceof we&&n.body)for(var i=0;i=0;){if((i=t[n])instanceof Te&&i.label.name==e.label.name)return i.body}else for(n=t.length;--n>=0;){var i;if((i=t[n])instanceof be||e instanceof $e&&i instanceof Je)return i}}}class Tn extends vn{constructor(e,t){super(),this.before=e,this.after=t}}const bn=1,yn=2,Cn=4;var On=Object.freeze({__proto__:null,AST_Accessor:Le,AST_Array:Ct,AST_Arrow:Pe,AST_Assign:bt,AST_Atom:fn,AST_Await:Sn,AST_BigInt:cn,AST_Binary:vt,AST_Block:ge,AST_BlockStatement:Se,AST_Boolean:hn,AST_Break:$e,AST_Call:_t,AST_Case:tt,AST_Catch:it,AST_Class:xt,AST_ClassExpression:It,AST_ConciseMethod:wt,AST_Conditional:Tt,AST_Const:ut,AST_Constant:an,AST_Continue:je,AST_Debugger:de,AST_Default:et,AST_DefaultAssign:yt,AST_DefClass:kt,AST_Definitions:ot,AST_Defun:Be,AST_Destructuring:Ke,AST_Directive:me,AST_Do:Ce,AST_Dot:ht,AST_DWLoop:ye,AST_EmptyStatement:Ae,AST_Exit:ze,AST_Expansion:ke,AST_Export:ft,AST_False:Dn,AST_Finally:rt,AST_For:Fe,AST_ForIn:Me,AST_ForOf:Re,AST_Function:Ve,AST_Hole:mn,AST_If:Ze,AST_Import:lt,AST_Infinity:En,AST_IterationStatement:be,AST_Jump:Xe,AST_Label:Jt,AST_LabeledStatement:Te,AST_LabelRef:nn,AST_Lambda:Ie,AST_Let:st,AST_LoopControl:qe,AST_NameMapping:ct,AST_NaN:_n,AST_New:dt,AST_NewTarget:Vt,AST_Node:pe,AST_Null:pn,AST_Number:un,AST_Object:Ot,AST_ObjectGetter:Nt,AST_ObjectKeyVal:Mt,AST_ObjectProperty:Ft,AST_ObjectSetter:Rt,AST_PrefixedTemplateString:Ue,AST_PropAccess:Et,AST_RegExp:ln,AST_Return:We,AST_Scope:we,AST_Sequence:mt,AST_SimpleStatement:Ee,AST_Statement:_e,AST_StatementWithBody:ve,AST_String:sn,AST_Sub:Dt,AST_Super:on,AST_Switch:Je,AST_SwitchBranch:Qe,AST_Symbol:Lt,AST_SymbolBlockDeclaration:Kt,AST_SymbolCatch:$t,AST_SymbolClass:qt,AST_SymbolConst:Ut,AST_SymbolDeclaration:Pt,AST_SymbolDefClass:Yt,AST_SymbolDefun:Xt,AST_SymbolExport:en,AST_SymbolExportForeign:tn,AST_SymbolFunarg:Ht,AST_SymbolImport:jt,AST_SymbolImportForeign:Zt,AST_SymbolLambda:Wt,AST_SymbolLet:Gt,AST_SymbolMethod:zt,AST_SymbolRef:Qt,AST_SymbolVar:Bt,AST_TemplateSegment:He,AST_TemplateString:Ge,AST_This:rn,AST_Throw:Ye,AST_Token:fe,AST_Toplevel:xe,AST_True:gn,AST_Try:nt,AST_Unary:gt,AST_UnaryPostfix:At,AST_UnaryPrefix:St,AST_Undefined:dn,AST_Var:at,AST_VarDef:pt,AST_While:Oe,AST_With:Ne,AST_Yield:An,TreeTransformer:Tn,TreeWalker:vn,walk_body:he,_INLINE:yn,_NOINLINE:Cn,_PURE:bn});function Fn(e,t){e.DEFMETHOD("transform",(function(e,n){let i=void 0;if(e.push(this),e.before&&(i=e.before(this,t,n)),void 0===i&&(t(i=this,e),e.after)){const t=e.after(i,n);void 0!==t&&(i=t)}return e.pop(),i}))}function Mn(e,t){return f(e,(function(e){return e.transform(t,!0)}))}function Rn(e){let t=e.parent(-1);for(let n,i=0;n=e.parent(i);i++){if(n instanceof _e&&n.body===t)return!0;if(!(n instanceof mt&&n.expressions[0]===t||"Call"===n.TYPE&&n.expression===t||n instanceof Ue&&n.prefix===t||n instanceof ht&&n.expression===t||n instanceof Dt&&n.expression===t||n instanceof Tt&&n.condition===t||n instanceof vt&&n.left===t||n instanceof At&&n.expression===t))return!1;t=n}}Fn(pe,a),Fn(Te,(function(e,t){e.label=e.label.transform(t),e.body=e.body.transform(t)})),Fn(Ee,(function(e,t){e.body=e.body.transform(t)})),Fn(ge,(function(e,t){e.body=Mn(e.body,t)})),Fn(Ce,(function(e,t){e.body=e.body.transform(t),e.condition=e.condition.transform(t)})),Fn(Oe,(function(e,t){e.condition=e.condition.transform(t),e.body=e.body.transform(t)})),Fn(Fe,(function(e,t){e.init&&(e.init=e.init.transform(t)),e.condition&&(e.condition=e.condition.transform(t)),e.step&&(e.step=e.step.transform(t)),e.body=e.body.transform(t)})),Fn(Me,(function(e,t){e.init=e.init.transform(t),e.object=e.object.transform(t),e.body=e.body.transform(t)})),Fn(Ne,(function(e,t){e.expression=e.expression.transform(t),e.body=e.body.transform(t)})),Fn(ze,(function(e,t){e.value&&(e.value=e.value.transform(t))})),Fn(qe,(function(e,t){e.label&&(e.label=e.label.transform(t))})),Fn(Ze,(function(e,t){e.condition=e.condition.transform(t),e.body=e.body.transform(t),e.alternative&&(e.alternative=e.alternative.transform(t))})),Fn(Je,(function(e,t){e.expression=e.expression.transform(t),e.body=Mn(e.body,t)})),Fn(tt,(function(e,t){e.expression=e.expression.transform(t),e.body=Mn(e.body,t)})),Fn(nt,(function(e,t){e.body=Mn(e.body,t),e.bcatch&&(e.bcatch=e.bcatch.transform(t)),e.bfinally&&(e.bfinally=e.bfinally.transform(t))})),Fn(it,(function(e,t){e.argname&&(e.argname=e.argname.transform(t)),e.body=Mn(e.body,t)})),Fn(ot,(function(e,t){e.definitions=Mn(e.definitions,t)})),Fn(pt,(function(e,t){e.name=e.name.transform(t),e.value&&(e.value=e.value.transform(t))})),Fn(Ke,(function(e,t){e.names=Mn(e.names,t)})),Fn(Ie,(function(e,t){e.name&&(e.name=e.name.transform(t)),e.argnames=Mn(e.argnames,t),e.body instanceof pe?e.body=e.body.transform(t):e.body=Mn(e.body,t)})),Fn(_t,(function(e,t){e.expression=e.expression.transform(t),e.args=Mn(e.args,t)})),Fn(mt,(function(e,t){const n=Mn(e.expressions,t);e.expressions=n.length?n:[new un({value:0})]})),Fn(ht,(function(e,t){e.expression=e.expression.transform(t)})),Fn(Dt,(function(e,t){e.expression=e.expression.transform(t),e.property=e.property.transform(t)})),Fn(An,(function(e,t){e.expression&&(e.expression=e.expression.transform(t))})),Fn(Sn,(function(e,t){e.expression=e.expression.transform(t)})),Fn(gt,(function(e,t){e.expression=e.expression.transform(t)})),Fn(vt,(function(e,t){e.left=e.left.transform(t),e.right=e.right.transform(t)})),Fn(Tt,(function(e,t){e.condition=e.condition.transform(t),e.consequent=e.consequent.transform(t),e.alternative=e.alternative.transform(t)})),Fn(Ct,(function(e,t){e.elements=Mn(e.elements,t)})),Fn(Ot,(function(e,t){e.properties=Mn(e.properties,t)})),Fn(Ft,(function(e,t){e.key instanceof pe&&(e.key=e.key.transform(t)),e.value=e.value.transform(t)})),Fn(xt,(function(e,t){e.name&&(e.name=e.name.transform(t)),e.extends&&(e.extends=e.extends.transform(t)),e.properties=Mn(e.properties,t)})),Fn(ke,(function(e,t){e.expression=e.expression.transform(t)})),Fn(ct,(function(e,t){e.foreign_name=e.foreign_name.transform(t),e.name=e.name.transform(t)})),Fn(lt,(function(e,t){e.imported_name&&(e.imported_name=e.imported_name.transform(t)),e.imported_names&&Mn(e.imported_names,t),e.module_name=e.module_name.transform(t)})),Fn(ft,(function(e,t){e.exported_definition&&(e.exported_definition=e.exported_definition.transform(t)),e.exported_value&&(e.exported_value=e.exported_value.transform(t)),e.exported_names&&Mn(e.exported_names,t),e.module_name&&(e.module_name=e.module_name.transform(t))})),Fn(Ge,(function(e,t){e.segments=Mn(e.segments,t)})),Fn(Ue,(function(e,t){e.prefix=e.prefix.transform(t),e.template_string=e.template_string.transform(t)}));const Nn=/^$|[;{][\s\n]*$/,wn=10,xn=32,kn=/[@#]__(PURE|INLINE|NOINLINE)__/g;function In(e){return"comment2"==e.type&&/@preserve|@lic|@cc_on|^\**!/i.test(e.value)}function Ln(e){var t=!e;void 0===(e=o(e,{ascii_only:!1,beautify:!1,braces:!1,comments:"some",ecma:5,ie8:!1,indent_level:4,indent_start:0,inline_script:!0,keep_numbers:!1,keep_quoted_props:!1,max_line_len:!1,preamble:null,quote_keys:!1,quote_style:0,safari10:!1,semicolons:!0,shebang:!0,shorthand:void 0,source_map:null,webkit:!1,width:80,wrap_iife:!1,wrap_func_args:!0},!0)).shorthand&&(e.shorthand=e.ecma>5);var n=s;if(e.comments){let t=e.comments;if("string"==typeof e.comments&&/^\/.*\/[a-zA-Z]*$/.test(e.comments)){var i=e.comments.lastIndexOf("/");t=new RegExp(e.comments.substr(1,i-1),e.comments.substr(i+1))}n=t instanceof RegExp?function(e){return"comment5"!=e.type&&t.test(e.value)}:"function"==typeof t?function(e){return"comment5"!=e.type&&t(this,e)}:"some"===t?In:u}var r=0,c=0,l=1,f=0,p="";let _=new Set;var d=e.ascii_only?function(t,n){return e.ecma>=2015&&(t=t.replace(/[\ud800-\udbff][\udc00-\udfff]/g,(function(e){return"\\u{"+function(e,t){return W(e.charAt(t))?65536+(e.charCodeAt(t)-55296<<10)+e.charCodeAt(t+1)-56320:e.charCodeAt(t)}(e,0).toString(16)+"}"}))),t.replace(/[\u0000-\u001f\u007f-\uffff]/g,(function(e){var t=e.charCodeAt(0).toString(16);if(t.length<=2&&!n){for(;t.length<2;)t="0"+t;return"\\x"+t}for(;t.length<4;)t="0"+t;return"\\u"+t}))}:function(e){for(var t="",n=0,i=e.length;nr?o():a()}}(t,n);return e.inline_script&&(i=(i=(i=i.replace(/<\x2f(script)([>\/\t\n\f\r ])/gi,"<\\/$1$2")).replace(/\x3c!--/g,"\\x3c!--")).replace(/--\x3e/g,"--\\x3e")),i}var E,D,g=!1,S=!1,A=!1,v=0,T=!1,b=!1,y=-1,C="",O=e.source_map&&[],F=O?function(){O.forEach((function(t){try{e.source_map.add(t.token.file,t.line,t.col,t.token.line,t.token.col,t.name||"name"!=t.token.type?t.name:t.token.value)}catch(e){null!=t.token.file&&pe.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]",{file:t.token.file,line:t.token.line,col:t.token.col,cline:t.line,ccol:t.col,name:t.name||""})}})),O=[]}:a,M=e.max_line_len?function(){if(c>e.max_line_len){if(v){var t=p.slice(0,v),n=p.slice(v);if(O){var i=n.length-c;O.forEach((function(e){e.line++,e.col+=i}))}p=t+"\n"+n,l++,f++,c=n.length}c>e.max_line_len&&pe.warn("Output exceeds {max_line_len} characters",e)}v&&(v=0,F())}:a,R=h("( [ + * / - , . `");function N(t){var n=z(t=String(t),0);T&&n&&(T=!1,"\n"!==n&&(N("\n"),x())),b&&n&&(b=!1,/[\s;})]/.test(n)||w()),y=-1;var i=C.charAt(C.length-1);A&&(A=!1,(":"!==i||"}"!==n)&&(n&&";}".includes(n)||";"===i)||(e.semicolons||R.has(n)?(p+=";",c++,f++):(M(),c>0&&(p+="\n",f++,l++,c=0),/^\s+$/.test(t)&&(A=!0)),e.beautify||(S=!1))),S&&((j(i)&&(j(n)||"\\"==n)||"/"==n&&n==i||("+"==n||"-"==n)&&n==C)&&(p+=" ",c++,f++),S=!1),E&&(O.push({token:E,name:D,line:l,col:c}),E=!1,v||F()),p+=t,g="("==t[t.length-1],f+=t.length;var r=t.split(/\r?\n/),o=r.length-1;l+=o,c+=r[0].length,o>0&&(M(),c=r[o].length),C=t}var w=e.beautify?function(){N(" ")}:function(){S=!0},x=e.beautify?function(t){var n;e.beautify&&N((n=t?.5:0," ".repeat(e.indent_start+r-n*e.indent_level)))}:a,k=e.beautify?function(e,t){!0===e&&(e=P());var n=r;r=e;var i=t();return r=n,i}:function(e,t){return t()},I=e.beautify?function(){if(y<0)return N("\n");"\n"!=p[y]&&(p=p.slice(0,y)+"\n"+p.slice(y),f++,l++),y++}:e.max_line_len?function(){M(),v=p.length}:a,L=e.beautify?function(){N(";")}:function(){A=!0};function V(){A=!1,N(";")}function P(){return r+e.indent_level}function B(){return v&&M(),p}function K(){let e=p.length-1;for(;e>=0;){const t=p.charCodeAt(e);if(t===wn)return!0;if(t!==xn)return!1;e--}return!0}var U=[];return{get:B,toString:B,indent:x,in_directive:!1,use_asm:null,active_scope:null,indentation:function(){return r},current_width:function(){return c-r},should_break:function(){return e.width&&this.current_width()>=e.width},has_parens:function(){return g},newline:I,print:N,star:function(){N("*")},space:w,comma:function(){N(","),w()},colon:function(){N(":"),w()},last:function(){return C},semicolon:L,force_semicolon:V,to_utf8:d,print_name:function(e){N(function(e){return e=e.toString(),e=d(e,!0)}(e))},print_string:function(e,t,n){var i=m(e,t);!0!==n||i.includes("\\")||(Nn.test(p)||V(),V()),N(i)},print_template_string_chars:function(e){var t=m(e,"`").replace(/\${/g,"\\${");return N(t.substr(1,t.length-2))},encode_string:m,next_indent:P,with_indent:k,with_block:function(e){var t;return N("{"),I(),k(P(),(function(){t=e()})),x(),N("}"),t},with_parens:function(e){N("(");var t=e();return N(")"),t},with_square:function(e){N("[");var t=e();return N("]"),t},add_mapping:O?function(e,t){E=e,D=t}:a,option:function(t){return e[t]},printed_comments:_,prepend_comments:t?a:function(t){var i=t.start;if(i){var r=this.printed_comments;if(!i.comments_before||!r.has(i.comments_before)){var o=i.comments_before;if(o||(o=i.comments_before=[]),r.add(o),t instanceof ze&&t.value){var a=new vn((function(e){var t=a.parent();if(!(t instanceof ze||t instanceof vt&&t.left===e||"Call"==t.TYPE&&t.expression===e||t instanceof Tt&&t.condition===e||t instanceof ht&&t.expression===e||t instanceof mt&&t.expressions[0]===e||t instanceof Dt&&t.expression===e||t instanceof At))return!0;if(e.start){var n=e.start.comments_before;n&&!r.has(n)&&(r.add(n),o=o.concat(n))}}));a.push(t),t.value.walk(a)}if(0==f){o.length>0&&e.shebang&&"comment5"===o[0].type&&!r.has(o[0])&&(N("#!"+o.shift().value+"\n"),x());var s=e.preamble;s&&N(s.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"))}if(0!=(o=o.filter(n,t).filter(e=>!r.has(e))).length){var u=K();o.forEach((function(e,t){r.add(e),u||(e.nlb?(N("\n"),x(),u=!0):t>0&&w()),/comment[134]/.test(e.type)?(N("//"+e.value.replace(kn," ")+"\n"),x(),u=!0):"comment2"==e.type&&(N("/*"+e.value.replace(kn," ")+"*/"),u=!1)})),u||(i.nlb?(N("\n"),x()):w())}}}},append_comments:t||n===s?a:function(e,t){var i=e.end;if(i){var r=this.printed_comments,o=i[t?"comments_before":"comments_after"];if(o&&!r.has(o)&&(e instanceof _e||o.every(e=>!/comment[134]/.test(e.type)))){r.add(o);var a=p.length;o.filter(n,e).forEach((function(e,n){r.has(e)||(r.add(e),b=!1,T?(N("\n"),x(),T=!1):e.nlb&&(n>0||!K())?(N("\n"),x()):(n>0||!t)&&w(),/comment[134]/.test(e.type)?(N("//"+e.value.replace(kn," ")),T=!0):"comment2"==e.type&&(N("/*"+e.value.replace(kn," ")+"*/"),b=!0))})),p.length>a&&(y=a)}}},line:function(){return l},col:function(){return c},pos:function(){return f},push_node:function(e){U.push(e)},pop_node:function(){return U.pop()},parent:function(e){return U[U.length-2-(e||0)]}}}!function(){function e(e,t){e.DEFMETHOD("_codegen",t)}function t(e,n){Array.isArray(e)?e.forEach((function(e){t(e,n)})):e.DEFMETHOD("needs_parens",n)}function n(e,t,n,i){var r=e.length-1;n.in_directive=i,e.forEach((function(e,i){!0!==n.in_directive||e instanceof me||e instanceof Ae||e instanceof Ee&&e.body instanceof sn||(n.in_directive=!1),e instanceof Ae||(n.indent(),e.print(n),i==r&&t||(n.newline(),t&&n.newline())),!0===n.in_directive&&e instanceof Ee&&e.body instanceof sn&&(n.in_directive=!1)})),n.in_directive=!1}function i(e,t){t.print("{"),t.with_indent(t.next_indent(),(function(){t.append_comments(e,!0)})),t.print("}")}function r(e,t,r){e.body.length>0?t.with_block((function(){n(e.body,!1,t,r)})):i(e,t)}function o(e,t,n){var i=!1;n&&e.walk(new vn((function(e){return!!(i||e instanceof we)||(e instanceof vt&&"in"==e.operator?(i=!0,!0):void 0)}))),e.print(t,i)}function u(e,t,n){return n.option("quote_keys")?n.print_string(e):""+ +e==e&&e>=0?n.option("keep_numbers")?n.print(e):n.print(l(e)):(F.has(e)?!n.option("ie8"):Z(e))?t&&n.option("keep_quoted_props")?n.print_string(e,t):n.print_name(e):n.print_string(e,t)}function c(e,t){t.option("braces")?f(e,t):!e||e instanceof Ae?t.force_semicolon():e.print(t)}function l(e){var t,n,i,r=e.toString(10).replace(/^0\./,".").replace("e+","e"),o=[r];return Math.floor(e)===e&&(e<0?o.push("-0x"+(-e).toString(16).toLowerCase()):o.push("0x"+e.toString(16).toLowerCase())),(t=/^\.0+/.exec(r))?(n=t[0].length,i=r.slice(n),o.push(i+"e-"+(i.length+n-1))):(t=/0+$/.exec(r))?(n=t[0].length,o.push(r.slice(0,-n)+"e"+n)):(t=/^(\d)\.(\d+)e(-?\d+)$/.exec(r))&&o.push(t[1]+t[2]+"e"+(t[3]-t[2].length)),function(e){for(var t=e[0],n=t.length,i=1;io||i==o&&(this===t.right||"**"==n))return!0}})),t(An,(function(e){var t=e.parent();return t instanceof vt&&"="!==t.operator||(t instanceof _t&&t.expression===this||(t instanceof Tt&&t.condition===this||(t instanceof gt||(t instanceof Et&&t.expression===this||void 0))))})),t(Et,(function(e){var t=e.parent();if(t instanceof dt&&t.expression===this){var n=!1;return this.walk(new vn((function(e){return!!(n||e instanceof we)||(e instanceof _t?(n=!0,!0):void 0)}))),n}})),t(_t,(function(e){var t,n=e.parent();return!!(n instanceof dt&&n.expression===this||n instanceof ft&&n.is_default&&this.expression instanceof Ve)||this.expression instanceof Ve&&n instanceof Et&&n.expression===this&&(t=e.parent(1))instanceof bt&&t.left===n})),t(dt,(function(e){var t=e.parent();if(0===this.args.length&&(t instanceof Et||t instanceof _t&&t.expression===this))return!0})),t(un,(function(e){var t=e.parent();if(t instanceof Et&&t.expression===this){var n=this.getValue();if(n<0||/^0/.test(l(n)))return!0}})),t(cn,(function(e){var t=e.parent();if(t instanceof Et&&t.expression===this&&this.getValue().startsWith("-"))return!0})),t([bt,Tt],(function(e){var t=e.parent();return t instanceof gt||(t instanceof vt&&!(t instanceof bt)||(t instanceof _t&&t.expression===this||(t instanceof Tt&&t.condition===this||(t instanceof Et&&t.expression===this||(this instanceof bt&&this.left instanceof Ke&&!1===this.left.is_array||void 0)))))})),e(me,(function(e,t){t.print_string(e.value,e.quote),t.semicolon()})),e(ke,(function(e,t){t.print("..."),e.expression.print(t)})),e(Ke,(function(e,t){t.print(e.is_array?"[":"{");var n=e.names.length;e.names.forEach((function(e,i){i>0&&t.comma(),e.print(t),i==n-1&&e instanceof mn&&t.comma()})),t.print(e.is_array?"]":"}")})),e(de,(function(e,t){t.print("debugger"),t.semicolon()})),ve.DEFMETHOD("_do_print_body",(function(e){c(this.body,e)})),e(_e,(function(e,t){e.body.print(t),t.semicolon()})),e(xe,(function(e,t){n(e.body,!0,t,!0),t.print("")})),e(Te,(function(e,t){e.label.print(t),t.colon(),e.body.print(t)})),e(Ee,(function(e,t){e.body.print(t),t.semicolon()})),e(Se,(function(e,t){r(e,t)})),e(Ae,(function(e,t){t.semicolon()})),e(Ce,(function(e,t){t.print("do"),t.space(),f(e.body,t),t.space(),t.print("while"),t.space(),t.with_parens((function(){e.condition.print(t)})),t.semicolon()})),e(Oe,(function(e,t){t.print("while"),t.space(),t.with_parens((function(){e.condition.print(t)})),t.space(),e._do_print_body(t)})),e(Fe,(function(e,t){t.print("for"),t.space(),t.with_parens((function(){e.init?(e.init instanceof ot?e.init.print(t):o(e.init,t,!0),t.print(";"),t.space()):t.print(";"),e.condition?(e.condition.print(t),t.print(";"),t.space()):t.print(";"),e.step&&e.step.print(t)})),t.space(),e._do_print_body(t)})),e(Me,(function(e,t){t.print("for"),e.await&&(t.space(),t.print("await")),t.space(),t.with_parens((function(){e.init.print(t),t.space(),t.print(e instanceof Re?"of":"in"),t.space(),e.object.print(t)})),t.space(),e._do_print_body(t)})),e(Ne,(function(e,t){t.print("with"),t.space(),t.with_parens((function(){e.expression.print(t)})),t.space(),e._do_print_body(t)})),Ie.DEFMETHOD("_do_print",(function(e,t){var n=this;t||(n.async&&(e.print("async"),e.space()),e.print("function"),n.is_generator&&e.star(),n.name&&e.space()),n.name instanceof Lt?n.name.print(e):t&&n.name instanceof pe&&e.with_square((function(){n.name.print(e)})),e.with_parens((function(){n.argnames.forEach((function(t,n){n&&e.comma(),t.print(e)}))})),e.space(),r(n,e,!0)})),e(Ie,(function(e,t){e._do_print(t)})),e(Ue,(function(e,t){var n=e.prefix,i=n instanceof Ie||n instanceof vt||n instanceof Tt||n instanceof mt||n instanceof gt||n instanceof ht&&n.expression instanceof Ot;i&&t.print("("),e.prefix.print(t),i&&t.print(")"),e.template_string.print(t)})),e(Ge,(function(e,t){var n=t.parent()instanceof Ue;t.print("`");for(var i=0;i"),e.space();const o=t.body[0];if(1===t.body.length&&o instanceof We){const t=o.value;t?!function e(t){return t instanceof Ot||(t instanceof mt?e(t.expressions[0]):"Call"===t.TYPE?e(t.expression):t instanceof Ue?e(t.prefix):t instanceof ht||t instanceof Dt?e(t.expression):t instanceof Tt?e(t.condition):t instanceof vt?e(t.left):t instanceof At&&e(t.expression))}(t)?t.print(e):(e.print("("),t.print(e),e.print(")")):e.print("{}")}else r(t,e);i&&e.print(")")})),ze.DEFMETHOD("_do_print",(function(e,t){if(e.print(t),this.value){e.space();const t=this.value.start.comments_before;t&&t.length&&!e.printed_comments.has(t)?(e.print("("),this.value.print(e),e.print(")")):this.value.print(e)}e.semicolon()})),e(We,(function(e,t){e._do_print(t,"return")})),e(Ye,(function(e,t){e._do_print(t,"throw")})),e(An,(function(e,t){var n=e.is_star?"*":"";t.print("yield"+n),e.expression&&(t.space(),e.expression.print(t))})),e(Sn,(function(e,t){t.print("await"),t.space();var n=e.expression,i=!(n instanceof _t||n instanceof Qt||n instanceof Et||n instanceof gt||n instanceof an);i&&t.print("("),e.expression.print(t),i&&t.print(")")})),qe.DEFMETHOD("_do_print",(function(e,t){e.print(t),this.label&&(e.space(),this.label.print(e)),e.semicolon()})),e($e,(function(e,t){e._do_print(t,"break")})),e(je,(function(e,t){e._do_print(t,"continue")})),e(Ze,(function(e,t){t.print("if"),t.space(),t.with_parens((function(){e.condition.print(t)})),t.space(),e.alternative?(!function(e,t){var n=e.body;if(t.option("braces")||t.option("ie8")&&n instanceof Ce)return f(n,t);if(!n)return t.force_semicolon();for(;;)if(n instanceof Ze){if(!n.alternative)return void f(e.body,t);n=n.alternative}else{if(!(n instanceof ve))break;n=n.body}c(e.body,t)}(e,t),t.space(),t.print("else"),t.space(),e.alternative instanceof Ze?e.alternative.print(t):c(e.alternative,t)):e._do_print_body(t)})),e(Je,(function(e,t){t.print("switch"),t.space(),t.with_parens((function(){e.expression.print(t)})),t.space();var n=e.body.length-1;n<0?i(e,t):t.with_block((function(){e.body.forEach((function(e,i){t.indent(!0),e.print(t),i0&&t.newline()}))}))})),Qe.DEFMETHOD("_do_print_body",(function(e){e.newline(),this.body.forEach((function(t){e.indent(),t.print(e),e.newline()}))})),e(et,(function(e,t){t.print("default:"),e._do_print_body(t)})),e(tt,(function(e,t){t.print("case"),t.space(),e.expression.print(t),t.print(":"),e._do_print_body(t)})),e(nt,(function(e,t){t.print("try"),t.space(),r(e,t),e.bcatch&&(t.space(),e.bcatch.print(t)),e.bfinally&&(t.space(),e.bfinally.print(t))})),e(it,(function(e,t){t.print("catch"),e.argname&&(t.space(),t.with_parens((function(){e.argname.print(t)}))),t.space(),r(e,t)})),e(rt,(function(e,t){t.print("finally"),t.space(),r(e,t)})),ot.DEFMETHOD("_do_print",(function(e,t){e.print(t),e.space(),this.definitions.forEach((function(t,n){n&&e.comma(),t.print(e)}));var n=e.parent();(!(n instanceof Fe||n instanceof Me)||n&&n.init!==this)&&e.semicolon()})),e(st,(function(e,t){e._do_print(t,"let")})),e(at,(function(e,t){e._do_print(t,"var")})),e(ut,(function(e,t){e._do_print(t,"const")})),e(lt,(function(e,t){t.print("import"),t.space(),e.imported_name&&e.imported_name.print(t),e.imported_name&&e.imported_names&&(t.print(","),t.space()),e.imported_names&&(1===e.imported_names.length&&"*"===e.imported_names[0].foreign_name.name?e.imported_names[0].print(t):(t.print("{"),e.imported_names.forEach((function(n,i){t.space(),n.print(t),i0&&(e.comma(),e.should_break()&&(e.newline(),e.indent())),t.print(e)}))})),e(mt,(function(e,t){e._do_print(t)})),e(ht,(function(e,t){var n=e.expression;n.print(t);var i=e.property;t.option("ie8")&&F.has(i)?(t.print("["),t.add_mapping(e.end),t.print_string(i),t.print("]")):(n instanceof un&&n.getValue()>=0&&(/[xa-f.)]/i.test(t.last())||t.print(".")),t.print("."),t.add_mapping(e.end),t.print_name(i))})),e(Dt,(function(e,t){e.expression.print(t),t.print("["),e.property.print(t),t.print("]")})),e(St,(function(e,t){var n=e.operator;t.print(n),(/^[a-z]/i.test(n)||/[+-]$/.test(n)&&e.expression instanceof St&&/^[+-]/.test(e.expression.operator))&&t.space(),e.expression.print(t)})),e(At,(function(e,t){e.expression.print(t),t.print(e.operator)})),e(vt,(function(e,t){var n=e.operator;e.left.print(t),">"==n[0]&&e.left instanceof At&&"--"==e.left.operator?t.print(" "):t.space(),t.print(n),("<"==n||"<<"==n)&&e.right instanceof St&&"!"==e.right.operator&&e.right.expression instanceof St&&"--"==e.right.expression.operator?t.print(" "):t.space(),e.right.print(t)})),e(Tt,(function(e,t){e.condition.print(t),t.space(),t.print("?"),t.space(),e.consequent.print(t),t.space(),t.colon(),e.alternative.print(t)})),e(Ct,(function(e,t){t.with_square((function(){var n=e.elements,i=n.length;i>0&&t.space(),n.forEach((function(e,n){n&&t.comma(),e.print(t),n===i-1&&e instanceof mn&&t.comma()})),i>0&&t.space()}))})),e(Ot,(function(e,t){e.properties.length>0?t.with_block((function(){e.properties.forEach((function(e,n){n&&(t.print(","),t.newline()),t.indent(),e.print(t)})),t.newline()})):i(e,t)})),e(xt,(function(e,t){if(t.print("class"),t.space(),e.name&&(e.name.print(t),t.space()),e.extends){var n=!(e.extends instanceof Qt||e.extends instanceof Et||e.extends instanceof It||e.extends instanceof Ve);t.print("extends"),n?t.print("("):t.space(),e.extends.print(t),n?t.print(")"):t.space()}e.properties.length>0?t.with_block((function(){e.properties.forEach((function(e,n){n&&t.newline(),t.indent(),e.print(t)})),t.newline()})):t.print("{}")})),e(Vt,(function(e,t){t.print("new.target")})),e(Mt,(function(e,t){function n(e){var t=e.definition();return t?t.mangled_name||t.name:e.name}var i=t.option("shorthand");i&&e.value instanceof Lt&&Z(e.key)&&n(e.value)===e.key&&!F.has(e.key)?u(e.key,e.quote,t):i&&e.value instanceof yt&&e.value.left instanceof Lt&&Z(e.key)&&n(e.value.left)===e.key?(u(e.key,e.quote,t),t.space(),t.print("="),t.space(),e.value.right.print(t)):(e.key instanceof pe?t.with_square((function(){e.key.print(t)})):u(e.key,e.quote,t),t.colon(),e.value.print(t))})),Ft.DEFMETHOD("_print_getter_setter",(function(e,t){var n=this;n.static&&(t.print("static"),t.space()),e&&(t.print(e),t.space()),n.key instanceof zt?u(n.key.name,n.quote,t):t.with_square((function(){n.key.print(t)})),n.value._do_print(t,!0)})),e(Rt,(function(e,t){e._print_getter_setter("set",t)})),e(Nt,(function(e,t){e._print_getter_setter("get",t)})),e(wt,(function(e,t){var n;e.is_generator&&e.async?n="async*":e.is_generator?n="*":e.async&&(n="async"),e._print_getter_setter(n,t)})),Lt.DEFMETHOD("_do_print",(function(e){var t=this.definition();e.print_name(t?t.mangled_name||t.name:this.name)})),e(Lt,(function(e,t){e._do_print(t)})),e(mn,a),e(rn,(function(e,t){t.print("this")})),e(on,(function(e,t){t.print("super")})),e(an,(function(e,t){t.print(e.getValue())})),e(sn,(function(e,t){t.print_string(e.getValue(),e.quote,t.in_directive)})),e(un,(function(e,t){(t.option("keep_numbers")||t.use_asm)&&e.start&&null!=e.start.raw?t.print(e.start.raw):t.print(l(e.getValue()))})),e(cn,(function(e,t){t.print(e.getValue()+"n")})),e(ln,(function(e,t){let{source:n,flags:i}=e.getValue();n=v(n),i=i?function(e){const t=new Set(e.split(""));let n="";for(const e of T)t.has(e)&&(n+=e,t.delete(e));return t.size&&t.forEach(e=>{n+=e}),n}(i):"",t.print(t.to_utf8(`/${n}/${i}`));const r=t.parent();r instanceof vt&&/^\w/.test(r.operator)&&r.left===e&&t.print(" ")})),p([pe,Te,xe],a),p([Ct,Se,it,xt,an,de,ot,me,rt,Xe,Ie,dt,Ot,ve,Lt,Je,Qe,Ge,He,nt],(function(e){e.add_mapping(this.start)})),p([Nt,Rt],(function(e){e.add_mapping(this.start,this.key.name)})),p([Ft],(function(e){e.add_mapping(this.start,this.key)}))}();const Vn=1,Pn=2;let Bn=null,Kn=null;class Un{constructor(e,t,n){this.name=t.name,this.orig=[t],this.init=n,this.eliminated=0,this.assignments=0,this.scope=e,this.references=[],this.replaced=0,this.global=!1,this.export=0,this.mangled_name=null,this.undeclared=!1,this.id=Un.next_id++,this.chained=!1,this.direct_access=!1,this.escaped=0,this.recursive_refs=0,this.references=[],this.should_replace=void 0,this.single_use=!1,this.fixed=!1,Object.seal(this)}unmangleable(e){return e||(e={}),!!(Bn&&Bn.has(this.id)&&S(e.keep_fnames,this.orig[0].name))||(this.global&&!e.toplevel||this.export&Vn||this.undeclared||!e.eval&&this.scope.pinned()||(this.orig[0]instanceof Wt||this.orig[0]instanceof Xt)&&S(e.keep_fnames,this.orig[0].name)||this.orig[0]instanceof zt||(this.orig[0]instanceof qt||this.orig[0]instanceof Yt)&&S(e.keep_classnames,this.orig[0].name))}mangle(e){const t=e.cache&&e.cache.props;if(this.global&&t&&t.has(this.name))this.mangled_name=t.get(this.name);else if(!this.mangled_name&&!this.unmangleable(e)){var n=this.scope,i=this.orig[0];e.ie8&&i instanceof Wt&&(n=n.parent_scope);const r=Gn(this);this.mangled_name=r?r.mangled_name||r.name:n.next_mangled(e,this),this.global&&t&&t.set(this.name,this.mangled_name)}}}function Gn(e){if(e.orig[0]instanceof $t&&e.scope.is_block_scope())return e.scope.get_defun_scope().variables.get(e.name)}function Hn(e,t){var n=e.enclosed;e:for(;;){var i=Xn(++e.cname);if(!F.has(i)&&!(t.reserved.has(i)||Kn&&Kn.has(i))){for(let e=n.length;--e>=0;){const r=n[e];if(i==(r.mangled_name||r.unmangleable(t)&&r.name))continue e}return i}}}Un.next_id=1,xe.DEFMETHOD("figure_out_scope",(function(e){e=o(e,{cache:null,ie8:!1,safari10:!1});var t=this,n=t.parent_scope=null,i=new Map,r=null,a=null,s=[],u=new vn((function(t,o){if(t.is_block_scope()){const i=n;t.block_scope=n=new we(t);const r=t instanceof it?i.parent_scope:i;if(n.init_scope_vars(r),n.uses_with=i.uses_with,n.uses_eval=i.uses_eval,e.safari10&&(t instanceof Fe||t instanceof Me)&&s.push(n),t instanceof Je){const e=n;n=i,t.expression.walk(u),n=e;for(let e=0;ee===t||(t instanceof Kt?e instanceof Wt:!(e instanceof Gt||e instanceof Ut)))||ee(`"${t.name}" is redeclared`,t.start.file,t.start.line,t.start.col,t.start.pos),t instanceof Ht||c(E,2),r!==n){t.mark_enclosed(e);var E=n.find_variable(t);t.thedef!==E&&(t.thedef=E,t.reference(e))}}else if(t instanceof nn){var h=i.get(t.name);if(!h)throw new Error(d("Undefined label {name} [{line},{col}]",{name:t.name,line:t.start.line,col:t.start.col}));t.thedef=h}n instanceof xe||!(t instanceof ft||t instanceof lt)||ee(`"${t.TYPE}" statement may only appear at the top level`,t.start.file,t.start.line,t.start.col,t.start.pos)}}));function c(e,t){if(a){var n=0;do{t++}while(u.parent(n++)!==a)}var i=u.parent(t);if(e.export=i instanceof ft?Vn:0){var r=i.exported_definition;(r instanceof Be||r instanceof kt)&&i.is_default&&(e.export=Pn)}}t.walk(u),t.globals=new Map;u=new vn((function(n,i){if(n instanceof qe&&n.label)return n.label.thedef.references.push(n),!0;if(n instanceof Qt){var r,o=n.name;if("eval"==o&&u.parent()instanceof _t)for(var a=n.scope;a&&!a.uses_eval;a=a.parent_scope)a.uses_eval=!0;return u.parent()instanceof ct&&u.parent(1).module_name||!(r=n.scope.find_variable(o))?(r=t.def_global(n),n instanceof en&&(r.export=Vn)):r.scope instanceof Ie&&"arguments"==o&&(r.scope.uses_arguments=!0),n.thedef=r,n.reference(e),!n.scope.is_block_scope()||r.orig[0]instanceof Kt||(n.scope=n.scope.get_defun_scope()),!0}var s;if(n instanceof $t&&(s=Gn(n.definition())))for(a=n.scope;a&&(_(a.enclosed,s),a!==s.scope);)a=a.parent_scope}));if(t.walk(u),(e.ie8||e.safari10)&&t.walk(new vn((function(n,i){if(n instanceof $t){var r=n.name,o=n.thedef.references,a=n.scope.get_defun_scope(),s=a.find_variable(r)||t.globals.get(r)||a.def_variable(n);return o.forEach((function(t){t.thedef=s,t.reference(e)})),n.thedef=s,n.reference(e),!0}}))),e.safari10)for(const e of s)e.parent_scope.variables.forEach((function(t){_(e.enclosed,t)}))})),xe.DEFMETHOD("def_global",(function(e){var t=this.globals,n=e.name;if(t.has(n))return t.get(n);var i=new Un(this,e);return i.undeclared=!0,i.global=!0,t.set(n,i),i})),we.DEFMETHOD("init_scope_vars",(function(e){this.variables=new Map,this.functions=new Map,this.uses_with=!1,this.uses_eval=!1,this.parent_scope=e,this.enclosed=[],this.cname=-1,this._var_name_cache=null})),we.DEFMETHOD("var_names",(function e(){var t=this._var_name_cache;return t||(this._var_name_cache=t=new Set(this.parent_scope?e.call(this.parent_scope):null),this._added_var_names&&this._added_var_names.forEach(e=>{t.add(e)}),this.enclosed.forEach((function(e){t.add(e.name)})),this.variables.forEach((function(e,n){t.add(n)}))),t})),we.DEFMETHOD("add_var_name",(function(e){this._added_var_names||(this._added_var_names=new Set),this._added_var_names.add(e),this._var_name_cache||this.var_names(),this._var_name_cache.add(e)})),we.DEFMETHOD("add_child_scope",(function(e){if(e.parent_scope===this)return;e.parent_scope=this,e._var_name_cache=null,e._added_var_names&&e._added_var_names.forEach(t=>e.add_var_name(t));const t=new Set(e.enclosed),n=(()=>{const e=[];let t=this;do{e.push(t)}while(t=t.parent_scope);return e.reverse(),e})(),i=[];for(const e of n){i.forEach(t=>_(e.enclosed,t));for(const n of e.variables.values())t.has(n)&&(_(i,n),_(e.enclosed,n))}})),pe.DEFMETHOD("is_block_scope",s),xt.DEFMETHOD("is_block_scope",s),Ie.DEFMETHOD("is_block_scope",s),xe.DEFMETHOD("is_block_scope",s),Qe.DEFMETHOD("is_block_scope",s),ge.DEFMETHOD("is_block_scope",u),be.DEFMETHOD("is_block_scope",u),Ie.DEFMETHOD("init_scope_vars",(function(){we.prototype.init_scope_vars.apply(this,arguments),this.uses_arguments=!1,this.def_variable(new Ht({name:"arguments",start:this.start,end:this.end}))})),Pe.DEFMETHOD("init_scope_vars",(function(){we.prototype.init_scope_vars.apply(this,arguments),this.uses_arguments=!1})),Lt.DEFMETHOD("mark_enclosed",(function(e){for(var t=this.definition(),n=this.scope;n&&(_(n.enclosed,t),n!==t.scope);)n=n.parent_scope})),Lt.DEFMETHOD("reference",(function(e){this.definition().references.push(this),this.mark_enclosed(e)})),we.DEFMETHOD("find_variable",(function(e){return e instanceof Lt&&(e=e.name),this.variables.get(e)||this.parent_scope&&this.parent_scope.find_variable(e)})),we.DEFMETHOD("def_function",(function(e,t){var n=this.def_variable(e,t);return(!n.init||n.init instanceof Be)&&(n.init=t),this.functions.set(e.name,n),n})),we.DEFMETHOD("def_variable",(function(e,t){var n=this.variables.get(e.name);return n?(n.orig.push(e),n.init&&(n.scope!==e.scope||n.init instanceof Ve)&&(n.init=t)):(n=new Un(this,e,t),this.variables.set(e.name,n),n.global=!this.parent_scope),e.thedef=n})),we.DEFMETHOD("next_mangled",(function(e){return Hn(this,e)})),xe.DEFMETHOD("next_mangled",(function(e){let t;const n=this.mangled_names;do{t=Hn(this,e)}while(n.has(t));return t})),Ve.DEFMETHOD("next_mangled",(function(e,t){for(var n=t.orig[0]instanceof Ht&&this.name&&this.name.definition(),i=n?n.mangled_name||n.name:null;;){var r=Hn(this,e);if(!i||i!=r)return r}})),Lt.DEFMETHOD("unmangleable",(function(e){var t=this.definition();return!t||t.unmangleable(e)})),Jt.DEFMETHOD("unmangleable",s),Lt.DEFMETHOD("unreferenced",(function(){return!this.definition().references.length&&!this.scope.pinned()})),Lt.DEFMETHOD("definition",(function(){return this.thedef})),Lt.DEFMETHOD("global",(function(){return this.thedef.global})),xe.DEFMETHOD("_default_mangler_options",(function(e){return(e=o(e,{eval:!1,ie8:!1,keep_classnames:!1,keep_fnames:!1,module:!1,reserved:[],toplevel:!1})).module&&(e.toplevel=!0),Array.isArray(e.reserved)||e.reserved instanceof Set||(e.reserved=[]),e.reserved=new Set(e.reserved),e.reserved.add("arguments"),e})),xe.DEFMETHOD("mangle_names",(function(e){e=this._default_mangler_options(e);var t=-1,n=[];e.keep_fnames&&(Bn=new Set);const i=this.mangled_names=new Set;e.cache&&(this.globals.forEach(o),e.cache.props&&e.cache.props.forEach((function(e){i.add(e)})));var r=new vn((function(i,r){if(i instanceof Te){var a=t;return r(),t=a,!0}if(i instanceof we)i.variables.forEach(o);else if(i.is_block_scope())i.block_scope.variables.forEach(o);else if(Bn&&i instanceof pt&&i.value instanceof Ie&&!i.value.name&&S(e.keep_fnames,i.name.name))Bn.add(i.name.definition().id);else{if(i instanceof Jt){let e;do{e=Xn(++t)}while(F.has(e));return i.mangled_name=e,!0}!e.ie8&&!e.safari10&&i instanceof $t&&n.push(i.definition())}}));function o(t){!(e.reserved.has(t.name)||t.export&Vn)&&n.push(t)}this.walk(r),(e.keep_fnames||e.keep_classnames)&&(Kn=new Set,n.forEach(t=>{t.name.length<6&&t.unmangleable(e)&&Kn.add(t.name)})),n.forEach(t=>{t.mangle(e)}),Bn=null,Kn=null})),xe.DEFMETHOD("find_colliding_names",(function(e){const t=e.cache&&e.cache.props,n=new Set;return e.reserved.forEach(i),this.globals.forEach(r),this.walk(new vn((function(e){e instanceof we&&e.variables.forEach(r),e instanceof $t&&r(e.definition())}))),n;function i(e){n.add(e)}function r(n){var r=n.name;if(n.global&&t&&t.has(r))r=t.get(r);else if(!n.unmangleable(e))return;i(r)}})),xe.DEFMETHOD("expand_names",(function(e){Xn.reset(),Xn.sort(),e=this._default_mangler_options(e);var t=this.find_colliding_names(e),n=0;function i(i){if(i.global&&e.cache)return;if(i.unmangleable(e))return;if(e.reserved.has(i.name))return;const r=Gn(i),o=i.name=r?r.name:function(){var e;do{e=Xn(n++)}while(t.has(e)||F.has(e));return e}();i.orig.forEach((function(e){e.name=o})),i.references.forEach((function(e){e.name=o}))}this.globals.forEach(i),this.walk(new vn((function(e){e instanceof we&&e.variables.forEach(i),e instanceof $t&&i(e.definition())})))})),pe.DEFMETHOD("tail_node",c),mt.DEFMETHOD("tail_node",(function(){return this.expressions[this.expressions.length-1]})),xe.DEFMETHOD("compute_char_frequency",(function(e){e=this._default_mangler_options(e);try{pe.prototype.print=function(t,n){this._print(t,n),this instanceof Lt&&!this.unmangleable(e)?Xn.consider(this.name,-1):e.properties&&(this instanceof ht?Xn.consider(this.property,-1):this instanceof Dt&&function e(t){t instanceof sn?Xn.consider(t.value,-1):t instanceof Tt?(e(t.consequent),e(t.alternative)):t instanceof mt&&e(t.tail_node())}(this.property))},Xn.consider(this.print_to_string(),1)}finally{pe.prototype.print=pe.prototype._print}Xn.sort()}));const Xn=(()=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_".split(""),t="0123456789".split("");let n,i;function r(){i=new Map,e.forEach((function(e){i.set(e,0)})),t.forEach((function(e){i.set(e,0)}))}function o(e,t){return i.get(t)-i.get(e)}function a(e){var t="",i=54;e++;do{t+=n[--e%i],e=Math.floor(e/i),i=64}while(e>0);return t}return a.consider=function(e,t){for(var n=e.length;--n>=0;)i.set(e[n],i.get(e[n])+t)},a.sort=function(){n=E(e,o).concat(E(t,o))},a.reset=r,r(),a})(),zn=1,Wn=8,Yn=16,qn=32,$n=256,jn=512,Zn=1024,Jn=$n|jn|Zn,Qn=(e,t)=>e.flags&t,ei=(e,t)=>{e.flags|=t},ti=(e,t)=>{e.flags&=~t};class ni extends vn{constructor(e,t){super(),void 0===e.defaults||e.defaults||(t=!0),this.options=o(e,{arguments:!1,arrows:!t,booleans:!t,booleans_as_integers:!1,collapse_vars:!t,comparisons:!t,computed_props:!t,conditionals:!t,dead_code:!t,defaults:!0,directives:!t,drop_console:!1,drop_debugger:!t,ecma:5,evaluate:!t,expression:!1,global_defs:!1,hoist_funs:!1,hoist_props:!t,hoist_vars:!1,ie8:!1,if_return:!t,inline:!t,join_vars:!t,keep_classnames:!1,keep_fargs:!0,keep_fnames:!1,keep_infinity:!1,loops:!t,module:!1,negate_iife:!t,passes:1,properties:!t,pure_getters:!t&&"strict",pure_funcs:null,reduce_funcs:null,reduce_vars:!t,sequences:!t,side_effects:!t,switches:!t,top_retain:null,toplevel:!(!e||!e.top_retain),typeofs:!t,unsafe:!1,unsafe_arrows:!1,unsafe_comps:!1,unsafe_Function:!1,unsafe_math:!1,unsafe_methods:!1,unsafe_proto:!1,unsafe_regexp:!1,unsafe_undefined:!1,unused:!t,warnings:!1},!0);var n=this.options.global_defs;if("object"==typeof n)for(var i in n)"@"===i[0]&&g(n,i)&&(n[i.slice(1)]=ce(n[i],{expression:!0}));!0===this.options.inline&&(this.options.inline=3);var r=this.options.pure_funcs;this.pure_funcs="function"==typeof r?r:r?function(e){return!r.includes(e.expression.print_to_string())}:u;var a=this.options.top_retain;a instanceof RegExp?this.top_retain=function(e){return a.test(e.name)}:"function"==typeof a?this.top_retain=a:a&&("string"==typeof a&&(a=a.split(/,/)),this.top_retain=function(e){return a.includes(e.name)}),this.options.module&&(this.directives["use strict"]=!0,this.options.toplevel=!0);var s=this.options.toplevel;this.toplevel="string"==typeof s?{funcs:/funcs/.test(s),vars:/vars/.test(s)}:{funcs:s,vars:s};var c=this.options.sequences;this.sequences_limit=1==c?800:0|c,this.warnings_produced={},this.evaluated_regexps=new Map}option(e){return this.options[e]}exposed(e){if(e.export)return!0;if(e.global)for(var t=0,n=e.orig.length;t0||this.option("reduce_vars"))&&e.reset_opt_flags(this),e=e.transform(this),t>1){let t=0;if(e.walk(new vn((function(){t++}))),this.info("pass "+o+": last_count: "+n+", count: "+t),t=0;){if(!(r[o]instanceof Mt))return;n||r[o].key!==t||(n=r[o].value)}}return n instanceof Qt&&n.fixed_value()||n}}function oi(e,t,n,i,r,o){var a=t.parent(r),s=Ni(n,a);if(s)return s;if(!o&&a instanceof _t&&a.expression===n&&!(i instanceof Pe)&&!(i instanceof xt)&&!a.is_expr_pure(e)&&(!(i instanceof Ve)||!(a instanceof dt)&&i.contains_this()))return!0;if(a instanceof Ct)return oi(e,t,a,a,r+1);if(a instanceof Mt&&n===a.value){var u=t.parent(r+1);return oi(e,t,u,u,r+2)}if(a instanceof Et&&a.expression===n){var c=ri(i,a.property);return!o&&oi(e,t,a,c,r+1)}}function ai(e){return e instanceof Pe||e instanceof Ve}function si(e){if(e instanceof rn)return!0;if(e instanceof Qt)return e.definition().orig[0]instanceof Wt;if(e instanceof Et){if((e=e.expression)instanceof Qt){if(e.is_immutable())return!1;e=e.fixed_value()}return!e||!(e instanceof ln)&&(e instanceof an||si(e))}return!1}function ui(e,t){if(!(e instanceof Qt))return!1;for(var n=e.definition().orig,i=n.length;--i>=0;)if(n[i]instanceof t)return!0}function ci(e,t){for(let n=0;;n++){const i=e.parent(n);if(i instanceof xe)return t?i:void 0;if(i instanceof Ie)return i;if(i.block_scope)return i.block_scope}}function li(e,t){for(var n,i=0;(n=e.parent(i++))&&!(n instanceof we);)if(n instanceof it&&n.argname){n=n.argname.definition().scope;break}return n.find_variable(t)}function fi(e,t){if(1==t.length)return t[0];if(0==t.length)throw new Error("trying to create a sequence with length zero!");return p(mt,e,{expressions:t.reduce(di,[])})}function pi(e,t){switch(typeof e){case"string":return p(sn,t,{value:e});case"number":return isNaN(e)?p(_n,t):isFinite(e)?1/e<0?p(St,t,{operator:"-",expression:p(un,t,{value:-e})}):p(un,t,{value:e}):e<0?p(St,t,{operator:"-",expression:p(En,t)}):p(En,t);case"boolean":return p(e?gn:Dn,t);case"undefined":return p(dn,t);default:if(null===e)return p(pn,t,{value:null});if(e instanceof RegExp)return p(ln,t,{value:{source:v(e.source),flags:e.flags}});throw new Error(d("Can't handle constant of type: {type}",{type:typeof e}))}}function _i(e,t,n){return e instanceof St&&"delete"==e.operator||e instanceof _t&&e.expression===t&&(n instanceof Et||n instanceof Qt&&"eval"==n.name)?fi(t,[p(un,t,{value:0}),n]):n}function di(e,t){return t instanceof mt?e.push(...t.expressions):e.push(t),e}function mi(e){if(null===e)return[];if(e instanceof Se)return e.body;if(e instanceof Ae)return[];if(e instanceof _e)return[e];throw new Error("Can't convert thing to statement array")}function Ei(e){return null===e||(e instanceof Ae||e instanceof Se&&0==e.body.length)}function hi(e){return!(e instanceof kt||e instanceof Be||e instanceof st||e instanceof ut||e instanceof ft||e instanceof lt)}function Di(e){return e instanceof be&&e.body instanceof Se?e.body:e}function gi(e){return"Call"==e.TYPE&&(e.expression instanceof Ve||gi(e.expression))}function Si(e){return e instanceof Qt&&e.definition().undeclared}ii(pe,(function(e,t){return e})),xe.DEFMETHOD("drop_console",(function(){return this.transform(new Tn((function(e){if("Call"==e.TYPE){var t=e.expression;if(t instanceof Et){for(var n=t.expression;n.expression;)n=n.expression;if(Si(n)&&"console"==n.name)return p(dn,e)}}})))})),pe.DEFMETHOD("equivalent_to",(function(e){return this.TYPE==e.TYPE&&this.print_to_string()==e.print_to_string()})),we.DEFMETHOD("process_expression",(function(e,t){var n=this,i=new Tn((function(r){if(e&&r instanceof Ee)return p(We,r,{value:r.body});if(!e&&r instanceof We){if(t){var o=r.value&&r.value.drop_side_effect_free(t,!0);return o?p(Ee,r,{body:o}):p(Ae,r)}return p(Ee,r,{body:r.value||p(St,r,{operator:"void",expression:p(un,r,{value:0})})})}if(r instanceof xt||r instanceof Ie&&r!==n)return r;if(r instanceof ge){var a=r.body.length-1;a>=0&&(r.body[a]=r.body[a].transform(i))}else r instanceof Ze?(r.body=r.body.transform(i),r.alternative&&(r.alternative=r.alternative.transform(i))):r instanceof Ne&&(r.body=r.body.transform(i));return r}));n.transform(i)})),function(e){function t(e,t){t.assignments=0,t.chained=!1,t.direct_access=!1,t.escaped=0,t.recursive_refs=0,t.references=[],t.should_replace=void 0,t.single_use=void 0,t.scope.pinned()?t.fixed=!1:t.orig[0]instanceof Ut||!e.exposed(t)?t.fixed=t.init:t.fixed=!1}function n(e,n,i){i.variables.forEach((function(i){t(n,i),null===i.fixed?(e.defs_to_safe_ids.set(i.id,e.safe_ids),s(e,i,!0)):i.fixed&&(e.loop_ids.set(i.id,e.in_loop),s(e,i,!0))}))}function i(e,n){n.block_scope&&n.block_scope.variables.forEach(n=>{t(e,n)})}function r(e){e.safe_ids=Object.create(e.safe_ids)}function o(e){e.safe_ids=Object.getPrototypeOf(e.safe_ids)}function s(e,t,n){e.safe_ids[t.id]=n}function u(e,t){if("m"==t.single_use)return!1;if(e.safe_ids[t.id]){if(null==t.fixed){var n=t.orig[0];if(n instanceof Ht||"arguments"==n.name)return!1;t.fixed=p(dn,n)}return!0}return t.fixed instanceof Be}function c(e,t,n,i){if(void 0===t.fixed)return!0;let r;return null===t.fixed&&(r=e.defs_to_safe_ids.get(t.id))?(r[t.id]=!1,e.defs_to_safe_ids.delete(t.id),!0):!!g(e.safe_ids,t.id)&&(!!u(e,t)&&(!1!==t.fixed&&(!(null!=t.fixed&&(!i||t.references.length>t.assignments))&&(t.fixed instanceof Be?i instanceof pe&&t.fixed.parent_scope===n:t.orig.every(e=>!(e instanceof Ut||e instanceof Xt||e instanceof Wt))))))}function l(e,t,n,i,r,o,a){var s=e.parent(o);if(r){if(r.is_constant())return;if(r instanceof It)return}if(s instanceof bt&&"="==s.operator&&i===s.right||s instanceof _t&&(i!==s.expression||s instanceof dt)||s instanceof ze&&i===s.value&&i.scope!==t.scope||s instanceof pt&&i===s.value||s instanceof An&&i===s.value&&i.scope!==t.scope)return!(a>1)||r&&r.is_constant_expression(n)||(a=1),void((!t.escaped||t.escaped>a)&&(t.escaped=a));if(s instanceof Ct||s instanceof Sn||s instanceof vt&&Mi.has(s.operator)||s instanceof Tt&&i!==s.condition||s instanceof ke||s instanceof mt&&i===s.tail_node())l(e,t,n,s,s,o+1,a);else if(s instanceof Mt&&i===s.value){var u=e.parent(o+1);l(e,t,n,u,u,o+2,a)}else if(s instanceof Et&&i===s.expression&&(l(e,t,n,s,r=ri(r,s.property),o+1,a+1),r))return;o>0||s instanceof mt&&i!==s.tail_node()||s instanceof Ee||(t.direct_access=!0)}e(pe,a);var f=new vn((function(e){if(e instanceof Lt){var t=e.definition();t&&(e instanceof Qt&&t.references.push(e),t.fixed=!1)}}));e(Le,(function(e,t,i){return r(e),n(e,i,this),t(),o(e),!0})),e(bt,(function(e,t,n){var i=this;if(i.left instanceof Ke)i.left.walk(f);else{var r=i.left;if(r instanceof Qt){var o=r.definition(),a=c(e,o,r.scope,i.right);if(o.assignments++,a){var u=o.fixed;if(u||"="==i.operator){var _="="==i.operator,d=_?i.right:i;if(!oi(n,e,i,d,0))return o.references.push(r),_||(o.chained=!0),o.fixed=_?function(){return i.right}:function(){return p(vt,i,{operator:i.operator.slice(0,-1),left:u instanceof pe?u:u(),right:i.right})},s(e,o,!1),i.right.walk(e),s(e,o,!0),l(e,o,r.scope,i,d,0,1),!0}}}}})),e(vt,(function(e){if(Mi.has(this.operator))return this.left.walk(e),r(e),this.right.walk(e),o(e),!0})),e(ge,(function(e,t,n){i(n,this)})),e(tt,(function(e){return r(e),this.expression.walk(e),o(e),r(e),he(this,e),o(e),!0})),e(It,(function(e,t){return ti(this,Yn),r(e),t(),o(e),!0})),e(Tt,(function(e){return this.condition.walk(e),r(e),this.consequent.walk(e),o(e),r(e),this.alternative.walk(e),o(e),!0})),e(et,(function(e,t){return r(e),t(),o(e),!0})),e(Ie,(function(e,t,i){return ti(this,Yn),r(e),n(e,i,this),this.uses_arguments?(t(),void o(e)):(!this.name&&(a=e.parent())instanceof _t&&a.expression===this&&!a.args.some(e=>e instanceof ke)&&this.argnames.every(e=>e instanceof Lt)&&this.argnames.forEach((t,n)=>{if(t.definition){var i=t.definition();i.orig.length>1||(void 0!==i.fixed||this.uses_arguments&&!e.has_directive("use strict")?i.fixed=!1:(i.fixed=function(){return a.args[n]||p(dn,a)},e.loop_ids.set(i.id,e.in_loop),s(e,i,!0)))}}),t(),o(e),!0);var a})),e(Ce,(function(e,t,n){i(n,this);const a=e.in_loop;return e.in_loop=this,r(e),this.body.walk(e),zi(this)&&(o(e),r(e)),this.condition.walk(e),o(e),e.in_loop=a,!0})),e(Fe,(function(e,t,n){i(n,this),this.init&&this.init.walk(e);const a=e.in_loop;return e.in_loop=this,r(e),this.condition&&this.condition.walk(e),this.body.walk(e),this.step&&(zi(this)&&(o(e),r(e)),this.step.walk(e)),o(e),e.in_loop=a,!0})),e(Me,(function(e,t,n){i(n,this),this.init.walk(f),this.object.walk(e);const a=e.in_loop;return e.in_loop=this,r(e),this.body.walk(e),o(e),e.in_loop=a,!0})),e(Ze,(function(e){return this.condition.walk(e),r(e),this.body.walk(e),o(e),this.alternative&&(r(e),this.alternative.walk(e),o(e)),!0})),e(Te,(function(e){return r(e),this.body.walk(e),o(e),!0})),e($t,(function(){this.definition().fixed=!1})),e(Qt,(function(e,t,n){var i,r,o=this.definition();o.references.push(this),1==o.references.length&&!o.fixed&&o.orig[0]instanceof Xt&&e.loop_ids.set(o.id,e.in_loop),void 0!==o.fixed&&u(e,o)?o.fixed&&((i=this.fixed_value())instanceof Ie&&qi(e,o)?o.recursive_refs++:i&&!n.exposed(o)&&function(e,t,n){return t.option("unused")&&!n.scope.pinned()&&n.references.length-n.recursive_refs==1&&e.loop_ids.get(n.id)===e.in_loop}(e,n,o)?o.single_use=!(i instanceof Ie&&function(e,t,n){let i=ci(e);const r=t.enclosed.filter(e=>!t.variables.has(e.name)).map(e=>e.name);if(!r.length)return!1;for(;i&&!(i instanceof xe)&&i!==n;){if(r.some(e=>i.variables.has(e)))return!0;i=i.parent_scope}return!1}(e,i,o.scope))&&(i instanceof Ie&&!i.pinned()||i instanceof xt||o.scope===this.scope&&i.is_constant_expression()):o.single_use=!1,oi(n,e,this,i,0,!!(r=i)&&(r.is_constant()||r instanceof Ie||r instanceof rn))&&(o.single_use?o.single_use="m":o.fixed=!1)):o.fixed=!1,l(e,o,this.scope,this,i,0,1)})),e(xe,(function(e,i,r){this.globals.forEach((function(e){t(r,e)})),n(e,r,this)})),e(nt,(function(e,t,n){return i(n,this),r(e),he(this,e),o(e),this.bcatch&&(r(e),this.bcatch.walk(e),o(e)),this.bfinally&&this.bfinally.walk(e),!0})),e(gt,(function(e,t){var n=this;if("++"===n.operator||"--"===n.operator){var i=n.expression;if(i instanceof Qt){var r=i.definition(),o=c(e,r,i.scope,!0);if(r.assignments++,o){var a=r.fixed;if(a)return r.references.push(i),r.chained=!0,r.fixed=function(){return p(vt,n,{operator:n.operator.slice(0,-1),left:p(St,n,{operator:"+",expression:a instanceof pe?a:a()}),right:p(un,n,{value:1})})},s(e,r,!0),!0}}}})),e(pt,(function(e,t){var n=this;if(n.name instanceof Ke)n.name.walk(f);else{var i=n.name.definition();if(n.value){if(c(e,i,n.name.scope,n.value))return i.fixed=function(){return n.value},e.loop_ids.set(i.id,e.in_loop),s(e,i,!1),t(),s(e,i,!0),!0;i.fixed=!1}}})),e(Oe,(function(e,t,n){i(n,this);const a=e.in_loop;return e.in_loop=this,r(e),t(),o(e),e.in_loop=a,!0}))}((function(e,t){e.DEFMETHOD("reduce_vars",t)})),xe.DEFMETHOD("reset_opt_flags",(function(e){const t=this,n=e.option("reduce_vars"),i=new vn((function(r,o){if(ti(r,Jn),n)return e.top_retain&&r instanceof Be&&i.parent()===t&&ei(r,Zn),r.reduce_vars(i,o,e)}));i.safe_ids=Object.create(null),i.in_loop=null,i.loop_ids=new Map,i.defs_to_safe_ids=new Map,t.walk(i)})),Lt.DEFMETHOD("fixed_value",(function(){var e=this.definition().fixed;return!e||e instanceof pe?e:e()})),Qt.DEFMETHOD("is_immutable",(function(){var e=this.definition().orig;return 1==e.length&&e[0]instanceof Wt}));var Ai=h("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Math Number parseFloat parseInt RangeError ReferenceError RegExp Object setInterval setTimeout String SyntaxError TypeError unescape URIError");Qt.DEFMETHOD("is_declared",(function(e){return!this.definition().undeclared||e.option("unsafe")&&Ai.has(this.name)}));var vi,Ti=h("Infinity NaN undefined");function bi(e){return e instanceof En||e instanceof _n||e instanceof dn}function yi(e,t){var n,r,o=t.find_parent(we).get_defun_scope();!function(){var e=t.self(),i=0;do{if(e instanceof it||e instanceof rt)i++;else if(e instanceof be)n=!0;else{if(e instanceof we){o=e;break}e instanceof nt&&(r=!0)}}while(e=t.parent(i++))}();var a,s=10;do{a=!1,c(e),t.option("dead_code")&&_(e,t),t.option("if_return")&&l(e,t),t.sequences_limit>0&&(E(e,t),D(e,t)),t.option("join_vars")&&S(e),t.option("collapse_vars")&&u(e,t)}while(a&&s-- >0);function u(e,t){if(o.pinned())return e;for(var s,u=[],c=e.length,l=new Tn((function(e,n){if(F)return e;if(!O)return e!==d[m]?e:++m=0;){0==c&&t.option("unused")&&L();var d=[];for(V(e[c]);u.length>0;){d=u.pop();var m=0,E=d[d.length-1],h=null,D=null,g=null,S=P(E);if(S&&!si(S)&&!S.has_side_effects(t)){var A=K(E),v=G(S);S instanceof Qt&&A.set(S.name,!1);var T=H(E),b=X(),y=E.may_throw(t),C=E.name instanceof Ht,O=C,F=!1,M=0,R=!s||!O;if(!R){for(var N=t.self().argnames.lastIndexOf(E.name)+1;!F&&NM)M=!1;else{F=!1,m=0,O=C;for(w=c;!F&&w!(e instanceof ke))){var r=t.has_directive("use strict");r&&!i(r,n.body)&&(r=!1);var o=n.argnames.length;s=e.args.slice(o);for(var a=new Set,c=o;--c>=0;){var l=n.argnames[c],f=e.args[c];const i=l.definition&&l.definition();if(!(i&&i.orig.length>1)&&(s.unshift(p(pt,l,{name:l,value:f})),!a.has(l.name)))if(a.add(l.name),l instanceof ke){var _=e.args.slice(c);_.every(e=>!I(n,e,r))&&u.unshift([p(pt,l,{name:l.expression,value:p(Ct,e,{elements:_})})])}else f?(f instanceof Ie&&f.pinned()||I(n,f,r))&&(f=null):f=p(dn,l).transform(t),f&&u.unshift([p(pt,l,{name:l,value:f})])}}}function V(e){if(d.push(e),e instanceof bt)e.left.has_side_effects(t)||u.push(d.slice()),V(e.right);else if(e instanceof vt)V(e.left),V(e.right);else if(e instanceof _t)V(e.expression),e.args.forEach(V);else if(e instanceof tt)V(e.expression);else if(e instanceof Tt)V(e.condition),V(e.consequent),V(e.alternative);else if(!(e instanceof ot)||!t.option("unused")&&e instanceof ut)e instanceof ye?(V(e.condition),e.body instanceof ge||V(e.body)):e instanceof ze?e.value&&V(e.value):e instanceof Fe?(e.init&&V(e.init),e.condition&&V(e.condition),e.step&&V(e.step),e.body instanceof ge||V(e.body)):e instanceof Me?(V(e.object),e.body instanceof ge||V(e.body)):e instanceof Ze?(V(e.condition),e.body instanceof ge||V(e.body),!e.alternative||e.alternative instanceof ge||V(e.alternative)):e instanceof mt?e.expressions.forEach(V):e instanceof Ee?V(e.body):e instanceof Je?(V(e.expression),e.body.forEach(V)):e instanceof gt?"++"!=e.operator&&"--"!=e.operator||u.push(d.slice()):e instanceof pt&&e.value&&(u.push(d.slice()),V(e.value));else{var n=e.definitions.length,i=n-200;for(i<0&&(i=0);i1&&!(e.name instanceof Ht)||(r>1?function(e){var t=e.value;if(t instanceof Qt&&"arguments"!=t.name){var n=t.definition();if(!n.undeclared)return h=n}}(e):!t.exposed(n))?p(Qt,e.name,e.name):void 0}}function B(e){return e[e instanceof bt?"right":"value"]}function K(e){var n=new Map;if(e instanceof gt)return n;var i=new vn((function(e,r){for(var o=e;o instanceof Et;)o=o.expression;(o instanceof Qt||o instanceof rn)&&n.set(o.name,n.get(o.name)||oi(t,i,e,e,0))}));return B(e).walk(i),n}function U(n){if(n.name instanceof Ht){var i=t.parent(),r=t.self().argnames,o=r.indexOf(n.name);if(o<0)i.args.length=Math.min(i.args.length,r.length-1);else{var a=i.args;a[o]&&(a[o]=p(un,a[o],{value:0}))}return!0}var s=!1;return e[c].transform(new Tn((function(e,t,i){return s?e:e===n||e.body===n?(s=!0,e instanceof pt?(e.value=null,e):i?f.skip:null):void 0}),(function(e){if(e instanceof mt)switch(e.expressions.length){case 0:return null;case 1:return e.expressions[0]}})))}function G(e){for(;e instanceof Et;)e=e.expression;return e instanceof Qt&&e.definition().scope===o&&!(n&&(A.has(e.name)||E instanceof gt||E instanceof bt&&"="!=E.operator))}function H(e){return e instanceof gt?Ri.has(e.operator):B(e).has_side_effects(t)}function X(){if(T)return!1;if(h)return!0;if(S instanceof Qt){var e=S.definition();if(e.references.length-e.replaced==(E instanceof pt?1:2))return!0}return!1}function z(e){if(!e.definition)return!0;var t=e.definition();return!(1==t.orig.length&&t.orig[0]instanceof Xt)&&(t.scope.get_defun_scope()!==o||!t.references.every(e=>{var t=e.scope.get_defun_scope();return"Scope"==t.TYPE&&(t=t.parent_scope),t===o}))}}function c(e){for(var t=[],n=0;n=0;){var i=e[n];if(i instanceof Ze&&i.body instanceof We&&++t>1)return!0}return!1}(e),r=n instanceof Ie,o=e.length;--o>=0;){var s=e[o],u=S(o),c=e[u];if(r&&!c&&s instanceof We){if(!s.value){a=!0,e.splice(o,1);continue}if(s.value instanceof St&&"void"==s.value.operator){a=!0,e[o]=p(Ee,s,{body:s.value.expression});continue}}if(s instanceof Ze){var l;if(h(l=Ui(s.body))){l.label&&m(l.label.thedef.references,l),a=!0,(s=s.clone()).condition=s.condition.negate(t);var f=g(s.body,l);s.body=p(Se,s,{body:mi(s.alternative).concat(D())}),s.alternative=p(Se,s,{body:f}),e[o]=s.transform(t);continue}if(h(l=Ui(s.alternative))){l.label&&m(l.label.thedef.references,l),a=!0,(s=s.clone()).body=p(Se,s.body,{body:mi(s.body).concat(D())});f=g(s.alternative,l);s.alternative=p(Se,s.alternative,{body:f}),e[o]=s.transform(t);continue}}if(s instanceof Ze&&s.body instanceof We){var _=s.body.value;if(!_&&!s.alternative&&(r&&!c||c instanceof We&&!c.value)){a=!0,e[o]=p(Ee,s.condition,{body:s.condition});continue}if(_&&!s.alternative&&c instanceof We&&c.value){a=!0,(s=s.clone()).alternative=c,e[o]=s.transform(t),e.splice(u,1);continue}if(_&&!s.alternative&&(!c&&r&&i||c instanceof We)){a=!0,(s=s.clone()).alternative=c||p(We,s,{value:null}),e[o]=s.transform(t),c&&e.splice(u,1);continue}var E=e[A(o)];if(t.option("sequences")&&r&&!s.alternative&&E instanceof Ze&&E.body instanceof We&&S(u)==e.length&&c instanceof Ee){a=!0,(s=s.clone()).alternative=p(Se,c,{body:[c,p(We,c,{value:null})]}),e[o]=s.transform(t),e.splice(u,1);continue}}}function h(i){if(!i)return!1;for(var a=o+1,s=e.length;a=0;){var i=e[n];if(!(i instanceof at&&d(i)))break}return n}}function _(e,t){for(var n,i=t.self(),r=0,o=0,s=e.length;r!e.value)}function E(e,t){if(!(e.length<2)){for(var n=[],i=0,r=0,o=e.length;r=t.sequences_limit&&c();var u=s.body;n.length>0&&(u=u.drop_side_effect_free(t)),u&&di(n,u)}else s instanceof ot&&d(s)||s instanceof Be?e[i++]=s:(c(),e[i++]=s)}c(),e.length=i,i!=o&&(a=!0)}function c(){if(n.length){var t=fi(n[0],n);e[i++]=p(Ee,t,{body:t}),n=[]}}}function h(e,t){if(!(e instanceof Se))return e;for(var n=null,i=0,r=e.body.length;i0){var _=c.length;c.push(p(Ze,s,{condition:s.condition,body:l||p(Ae,s.body),alternative:f})),c.unshift(r,1),[].splice.apply(e,c),o+=_,r+=_+1,i=null,a=!0;continue}}e[r++]=s,i=s instanceof Ee?s:null}e.length=r}function g(e,n){if(e instanceof ot){var i,r=e.definitions[e.definitions.length-1];if(r.value instanceof Ot)if(n instanceof bt?i=[n]:n instanceof mt&&(i=n.expressions.slice()),i){var a=!1;do{var s=i[0];if(!(s instanceof bt))break;if("="!=s.operator)break;if(!(s.left instanceof Et))break;var u=s.left.expression;if(!(u instanceof Qt))break;if(r.name.name!=u.name)break;if(!s.right.is_constant_expression(o))break;var c=s.left.property;if(c instanceof pe&&(c=c.evaluate(t)),c instanceof pe)break;c=""+c;var l=t.option("ecma")<2015&&t.has_directive("use strict")?function(e){return e.key!=c&&e.key&&e.key.name!=c}:function(e){return e.key&&e.key.name!=c};if(!r.value.properties.every(l))break;var f=r.value.properties.filter((function(e){return e.key===c}))[0];f?f.value=new mt({start:f.start,expressions:[f.value.clone(),s.right.clone()],end:f.end}):r.value.properties.push(p(Mt,s,{key:c,value:s.right})),i.shift(),a=!0}while(i.length);return a&&i}}}function S(e){for(var t,n=0,i=-1,r=e.length;n=0;)if(this.properties[n]._dot_throw(e))return!0;return!1})),e(Ft,s),e(Nt,u),e(ke,(function(e){return this.expression._dot_throw(e)})),e(Ve,s),e(Pe,s),e(At,s),e(St,(function(){return"void"==this.operator})),e(vt,(function(e){return("&&"==this.operator||"||"==this.operator)&&(this.left._dot_throw(e)||this.right._dot_throw(e))})),e(bt,(function(e){return"="==this.operator&&this.right._dot_throw(e)})),e(Tt,(function(e){return this.consequent._dot_throw(e)||this.alternative._dot_throw(e)})),e(ht,(function(e){return!!t(e)&&!(this.expression instanceof Ve&&"prototype"==this.property)})),e(mt,(function(e){return this.tail_node()._dot_throw(e)})),e(Qt,(function(e){if(Qn(this,Wn))return!0;if(!t(e))return!1;if(Si(this)&&this.is_declared(e))return!1;if(this.is_immutable())return!1;var n=this.fixed_value();return!n||n._dot_throw(e)}))}((function(e,t){e.DEFMETHOD("_dot_throw",t)})),function(e){const t=h("! delete"),n=h("in instanceof == != === !== < <= >= >");e(pe,s),e(St,(function(){return t.has(this.operator)})),e(vt,(function(){return n.has(this.operator)||Mi.has(this.operator)&&this.left.is_boolean()&&this.right.is_boolean()})),e(Tt,(function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()})),e(bt,(function(){return"="==this.operator&&this.right.is_boolean()})),e(mt,(function(){return this.tail_node().is_boolean()})),e(gn,u),e(Dn,u)}((function(e,t){e.DEFMETHOD("is_boolean",t)})),function(e){e(pe,s),e(un,u);var t=h("+ - ~ ++ --");e(gt,(function(){return t.has(this.operator)}));var n=h("- * / % & | ^ << >> >>>");e(vt,(function(e){return n.has(this.operator)||"+"==this.operator&&this.left.is_number(e)&&this.right.is_number(e)})),e(bt,(function(e){return n.has(this.operator.slice(0,-1))||"="==this.operator&&this.right.is_number(e)})),e(mt,(function(e){return this.tail_node().is_number(e)})),e(Tt,(function(e){return this.consequent.is_number(e)&&this.alternative.is_number(e)}))}((function(e,t){e.DEFMETHOD("is_number",t)})),(vi=function(e,t){e.DEFMETHOD("is_string",t)})(pe,s),vi(sn,u),vi(Ge,(function(){return 1===this.segments.length})),vi(St,(function(){return"typeof"==this.operator})),vi(vt,(function(e){return"+"==this.operator&&(this.left.is_string(e)||this.right.is_string(e))})),vi(bt,(function(e){return("="==this.operator||"+="==this.operator)&&this.right.is_string(e)})),vi(mt,(function(e){return this.tail_node().is_string(e)})),vi(Tt,(function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)}));var Mi=h("&& ||"),Ri=h("delete ++ --");function Ni(e,t){return t instanceof gt&&Ri.has(t.operator)?t.expression:t instanceof bt&&t.left===e?e:void 0}function wi(e,t){return e.print_to_string().length>t.print_to_string().length?t:e}function xi(e,t){return wi(p(Ee,e,{body:e}),p(Ee,t,{body:t})).body}function ki(e,t,n){return(Rn(e)?xi:wi)(t,n)}function Ii(e){const t=new Map;for(var n of Object.keys(e))t.set(n,h(e[n]));return t}!function(e){function t(e,t){e.warn("global_defs "+t.print_to_string()+" redefined [{file}:{line},{col}]",t.start)}xe.DEFMETHOD("resolve_defines",(function(e){return e.option("global_defs")?(this.figure_out_scope({ie8:e.option("ie8")}),this.transform(new Tn((function(n){var i=n._find_defs(e,"");if(i){for(var r,o=0,a=n;(r=this.parent(o++))&&r instanceof Et&&r.expression===a;)a=r;if(!Ni(a,r))return i;t(e,n)}})))):this})),e(pe,a),e(ht,(function(e,t){return this.expression._find_defs(e,"."+this.property+t)})),e(Pt,(function(e){this.global()&&g(e.option("global_defs"),this.name)&&t(e,this)})),e(Qt,(function(e,t){if(this.global()){var n=e.option("global_defs"),i=this.name+t;return g(n,i)?function e(t,n){if(t instanceof pe)return p(t.CTOR,n,t);if(Array.isArray(t))return p(Ct,n,{elements:t.map((function(t){return e(t,n)}))});if(t&&"object"==typeof t){var i=[];for(var r in t)g(t,r)&&i.push(p(Mt,n,{key:r,value:e(t[r],n)}));return p(Ot,n,{properties:i})}return pi(t,n)}(n[i],this):void 0}}))}((function(e,t){e.DEFMETHOD("_find_defs",t)}));var Li=["constructor","toString","valueOf"],Vi=Ii({Array:["indexOf","join","lastIndexOf","slice"].concat(Li),Boolean:Li,Function:Li,Number:["toExponential","toFixed","toPrecision"].concat(Li),Object:Li,RegExp:["test"].concat(Li),String:["charAt","charCodeAt","concat","indexOf","italics","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","trim"].concat(Li)}),Pi=Ii({Array:["isArray"],Math:["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","atan2","pow","max","min"],Number:["isFinite","isNaN"],Object:["create","getOwnPropertyDescriptor","getOwnPropertyNames","getPrototypeOf","isExtensible","isFrozen","isSealed","keys"],String:["fromCharCode"]});!function(e){pe.DEFMETHOD("evaluate",(function(e){if(!e.option("evaluate"))return this;var t=this._eval(e,1);return!t||t instanceof RegExp?t:"function"==typeof t||"object"==typeof t?this:t}));var t=h("! ~ - + void");pe.DEFMETHOD("is_constant",(function(){return this instanceof an?!(this instanceof ln):this instanceof St&&this.expression instanceof an&&t.has(this.operator)})),e(_e,(function(){throw new Error(d("Cannot evaluate a statement [{file}:{line},{col}]",this.start))})),e(Ie,c),e(xt,c),e(pe,c),e(an,(function(){return this.getValue()})),e(ln,(function(e){let t=e.evaluated_regexps.get(this);if(void 0===t){try{t=(0,eval)(this.print_to_string())}catch(e){t=null}e.evaluated_regexps.set(this,t)}return t||this})),e(Ge,(function(){return 1!==this.segments.length?this:this.segments[0].value})),e(Ve,(function(e){if(e.option("unsafe")){var t=function(){};return t.node=this,t.toString=function(){return this.node.print_to_string()},t}return this})),e(Ct,(function(e,t){if(e.option("unsafe")){for(var n=[],i=0,r=this.elements.length;i>":r=n>>o;break;case">>>":r=n>>>o;break;case"==":r=n==o;break;case"===":r=n===o;break;case"!=":r=n!=o;break;case"!==":r=n!==o;break;case"<":r=n":r=n>o;break;case">=":r=n>=o;break;default:return this}return isNaN(r)&&e.find_parent(Ne)?this:r})),e(Tt,(function(e,t){var n=this.condition._eval(e,t);if(n===this.condition)return this;var i=n?this.consequent:this.alternative,r=i._eval(e,t);return r===i?this:r})),e(Qt,(function(e,t){var n,i=this.fixed_value();if(!i)return this;if(g(i,"_eval"))n=i._eval();else{if(this._eval=c,n=i._eval(e,t),delete this._eval,n===i)return this;i._eval=function(){return n}}if(n&&"object"==typeof n){var r=this.definition().escaped;if(r&&t>r)return this}return n}));var r={Array:Array,Math:Math,Number:Number,Object:Object,String:String},o=Ii({Math:["E","LN10","LN2","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],Number:["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"]});e(Et,(function(e,t){if(e.option("unsafe")){var n=this.property;if(n instanceof pe&&(n=n._eval(e,t))===this.property)return this;var i,a=this.expression;if(Si(a)){var s,u="hasOwnProperty"===a.name&&"call"===n&&(s=e.parent()&&e.parent().args)&&s&&s[0]&&s[0].evaluate(e);if(null==(u=u instanceof ht?u.expression:u)||u.thedef&&u.thedef.undeclared)return this.clone();var c=o.get(a.name);if(!c||!c.has(n))return this;i=r[a.name]}else{if(!(i=a._eval(e,t+1))||i===a||!g(i,n))return this;if("function"==typeof i)switch(n){case"name":return i.node.name?i.node.name.name:"";case"length":return i.node.argnames.length;default:return this}}return i[n]}return this})),e(_t,(function(e,t){var n=this.expression;if(e.option("unsafe")&&n instanceof Et){var i,o=n.property;if(o instanceof pe&&(o=o._eval(e,t))===n.property)return this;var a=n.expression;if(Si(a)){var s="hasOwnProperty"===a.name&&"call"===o&&this.args[0]&&this.args[0].evaluate(e);if(null==(s=s instanceof ht?s.expression:s)||s.thedef&&s.thedef.undeclared)return this.clone();var u=Pi.get(a.name);if(!u||!u.has(o))return this;i=r[a.name]}else{if((i=a._eval(e,t+1))===a||!i)return this;var c=Vi.get(i.constructor.name);if(!c||!c.has(o))return this}for(var l=[],f=0,p=this.args.length;f=":return r.operator="<",r;case">":return r.operator="<=",r}switch(o){case"==":return r.operator="!=",r;case"!=":return r.operator="==",r;case"===":return r.operator="!==",r;case"!==":return r.operator="===",r;case"&&":return r.operator="||",r.left=r.left.negate(e,i),r.right=r.right.negate(e),n(this,r,i);case"||":return r.operator="&&",r.left=r.left.negate(e,i),r.right=r.right.negate(e),n(this,r,i)}return t(this)}))}((function(e,t){e.DEFMETHOD("negate",(function(e,n){return t.call(this,e,n)}))}));var Bi=h("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError");_t.DEFMETHOD("is_expr_pure",(function(e){if(e.option("unsafe")){var t=this.expression,n=this.args&&this.args[0]&&this.args[0].evaluate(e);if(t.expression&&"hasOwnProperty"===t.expression.name&&(null==n||n.thedef&&n.thedef.undeclared))return!1;if(Si(t)&&Bi.has(t.name))return!0;let i;if(t instanceof ht&&Si(t.expression)&&(i=Pi.get(t.expression.name))&&i.has(t.property))return!0}return!!b(this,bn)||!e.pure_funcs(this)})),pe.DEFMETHOD("is_call_pure",s),ht.DEFMETHOD("is_call_pure",(function(e){if(!e.option("unsafe"))return;const t=this.expression;let n;return t instanceof Ct?n=Vi.get("Array"):t.is_boolean()?n=Vi.get("Boolean"):t.is_number(e)?n=Vi.get("Number"):t instanceof ln?n=Vi.get("RegExp"):t.is_string(e)?n=Vi.get("String"):this.may_throw_on_access(e)||(n=Vi.get("Object")),n&&n.has(this.property)}));const Ki=new Set(["Number","String","Array","Object","Function","Promise"]);function Ui(e){return e&&e.aborts()}!function(e){function t(e,t){for(var n=e.length;--n>=0;)if(e[n].has_side_effects(t))return!0;return!1}e(pe,u),e(Ae,s),e(an,s),e(rn,s),e(ge,(function(e){return t(this.body,e)})),e(_t,(function(e){return!(this.is_expr_pure(e)||this.expression.is_call_pure(e)&&!this.expression.has_side_effects(e))||t(this.args,e)})),e(Je,(function(e){return this.expression.has_side_effects(e)||t(this.body,e)})),e(tt,(function(e){return this.expression.has_side_effects(e)||t(this.body,e)})),e(nt,(function(e){return t(this.body,e)||this.bcatch&&this.bcatch.has_side_effects(e)||this.bfinally&&this.bfinally.has_side_effects(e)})),e(Ze,(function(e){return this.condition.has_side_effects(e)||this.body&&this.body.has_side_effects(e)||this.alternative&&this.alternative.has_side_effects(e)})),e(Te,(function(e){return this.body.has_side_effects(e)})),e(Ee,(function(e){return this.body.has_side_effects(e)})),e(Ie,s),e(xt,(function(e){return!!this.extends&&this.extends.has_side_effects(e)})),e(kt,u),e(vt,(function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)})),e(bt,u),e(Tt,(function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)})),e(gt,(function(e){return Ri.has(this.operator)||this.expression.has_side_effects(e)})),e(Qt,(function(e){return!this.is_declared(e)&&!Ki.has(this.name)})),e(Pt,s),e(Ot,(function(e){return t(this.properties,e)})),e(Ft,(function(e){return!!(this instanceof Mt&&this.key instanceof pe&&this.key.has_side_effects(e))||this.value.has_side_effects(e)})),e(Ct,(function(e){return t(this.elements,e)})),e(ht,(function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)})),e(Dt,(function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)||this.property.has_side_effects(e)})),e(mt,(function(e){return t(this.expressions,e)})),e(ot,(function(e){return t(this.definitions,e)})),e(pt,(function(e){return this.value})),e(He,s),e(Ge,(function(e){return t(this.segments,e)}))}((function(e,t){e.DEFMETHOD("has_side_effects",t)})),function(e){function t(e,t){for(var n=e.length;--n>=0;)if(e[n].may_throw(t))return!0;return!1}e(pe,u),e(xt,s),e(an,s),e(Ae,s),e(Ie,s),e(Pt,s),e(rn,s),e(Ct,(function(e){return t(this.elements,e)})),e(bt,(function(e){return!!this.right.may_throw(e)||!(!e.has_directive("use strict")&&"="==this.operator&&this.left instanceof Qt)&&this.left.may_throw(e)})),e(vt,(function(e){return this.left.may_throw(e)||this.right.may_throw(e)})),e(ge,(function(e){return t(this.body,e)})),e(_t,(function(e){return!!t(this.args,e)||!this.is_expr_pure(e)&&(!!this.expression.may_throw(e)||(!(this.expression instanceof Ie)||t(this.expression.body,e)))})),e(tt,(function(e){return this.expression.may_throw(e)||t(this.body,e)})),e(Tt,(function(e){return this.condition.may_throw(e)||this.consequent.may_throw(e)||this.alternative.may_throw(e)})),e(ot,(function(e){return t(this.definitions,e)})),e(ht,(function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)})),e(Ze,(function(e){return this.condition.may_throw(e)||this.body&&this.body.may_throw(e)||this.alternative&&this.alternative.may_throw(e)})),e(Te,(function(e){return this.body.may_throw(e)})),e(Ot,(function(e){return t(this.properties,e)})),e(Ft,(function(e){return this.value.may_throw(e)})),e(We,(function(e){return this.value&&this.value.may_throw(e)})),e(mt,(function(e){return t(this.expressions,e)})),e(Ee,(function(e){return this.body.may_throw(e)})),e(Dt,(function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)||this.property.may_throw(e)})),e(Je,(function(e){return this.expression.may_throw(e)||t(this.body,e)})),e(Qt,(function(e){return!this.is_declared(e)&&!Ki.has(this.name)})),e(nt,(function(e){return this.bcatch?this.bcatch.may_throw(e):t(this.body,e)||this.bfinally&&this.bfinally.may_throw(e)})),e(gt,(function(e){return!("typeof"==this.operator&&this.expression instanceof Qt)&&this.expression.may_throw(e)})),e(pt,(function(e){return!!this.value&&this.value.may_throw(e)}))}((function(e,t){e.DEFMETHOD("may_throw",t)})),function(e){function t(e){var t=this,n=!0;return t.walk(new vn((function(r){if(!n)return!0;if(r instanceof Qt){if(Qn(t,Yn))return n=!1,!0;var o=r.definition();if(i(o,t.enclosed)&&!t.variables.has(o.name)){if(e){var a=e.find_variable(r);if(o.undeclared?!a:a===o)return n="f",!0}n=!1}return!0}return r instanceof rn&&t instanceof Pe?(n=!1,!0):void 0}))),n}e(pe,s),e(an,u),e(xt,(function(e){return!(this.extends&&!this.extends.is_constant_expression(e))&&t.call(this,e)})),e(Ie,t),e(gt,(function(){return this.expression.is_constant_expression()})),e(vt,(function(){return this.left.is_constant_expression()&&this.right.is_constant_expression()})),e(Ct,(function(){return this.elements.every(e=>e.is_constant_expression())})),e(Ot,(function(){return this.properties.every(e=>e.is_constant_expression())})),e(Ft,(function(){return!(this.key instanceof pe)&&this.value.is_constant_expression()}))}((function(e,t){e.DEFMETHOD("is_constant_expression",t)})),function(e){function t(){for(var e=0;e1)&&(s.name=null),s instanceof Ie&&!(s instanceof Le))for(var g=!e.option("keep_fargs"),A=s.argnames,v=A.length;--v>=0;){var T=A[v];T instanceof ke&&(T=T.expression),T instanceof yt&&(T=T.left),T instanceof Ke||o.has(T.definition().id)?g=!1:(ei(T,zn),g&&(A.pop(),e[T.unreferenced()?"warn":"info"]("Dropping unused function argument {name} [{file}:{line},{col}]",R(T))))}if((s instanceof Be||s instanceof kt)&&s!==t){const t=s.name.definition();if(!(t.global&&!n||o.has(t.id))){if(e[s.name.unreferenced()?"warn":"info"]("Dropping unused function {name} [{file}:{line},{col}]",R(s.name)),t.eliminated++,s instanceof kt){const t=s.drop_side_effect_free(e);if(t)return p(Ee,s,{body:t})}return _?f.skip:p(Ae,s)}}if(s instanceof ot&&!(E instanceof Me&&E.init===s)){var b=!(E instanceof xe||s instanceof at),y=[],C=[],O=[],F=[];switch(s.definitions.forEach((function(t){t.value&&(t.value=t.value.transform(d));var n=t.name instanceof Ke,r=n?new Un(null,{name:""}):t.name.definition();if(b&&r.global)return O.push(t);if(!i&&!b||n&&(t.name.names.length||t.name.is_array||1!=e.option("pure_getters"))||o.has(r.id)){if(t.value&&a.has(r.id)&&a.get(r.id)!==t&&(t.value=t.value.drop_side_effect_free(e)),t.name instanceof Bt){var c=u.get(r.id);if(c.length>1&&(!t.value||r.orig.indexOf(t.name)>r.eliminated)){if(e.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]",R(t.name)),t.value){var l=p(Qt,t.name,t.name);r.references.push(l);var f=p(bt,t,{operator:"=",left:l,right:t.value});a.get(r.id)===t&&a.set(r.id,f),F.push(f.transform(d))}return m(c,t),void r.eliminated++}}t.value?(F.length>0&&(O.length>0?(F.push(t.value),t.value=fi(t.value,F)):y.push(p(Ee,s,{body:fi(s,F)})),F=[]),O.push(t)):C.push(t)}else if(r.orig[0]instanceof $t){(_=t.value&&t.value.drop_side_effect_free(e))&&F.push(_),t.value=null,C.push(t)}else{var _;(_=t.value&&t.value.drop_side_effect_free(e))?(n||e.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",R(t.name)),F.push(_)):n||e[t.name.unreferenced()?"warn":"info"]("Dropping unused variable {name} [{file}:{line},{col}]",R(t.name)),r.eliminated++}})),(C.length>0||O.length>0)&&(s.definitions=C.concat(O),y.push(s)),F.length>0&&y.push(p(Ee,s,{body:fi(s,F)})),y.length){case 0:return _?f.skip:p(Ae,s);case 1:return y[0];default:return _?f.splice(y):p(Se,s,{body:y})}}if(s instanceof Fe)return c(s,this),s.init instanceof Se&&(M=s.init,s.init=M.body.pop(),M.body.push(s)),s.init instanceof Ee?s.init=s.init.body:Ei(s.init)&&(s.init=null),M?_?f.splice(M.body):M:s;if(s instanceof Te&&s.body instanceof Fe){if(c(s,this),s.body instanceof Se){var M=s.body;return s.body=M.body.pop(),M.body.push(s),_?f.splice(M.body):M}return s}if(s instanceof Se)return c(s,this),_&&s.body.every(hi)?f.splice(s.body):s;if(s instanceof we){const e=l;return l=s,c(s,this),l=e,s}}function R(e){return{name:e.name,file:e.start.file,line:e.start.line,col:e.start.col}}}));function E(e,n){var i;const s=r(e);if(s instanceof Qt&&!ui(e.left,Kt)&&t.variables.get(s.name)===(i=s.definition()))return e instanceof bt&&(e.right.walk(_),i.chained||e.left.fixed_value()!==e.right||a.set(i.id,e)),!0;if(e instanceof Qt){if(i=e.definition(),!o.has(i.id)&&(o.set(i.id,i),i.orig[0]instanceof $t)){const e=i.scope.is_block_scope()&&i.scope.get_defun_scope().variables.get(i.name);e&&o.set(e.id,e)}return!0}if(e instanceof we){var u=l;return l=e,n(),l=u,!0}}t.transform(d)})),we.DEFMETHOD("hoist_declarations",(function(e){var t=this;if(e.has_directive("use asm"))return t;if(!Array.isArray(t.body))return t;var n=e.option("hoist_funs"),i=e.option("hoist_vars");if(n||i){var r=[],o=[],a=new Map,s=0,u=0;t.walk(new vn((function(e){return e instanceof we&&e!==t||(e instanceof at?(++u,!0):void 0)}))),i=i&&u>1;var c=new Tn((function(u){if(u!==t){if(u instanceof me)return r.push(u),p(Ae,u);if(n&&u instanceof Be&&!(c.parent()instanceof ft)&&c.parent()===t)return o.push(u),p(Ae,u);if(i&&u instanceof at){u.definitions.forEach((function(e){e.name instanceof Ke||(a.set(e.name.name,e),++s)}));var l=u.to_assignments(e),f=c.parent();if(f instanceof Me&&f.init===u){if(null==l){var _=u.definitions[0].name;return p(Qt,_,_)}return l}return f instanceof Fe&&f.init===u?l:l?p(Ee,u,{body:l}):p(Ae,u)}if(u instanceof we)return u}}));if(t=t.transform(c),s>0){var l=[];const e=t instanceof Ie,n=e?t.args_as_names():null;if(a.forEach((t,i)=>{e&&n.some(e=>e.name===t.name.name)?a.delete(i):((t=t.clone()).value=null,l.push(t),a.set(i,t))}),l.length>0){for(var f=0;f"string"==typeof e.key)){a(o,this);const e=new Map,t=[];return c.properties.forEach((function(n){t.push(p(pt,o,{name:s(r,n.key,e),value:n.value}))})),i.set(u.id,e),f.splice(t)}}else if(o instanceof Et&&o.expression instanceof Qt){const e=i.get(o.expression.definition().id);if(e){const t=e.get(String(Oi(o.property))),n=p(Qt,o,{name:t.name,scope:o.expression.scope,thedef:t});return n.reference({}),n}}function s(e,n,i){const r=p(e.CTOR,e,{name:t.make_var_name(e.name+"_"+n),scope:t}),o=t.def_variable(r);return i.set(String(n),o),t.enclosed.push(o),r}}));return t.transform(r)})),function(e){function t(e,t,n){var i=e.length;if(!i)return null;for(var r=[],o=!1,a=0;a0&&(u[0].body=s.concat(u[0].body)),e.body=u;n=u[u.length-1];){var d=n.body[n.body.length-1];if(d instanceof $e&&t.loopcontrol_target(d)===e&&n.body.pop(),n.body.length||n instanceof tt&&(o||n.expression.has_side_effects(t)))break;u.pop()===o&&(o=null)}if(0==u.length)return p(Se,e,{body:s.concat(p(Ee,e.expression,{body:e.expression}))}).optimize(t);if(1==u.length&&(u[0]===a||u[0]===o)){var m=!1,E=new vn((function(t){if(m||t instanceof Ie||t instanceof Ee)return!0;t instanceof $e&&E.loopcontrol_target(t)===e&&(m=!0)}));if(e.walk(E),!m){var h,D=u[0].body.slice();return(h=u[0].expression)&&D.unshift(p(Ee,h,{body:h})),D.unshift(p(Ee,e.expression,{body:e.expression})),p(Se,e,{body:D}).optimize(t)}}return e;function g(e,n){n&&!Ui(n)?n.body=n.body.concat(e.body):Ci(t,e,s)}})),ii(nt,(function(e,t){if(yi(e.body,t),e.bcatch&&e.bfinally&&e.bfinally.body.every(Ei)&&(e.bfinally=null),t.option("dead_code")&&e.body.every(Ei)){var n=[];return e.bcatch&&Ci(t,e.bcatch,n),e.bfinally&&n.push(...e.bfinally.body),p(Se,e,{body:n}).optimize(t)}return e})),ot.DEFMETHOD("remove_initializers",(function(){var e=[];this.definitions.forEach((function(t){t.name instanceof Pt?(t.value=null,e.push(t)):t.name.walk(new vn((function(n){n instanceof Pt&&e.push(p(pt,t,{name:n,value:null}))})))})),this.definitions=e})),ot.DEFMETHOD("to_assignments",(function(e){var t=e.option("reduce_vars"),n=this.definitions.reduce((function(e,n){if(!n.value||n.name instanceof Ke){if(n.value){var i=p(pt,n,{name:n.name,value:n.value}),r=p(at,n,{definitions:[i]});e.push(r)}}else{var o=p(Qt,n.name,n.name);e.push(p(bt,n,{operator:"=",left:o,right:n.value})),t&&(o.definition().fixed=!1)}return(n=n.name.definition()).eliminated++,n.replaced--,e}),[]);return 0==n.length?null:fi(this,n)})),ii(ot,(function(e,t){return 0==e.definitions.length?p(Ae,e):e})),ii(lt,(function(e,t){return e})),ii(_t,(function(e,t){var n=e.expression,i=n;tr(e,t,e.args);var r=e.args.every(e=>!(e instanceof ke));if(t.option("reduce_vars")&&i instanceof Qt&&!b(e,Cn)){const e=i.fixed_value();Wi(e,t)||(i=e)}var o=i instanceof Ie;if(t.option("unused")&&r&&o&&!i.uses_arguments&&!i.pinned()){for(var a=0,s=0,u=0,c=e.args.length;u=i.argnames.length;if(l||Qn(i.argnames[u],zn)){if(g=e.args[u].drop_side_effect_free(t))e.args[a++]=g;else if(!l){e.args[a++]=p(un,e.args[u],{value:0});continue}}else e.args[a++]=e.args[u];s=a}e.args.length=s}if(t.option("unsafe"))if(Si(n))switch(n.name){case"Array":if(1!=e.args.length)return p(Ct,e,{elements:e.args}).optimize(t);if(e.args[0]instanceof un&&e.args[0].value<=11){const t=[];for(let n=0;n=1&&e.args.length<=2&&e.args.every(e=>{var n=e.evaluate(t);return f.push(n),e!==n})){const[n,i]=f,r=p(ln,e,{value:{source:n,flags:i}});if(r._eval(t)!==r)return r;t.warn("Error converting {expr} [{file}:{line},{col}]",{expr:e.print_to_string(),file:e.start.file,line:e.start.line,col:e.start.col})}}else if(n instanceof ht)switch(n.property){case"toString":if(0==e.args.length&&!n.expression.may_throw_on_access(t))return p(vt,e,{left:p(sn,e,{value:""}),operator:"+",right:n.expression}).optimize(t);break;case"join":if(n.expression instanceof Ct)e:{var _;if(!(e.args.length>0&&(_=e.args[0].evaluate(t))===e.args[0])){var d,m=[],E=[];for(u=0,c=n.expression.elements.length;u0&&(m.push(p(sn,e,{value:E.join(_)})),E.length=0),m.push(h))}return E.length>0&&m.push(p(sn,e,{value:E.join(_)})),0==m.length?p(sn,e,{value:""}):1==m.length?m[0].is_string(t)?m[0]:p(vt,m[0],{operator:"+",left:p(sn,e,{value:""}),right:m[0]}):""==_?(d=m[0].is_string(t)||m[1].is_string(t)?m.shift():p(sn,e,{value:""}),m.reduce((function(e,t){return p(vt,t,{operator:"+",left:e,right:t})}),d).optimize(t)):((g=e.clone()).expression=g.expression.clone(),g.expression.expression=g.expression.expression.clone(),g.expression.expression.elements=m,ki(t,e,g));var g}}break;case"charAt":if(n.expression.is_string(t)){var S=e.args[0],A=S?S.evaluate(t):0;if(A!==S)return p(Dt,n,{expression:n.expression,property:pi(0|A,S||n)}).optimize(t)}break;case"apply":if(2==e.args.length&&e.args[1]instanceof Ct)return(w=e.args[1].elements.slice()).unshift(e.args[0]),p(_t,e,{expression:p(ht,n,{expression:n.expression,property:"call"}),args:w}).optimize(t);break;case"call":var v=n.expression;if(v instanceof Qt&&(v=v.fixed_value()),v instanceof Ie&&!v.contains_this())return(e.args.length?fi(this,[e.args[0],p(_t,e,{expression:n.expression,args:e.args.slice(1)})]):p(_t,e,{expression:n.expression,args:[]})).optimize(t)}if(t.option("unsafe_Function")&&Si(n)&&"Function"==n.name){if(0==e.args.length)return p(Ve,e,{argnames:[],body:[]}).optimize(t);if(e.args.every(e=>e instanceof sn))try{var T=ce(F="n(function("+e.args.slice(0,-1).map((function(e){return e.value})).join(",")+"){"+e.args[e.args.length-1].value+"})"),y={ie8:t.option("ie8")};T.figure_out_scope(y);var C,O=new ni(t.options);(T=T.transform(O)).figure_out_scope(y),Xn.reset(),T.compute_char_frequency(y),T.mangle_names(y),T.walk(new vn((function(e){return!!C||(ai(e)?(C=e,!0):void 0)})));var F=Ln();return Se.prototype._codegen.call(C,C,F),e.args=[p(sn,e,{value:C.argnames.map((function(e){return e.print_to_string()})).join(",")}),p(sn,e.args[e.args.length-1],{value:F.get().replace(/^{|}$/g,"")})],e}catch(n){if(!(n instanceof Q))throw n;t.warn("Error parsing code passed to new Function [{file}:{line},{col}]",e.args[e.args.length-1].start),t.warn(n.toString())}}var M=o&&i.body[0],R=o&&!i.is_generator&&!i.async,N=R&&t.option("inline")&&!e.is_expr_pure(t);if(N&&M instanceof We){let n=M.value;if(!n||n.is_constant_expression()){n=n?n.clone(!0):p(dn,e);var w=e.args.concat(n);return fi(e,w).optimize(t)}if(1===i.argnames.length&&i.argnames[0]instanceof Ht&&e.args.length<2&&n instanceof Qt&&n.name===i.argnames[0].name)return(e.args[0]||p(dn)).optimize(t)}if(N){var x,k,I=-1;let o,a;if(r&&!i.uses_arguments&&!i.pinned()&&!(t.parent()instanceof xt)&&!(i.name&&i instanceof Ve)&&(a=function(e){var n=i.body,r=n.length;if(t.option("inline")<3)return 1==r&&V(e);e=null;for(var o=0;o!e.value))return!1}else{if(e)return!1;a instanceof Ae||(e=a)}}return V(e)}(M))&&(n===i||b(e,yn)||t.option("unused")&&1==(o=n.definition()).references.length&&!qi(t,o)&&i.is_constant_expression(n.scope))&&!b(e,bn|Cn)&&!i.contains_this()&&function(){var n=new Set;do{if(!(x=t.parent(++I)).is_block_scope()||t.parent(I-1)instanceof we||x.block_scope&&x.block_scope.variables.forEach((function(e){n.add(e.name)})),x instanceof it)x.argname&&n.add(x.argname.name);else if(x instanceof be)k=[];else if(x instanceof Qt&&x.fixed_value()instanceof we)return!1}while(!(x instanceof we));var r=!(x instanceof xe)||t.toplevel.vars,o=t.option("inline");return!!function(e,t){for(var n=i.body.length,r=0;r=0;){var s=o.definitions[a].name;if(s instanceof Ke||e.has(s.name)||Ti.has(s.name)||x.var_names().has(s.name))return!1;k&&k.push(s.definition())}}}return!0}(n,o>=3&&r)&&(!!function(e,t){for(var n=0,r=i.argnames.length;n=2&&r)&&(!!function(){var t=new Set,n=new vn((function(e){if(e instanceof we){var n=new Set;return e.enclosed.forEach((function(e){n.add(e.name)})),e.variables.forEach((function(e){n.delete(e)})),n.forEach((function(e){t.add(e)})),!0}return!1}));if(e.args.forEach((function(e){e.walk(n)})),0==t.size)return!0;for(var r=0,o=i.argnames.length;r=0;){var c=s.definitions[u].name;if(c instanceof Ke||t.has(c.name))return!1}}return!0}()&&(!k||0==k.length||!ji(i,k))))}()&&!(x instanceof xt))return ei(i,$n),ci(t,!0).add_child_scope(i),fi(e,function(n){var r=[],o=[];if(function(t,n){for(var r=i.argnames.length,o=e.args.length;--o>=r;)n.push(e.args[o]);for(o=r;--o>=0;){var a=i.argnames[o],s=e.args[o];if(Qn(a,zn)||!a.name||x.var_names().has(a.name))s&&n.push(s);else{var u=p(Bt,a,a);a.definition().orig.push(u),!s&&k&&(s=p(dn,e)),P(t,n,u,s)}}t.reverse(),n.reverse()}(r,o),function(e,t){for(var n=t.length,r=0,o=i.body.length;re.name!=l.name)){var f=i.variables.get(l.name),_=p(Qt,l,l);f.references.push(_),t.splice(n++,0,p(bt,c,{operator:"=",left:_,right:p(dn,l)}))}}}}(r,o),o.push(n),r.length){const e=x.body.indexOf(t.parent(I-1))+1;x.body.splice(e,0,p(at,i,{definitions:r}))}return o.map(e=>e.clone(!0))}(a)).optimize(t)}if(R&&t.option("side_effects")&&i.body.every(Ei)){w=e.args.concat(p(dn,e));return fi(e,w).optimize(t)}if(t.option("negate_iife")&&t.parent()instanceof Ee&&gi(e))return e.negate(t,!0);var L=e.evaluate(t);return L!==e?(L=pi(L,e).optimize(t),ki(t,L,e)):e;function V(t){return t?t instanceof We?t.value?t.value.clone(!0):p(dn,e):t instanceof Ee?p(St,t,{operator:"void",expression:t.body.clone(!0)}):void 0:p(dn,e)}function P(t,n,i,r){var o=i.definition();x.variables.set(i.name,o),x.enclosed.push(o),x.var_names().has(i.name)||(x.add_var_name(i.name),t.push(p(pt,i,{name:i,value:null})));var a=p(Qt,i,i);o.references.push(a),r&&n.push(p(bt,e,{operator:"=",left:a,right:r.clone()}))}})),ii(dt,(function(e,t){return t.option("unsafe")&&Si(e.expression)&&["Object","RegExp","Function","Error","Array"].includes(e.expression.name)?p(_t,e,e).transform(t):e})),ii(mt,(function(e,t){if(!t.option("side_effects"))return e;var n,i,r=[];n=Rn(t),i=e.expressions.length-1,e.expressions.forEach((function(e,o){o0&&Fi(r[o],t);)o--;o0)return(n=this.clone()).right=fi(this.right,t.slice(o)),(t=t.slice(0,o)).push(n),fi(this,t).optimize(e)}}return this}));var Yi=h("== === != !== * & | ^");function qi(e,t){for(var n,i=0;n=e.parent(i);i++)if(n instanceof Ie){var r=n.name;if(r&&r.definition()===t)break}return n}function $i(e,t){return e instanceof Qt||e.TYPE===t.TYPE}function ji(e,t){var n=!1,r=new vn((function(e){return!!n||(e instanceof Qt&&i(e.definition(),t)?n=!0:void 0)})),o=new vn((function(t){if(n)return!0;if(t instanceof we&&t!==e){var i=o.parent();if(i instanceof _t&&i.expression===t)return;return t.walk(r),!0}}));return e.walk(o),n}ii(vt,(function(e,t){function n(){return e.left.is_constant()||e.right.is_constant()||!e.left.has_side_effects(t)&&!e.right.has_side_effects(t)}function i(t){if(n()){t&&(e.operator=t);var i=e.left;e.left=e.right,e.right=i}}if(Yi.has(e.operator)&&e.right.is_constant()&&!e.left.is_constant()&&(e.left instanceof vt&&se[e.left.operator]>=se[e.operator]||i()),e=e.lift_sequences(t),t.option("comparisons"))switch(e.operator){case"===":case"!==":var r=!0;(e.left.is_string(t)&&e.right.is_string(t)||e.left.is_number(t)&&e.right.is_number(t)||e.left.is_boolean()&&e.right.is_boolean()||e.left.equivalent_to(e.right))&&(e.operator=e.operator.substr(0,2));case"==":case"!=":if(!r&&Fi(e.left,t))e.left=p(pn,e.left);else if(t.option("typeofs")&&e.left instanceof sn&&"undefined"==e.left.value&&e.right instanceof St&&"typeof"==e.right.operator){var o=e.right.expression;(o instanceof Qt?!o.is_declared(t):o instanceof Et&&t.option("ie8"))||(e.right=o,e.left=p(dn,e.left).optimize(t),2==e.operator.length&&(e.operator+="="))}else if(e.left instanceof Qt&&e.right instanceof Qt&&e.left.definition()===e.right.definition()&&((u=e.left.fixed_value())instanceof Ct||u instanceof Ie||u instanceof Ot||u instanceof xt))return p("="==e.operator[0]?gn:Dn,e);break;case"&&":case"||":var a=e.left;if(a.operator==e.operator&&(a=a.right),a instanceof vt&&a.operator==("&&"==e.operator?"!==":"===")&&e.right instanceof vt&&a.operator==e.right.operator&&(Fi(a.left,t)&&e.right.left instanceof pn||a.left instanceof pn&&Fi(e.right.left,t))&&!a.right.has_side_effects(t)&&a.right.equivalent_to(e.right.right)){var s=p(vt,e,{operator:a.operator.slice(0,-1),left:p(pn,e),right:a.right});return a!==e.left&&(s=p(vt,e,{operator:e.operator,left:e.left.left,right:s})),s}}var u;if("+"==e.operator&&t.in_boolean_context()){var c=e.left.evaluate(t),l=e.right.evaluate(t);if(c&&"string"==typeof c)return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),fi(e,[e.right,p(gn,e)]).optimize(t);if(l&&"string"==typeof l)return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),fi(e,[e.left,p(gn,e)]).optimize(t)}if(t.option("comparisons")&&e.is_boolean()){if(!(t.parent()instanceof vt)||t.parent()instanceof bt){var f=p(St,e,{operator:"!",expression:e.negate(t,Rn(t))});e=ki(t,e,f)}if(t.option("unsafe_comps"))switch(e.operator){case"<":i(">");break;case"<=":i(">=")}}if("+"==e.operator){if(e.right instanceof sn&&""==e.right.getValue()&&e.left.is_string(t))return e.left;if(e.left instanceof sn&&""==e.left.getValue()&&e.right.is_string(t))return e.right;if(e.left instanceof vt&&"+"==e.left.operator&&e.left.left instanceof sn&&""==e.left.left.getValue()&&e.right.is_string(t))return e.left=e.left.right,e.transform(t)}if(t.option("evaluate")){switch(e.operator){case"&&":if(!(c=!!Qn(e.left,2)||!Qn(e.left,4)&&e.left.evaluate(t)))return t.warn("Condition left of && always false [{file}:{line},{col}]",e.start),_i(t.parent(),t.self(),e.left).optimize(t);if(!(c instanceof pe))return t.warn("Condition left of && always true [{file}:{line},{col}]",e.start),fi(e,[e.left,e.right]).optimize(t);if(l=e.right.evaluate(t)){if(!(l instanceof pe)){if("&&"==(_=t.parent()).operator&&_.left===t.self()||t.in_boolean_context())return t.warn("Dropping side-effect-free && [{file}:{line},{col}]",e.start),e.left.optimize(t)}}else{if(t.in_boolean_context())return t.warn("Boolean && always false [{file}:{line},{col}]",e.start),fi(e,[e.left,p(Dn,e)]).optimize(t);ei(e,4)}if("||"==e.left.operator)if(!(d=e.left.right.evaluate(t)))return p(Tt,e,{condition:e.left.left,consequent:e.right,alternative:e.left.right}).optimize(t);break;case"||":var _,d;if(!(c=!!Qn(e.left,2)||!Qn(e.left,4)&&e.left.evaluate(t)))return t.warn("Condition left of || always false [{file}:{line},{col}]",e.start),fi(e,[e.left,e.right]).optimize(t);if(!(c instanceof pe))return t.warn("Condition left of || always true [{file}:{line},{col}]",e.start),_i(t.parent(),t.self(),e.left).optimize(t);if(l=e.right.evaluate(t)){if(!(l instanceof pe)){if(t.in_boolean_context())return t.warn("Boolean || always true [{file}:{line},{col}]",e.start),fi(e,[e.left,p(gn,e)]).optimize(t);ei(e,2)}}else if("||"==(_=t.parent()).operator&&_.left===t.self()||t.in_boolean_context())return t.warn("Dropping side-effect-free || [{file}:{line},{col}]",e.start),e.left.optimize(t);if("&&"==e.left.operator)if((d=e.left.right.evaluate(t))&&!(d instanceof pe))return p(Tt,e,{condition:e.left.left,consequent:e.left.right,alternative:e.right}).optimize(t)}var m=!0;switch(e.operator){case"+":if(e.left instanceof an&&e.right instanceof vt&&"+"==e.right.operator&&e.right.left instanceof an&&e.right.is_string(t)&&(e=p(vt,e,{operator:"+",left:p(sn,e.left,{value:""+e.left.getValue()+e.right.left.getValue(),start:e.left.start,end:e.right.left.end}),right:e.right.right})),e.right instanceof an&&e.left instanceof vt&&"+"==e.left.operator&&e.left.right instanceof an&&e.left.is_string(t)&&(e=p(vt,e,{operator:"+",left:e.left.left,right:p(sn,e.right,{value:""+e.left.right.getValue()+e.right.getValue(),start:e.left.right.start,end:e.right.end})})),e.left instanceof vt&&"+"==e.left.operator&&e.left.is_string(t)&&e.left.right instanceof an&&e.right instanceof vt&&"+"==e.right.operator&&e.right.left instanceof an&&e.right.is_string(t)&&(e=p(vt,e,{operator:"+",left:p(vt,e.left,{operator:"+",left:e.left.left,right:p(sn,e.left.right,{value:""+e.left.right.getValue()+e.right.left.getValue(),start:e.left.right.start,end:e.right.left.end})}),right:e.right.right})),e.right instanceof St&&"-"==e.right.operator&&e.left.is_number(t)){e=p(vt,e,{operator:"-",left:e.left,right:e.right.expression});break}if(e.left instanceof St&&"-"==e.left.operator&&n()&&e.right.is_number(t)){e=p(vt,e,{operator:"-",left:e.right,right:e.left.expression});break}case"*":m=t.option("unsafe_math");case"&":case"|":case"^":if(e.left.is_number(t)&&e.right.is_number(t)&&n()&&!(e.left instanceof vt&&e.left.operator!=e.operator&&se[e.left.operator]>=se[e.operator])){var E=p(vt,e,{operator:e.operator,left:e.right,right:e.left});e=e.right instanceof an&&!(e.left instanceof an)?ki(t,E,e):ki(t,e,E)}m&&e.is_number(t)&&(e.right instanceof vt&&e.right.operator==e.operator&&(e=p(vt,e,{operator:e.operator,left:p(vt,e.left,{operator:e.operator,left:e.left,right:e.right.left,start:e.left.start,end:e.right.left.end}),right:e.right.right})),e.right instanceof an&&e.left instanceof vt&&e.left.operator==e.operator&&(e.left.left instanceof an?e=p(vt,e,{operator:e.operator,left:p(vt,e.left,{operator:e.operator,left:e.left.left,right:e.right,start:e.left.left.start,end:e.right.end}),right:e.left.right}):e.left.right instanceof an&&(e=p(vt,e,{operator:e.operator,left:p(vt,e.left,{operator:e.operator,left:e.left.right,right:e.right,start:e.left.right.start,end:e.right.end}),right:e.left.left}))),e.left instanceof vt&&e.left.operator==e.operator&&e.left.right instanceof an&&e.right instanceof vt&&e.right.operator==e.operator&&e.right.left instanceof an&&(e=p(vt,e,{operator:e.operator,left:p(vt,e.left,{operator:e.operator,left:p(vt,e.left.left,{operator:e.operator,left:e.left.right,right:e.right.left,start:e.left.right.start,end:e.right.left.end}),right:e.left.left}),right:e.right.right})))}}if(e.right instanceof vt&&e.right.operator==e.operator&&(Mi.has(e.operator)||"+"==e.operator&&(e.right.left.is_string(t)||e.left.is_string(t)&&e.right.right.is_string(t))))return e.left=p(vt,e.left,{operator:e.operator,left:e.left,right:e.right.left}),e.right=e.right.right,e.transform(t);var h=e.evaluate(t);return h!==e?(h=pi(h,e).optimize(t),ki(t,h,e)):e})),ii(en,(function(e,t){return e})),ii(Qt,(function(e,t){if(!t.option("ie8")&&Si(e)&&(!e.scope.uses_with||!t.find_parent(Ne)))switch(e.name){case"undefined":return p(dn,e).optimize(t);case"NaN":return p(_n,e).optimize(t);case"Infinity":return p(En,e).optimize(t)}var n,i=t.parent();if(t.option("reduce_vars")&&Ni(e,i)!==e){const _=e.definition();if(t.top_retain&&_.global&&t.top_retain(_))return _.fixed=!1,_.should_replace=!1,_.single_use=!1,e;var r=e.fixed_value(),o=_.single_use&&!(i instanceof _t&&i.is_expr_pure(t));if(o&&(r instanceof Ie||r instanceof xt))if(Wi(r,t))o=!1;else if(_.scope!==e.scope&&(1==_.escaped||Qn(r,Yn)||function(e){for(var t,n=0;t=e.parent(n++);){if(t instanceof _e)return!1;if(t instanceof Ct||t instanceof Mt||t instanceof Ot)return!0}return!1}(t)))o=!1;else if(qi(t,_))o=!1;else if((_.scope!==e.scope||_.orig[0]instanceof Ht)&&"f"==(o=r.is_constant_expression(e.scope))){var a=e.scope;do{(a instanceof Be||ai(a))&&ei(a,Yn)}while(a=a.parent_scope)}if(o&&r instanceof Ie&&(o=_.scope===e.scope||i instanceof _t&&i.expression===e),o&&r instanceof xt&&r.extends&&(o=!r.extends.may_throw(t)&&(!(r.extends instanceof _t)||r.extends.is_expr_pure(t))),o&&r){if(r instanceof kt&&(ei(r,$n),r=p(It,r,r)),r instanceof Be&&(ei(r,$n),r=p(Ve,r,r)),_.recursive_refs>0&&r.name instanceof Xt){const e=r.name.definition();let t=r.variables.get(r.name.name),n=t&&t.orig[0];n instanceof Wt||((n=p(Wt,r.name,r.name)).scope=r,r.name=n,t=r.def_function(n)),r.walk(new vn((function(n){n instanceof Qt&&n.definition()===e&&(n.thedef=t,t.references.push(n))})))}return(r instanceof Ie||r instanceof xt)&&ci(t,!0).add_child_scope(r),r.optimize(t)}if(r&&void 0===_.should_replace){let e;if(r instanceof rn)_.orig[0]instanceof Ht||!_.references.every(e=>_.scope===e.scope)||(e=r);else{var s=r.evaluate(t);s===r||!t.option("unsafe_regexp")&&s instanceof RegExp||(e=pi(s,r))}if(e){var u,c=e.optimize(t).print_to_string().length;r.walk(new vn((function(e){if(e instanceof Qt&&(n=!0),n)return!0}))),n?u=function(){var n=e.optimize(t);return n===e?n.clone(!0):n}:(c=Math.min(c,r.print_to_string().length),u=function(){var n=wi(e.optimize(t),r);return n===e||n===r?n.clone(!0):n});var l=_.name.length,f=0;t.option("unused")&&!t.exposed(_)&&(f=(l+2+c)/(_.references.length-_.assignments)),_.should_replace=c<=l+f&&u}else _.should_replace=!1}if(_.should_replace)return _.should_replace()}return e})),ii(dn,(function(e,t){if(t.option("unsafe_undefined")){var n=li(t,"undefined");if(n){var i=p(Qt,e,{name:"undefined",scope:n.scope,thedef:n});return ei(i,Wn),i}}var r=Ni(t.self(),t.parent());return r&&$i(r,e)?e:p(St,e,{operator:"void",expression:p(un,e,{value:0})})})),ii(En,(function(e,t){var n=Ni(t.self(),t.parent());return n&&$i(n,e)?e:!t.option("keep_infinity")||n&&!$i(n,e)||li(t,"Infinity")?p(vt,e,{operator:"/",left:p(un,e,{value:1}),right:p(un,e,{value:0})}):e})),ii(_n,(function(e,t){var n=Ni(t.self(),t.parent());return n&&!$i(n,e)||li(t,"NaN")?p(vt,e,{operator:"/",left:p(un,e,{value:0}),right:p(un,e,{value:0})}):e}));const Zi=h("+ - / * % >> << >>> | ^ &"),Ji=h("* | ^ &");function Qi(e,t){return e instanceof Qt&&(e=e.fixed_value()),!!e&&(!(e instanceof Ie||e instanceof xt)||t.parent()instanceof dt||!e.contains_this())}function er(e,t){return t.in_boolean_context()?ki(t,e,fi(e,[e,p(gn,e)]).optimize(t)):e}function tr(e,t,n){for(var i=0;i0&&s.args.length==u.args.length&&s.expression.equivalent_to(u.expression)&&!e.condition.has_side_effects(t)&&!s.expression.has_side_effects(t)&&"number"==typeof(o=function(){for(var e=s.args,t=u.args,n=0,i=e.length;n1)&&(_=null)}else if(!_&&!t.option("keep_fargs")&&s=n.argnames.length;)_=p(Ht,n,{name:n.make_var_name("argument_"+n.argnames.length),scope:n}),n.argnames.push(_),n.enclosed.push(n.def_variable(_));if(_){var m=p(Qt,e,_);return m.reference({}),ti(_,zn),m}}if(Ni(e,t.parent()))return e;if(o!==r){var E=e.flatten_object(a,t);E&&(i=e.expression=E.expression,r=e.property=E.property)}if(t.option("properties")&&t.option("side_effects")&&r instanceof un&&i instanceof Ct){s=r.getValue();var h=i.elements,D=h[s];e:if(Qi(D,t)){for(var g=!0,S=[],A=h.length;--A>s;){(v=h[A].drop_side_effect_free(t))&&(S.unshift(v),g&&v.has_side_effects(t)&&(g=!1))}if(D instanceof ke)break e;for(D=D instanceof mn?p(dn,D):D,g||S.unshift(D);--A>=0;){var v;if((v=h[A])instanceof ke)break e;(v=v.drop_side_effect_free(t))?S.unshift(v):s--}return g?(S.push(D),fi(e,S).optimize(t)):p(Dt,e,{expression:p(Ct,i,{elements:S}),property:p(un,r,{value:s})})}}var T=e.evaluate(t);return T!==e?ki(t,T=pi(T,e).optimize(t),e):e})),Ie.DEFMETHOD("contains_this",(function(){var e,t=this;return t.walk(new vn((function(n){return!!e||(n instanceof rn?e=!0:n!==t&&n instanceof we&&!(n instanceof Pe)||void 0)}))),e})),Et.DEFMETHOD("flatten_object",(function(e,t){if(t.option("properties")){var n=t.option("unsafe_arrows")&&t.option("ecma")>=2015,i=this.expression;if(i instanceof Ot)for(var r=i.properties,o=r.length;--o>=0;){var a=r[o];if(""+(a instanceof wt?a.key.name:a.key)==e){if(!r.every(e=>e instanceof Mt||n&&e instanceof wt&&!e.is_generator))break;if(!Qi(a.value,t))break;return p(Dt,this,{expression:p(Ct,i,{elements:r.map((function(e){var t=e.value;t instanceof Le&&(t=p(Ve,t,t));var n=e.key;return n instanceof pe&&!(n instanceof zt)?fi(e,[n,t]):t}))}),property:p(un,this,{value:o})})}}}})),ii(ht,(function(e,t){if("arguments"!=e.property&&"caller"!=e.property||t.warn("Function.prototype.{prop} not supported [{file}:{line},{col}]",{prop:e.property,file:e.start.file,line:e.start.line,col:e.start.col}),Ni(e,t.parent()))return e;if(t.option("unsafe_proto")&&e.expression instanceof ht&&"prototype"==e.expression.property){var n=e.expression.expression;if(Si(n))switch(n.name){case"Array":e.expression=p(Ct,e.expression,{elements:[]});break;case"Function":e.expression=p(Ve,e.expression,{argnames:[],body:[]});break;case"Number":e.expression=p(un,e.expression,{value:0});break;case"Object":e.expression=p(Ot,e.expression,{properties:[]});break;case"RegExp":e.expression=p(ln,e.expression,{value:{source:"t",flags:""}});break;case"String":e.expression=p(sn,e.expression,{value:""})}}var i=e.flatten_object(e.property,t);if(i)return i.optimize(t);var r=e.evaluate(t);return r!==e?ki(t,r=pi(r,e).optimize(t),e):e})),ii(Ct,(function(e,t){var n=er(e,t);return n!==e?n:tr(e,0,e.elements)})),ii(Ot,(function(e,t){var n=er(e,t);if(n!==e)return n;for(var i=e.properties,r=0;r=2015&&!e.name&&!e.is_generator&&!e.uses_arguments&&!e.pinned()){var n=!1;if(e.walk(new vn((function(e){return!!n||(e instanceof rn?(n=!0,!0):void 0)}))),!n)return p(Pe,e,e).optimize(t)}return e})),ii(xt,(function(e,t){return e})),ii(An,(function(e,t){return e.expression&&!e.is_star&&Fi(e.expression,t)&&(e.expression=null),e})),ii(Ge,(function(e,t){if(!t.option("evaluate")||t.parent()instanceof Ue)return e;for(var n=[],i=0;i=2015&&(!(n instanceof RegExp)||n.test(e.key+""))){var i=e.key,r=e.value;if((r instanceof Pe&&Array.isArray(r.body)&&!r.contains_this()||r instanceof Ve)&&!r.name)return p(wt,e,{async:r.async,is_generator:r.is_generator,key:i instanceof pe?i:p(zt,e,{name:i}),value:p(Le,r,r),quote:e.quote})}return e})),ii(Ke,(function(e,t){if(1==t.option("pure_getters")&&t.option("unused")&&!e.is_array&&Array.isArray(e.names)&&!function(e){for(var t=[/^VarDef$/,/^(Const|Let|Var)$/,/^Export$/],n=0,i=0,r=t.length;n1)throw new Error("inline source map only works with singular input");n.sourceMap.content=(i=e[f],r=void 0,(r=/(?:^|[^.])\/\/# sourceMappingURL=data:application\/json(;[\w=-]*)?;base64,([+/0-9A-Za-z]*=*)\s*$/.exec(i))?sr(r[2]):(pe.warn("inline source map not found"),null))}c=n.parse.toplevel}s&&"strict"!==n.mangle.properties.keep_quoted&&rr(c,s),n.wrap&&(c=c.wrap_commonjs(n.wrap)),n.enclose&&(c=c.wrap_enclose(n.enclose)),u&&(u.rename=Date.now()),u&&(u.compress=Date.now()),n.compress&&(c=new ni(n.compress).compress(c)),u&&(u.scope=Date.now()),n.mangle&&c.figure_out_scope(n.mangle),u&&(u.mangle=Date.now()),n.mangle&&(Xn.reset(),c.compute_char_frequency(n.mangle),c.mangle_names(n.mangle)),u&&(u.properties=Date.now()),n.mangle&&n.mangle.properties&&(c=ar(c,n.mangle.properties)),u&&(u.output=Date.now());var p={};if(n.output.ast&&(p.ast=c),!g(n.output,"code")||n.output.code){if(n.sourceMap&&("string"==typeof n.sourceMap.content&&(n.sourceMap.content=JSON.parse(n.sourceMap.content)),n.output.source_map=function(e){e=o(e,{file:null,root:null,orig:null,orig_line_diff:0,dest_line_diff:0});var n=new t.SourceMapGenerator({file:e.file,sourceRoot:e.root}),i=e.orig&&new t.SourceMapConsumer(e.orig);return i&&i.sources.forEach((function(e){var t=i.sourceContentFor(e,!0);t&&n.setSourceContent(e,t)})),{add:function(t,r,o,a,s,u){if(i){var c=i.originalPositionFor({line:a,column:s});if(null===c.source)return;t=c.source,a=c.line,s=c.column,u=c.name||u}n.addMapping({generated:{line:r+e.dest_line_diff,column:o},original:{line:a+e.orig_line_diff,column:s},source:t,name:u})},get:function(){return n},toString:function(){return JSON.stringify(n.toJSON())}}}({file:n.sourceMap.filename,orig:n.sourceMap.content,root:n.sourceMap.root}),n.sourceMap.includeSources)){if(e instanceof xe)throw new Error("original source content unavailable");for(var f in e)g(e,f)&&n.output.source_map.get().setSourceContent(f,e[f])}delete n.output.ast,delete n.output.code;var _=Ln(n.output);if(c.print(_),p.code=_.get(),n.sourceMap)if(n.sourceMap.asObject?p.map=n.output.source_map.get().toJSON():p.map=n.output.source_map.toString(),"inline"==n.sourceMap.url){var d="object"==typeof p.map?JSON.stringify(p.map):p.map;p.code+="\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+ur(d)}else n.sourceMap.url&&(p.code+="\n//# sourceMappingURL="+n.sourceMap.url)}return n.nameCache&&n.mangle&&(n.mangle.cache&&(n.nameCache.vars=fr(n.mangle.cache)),n.mangle.properties&&n.mangle.properties.cache&&(n.nameCache.props=fr(n.mangle.properties.cache))),u&&(u.end=Date.now(),p.timings={parse:.001*(u.rename-u.parse),rename:.001*(u.compress-u.rename),compress:.001*(u.scope-u.compress),scope:.001*(u.mangle-u.scope),mangle:.001*(u.properties-u.mangle),properties:.001*(u.output-u.properties),output:.001*(u.end-u.output),total:.001*(u.end-u.start)}),l.length&&(p.warnings=l),p}catch(e){return{error:e}}finally{pe.warn_function=a}}function _r(e){var t=pr("",e);return t.error&&t.error.defs}!function(){var e=function(e){for(var t=!0,n=0;n2){var n=a[a.length-2];"FunctionDeclaration"!==n.type&&"FunctionExpression"!==n.type&&"ArrowFunctionExpression"!==n.type||(t=yt)}return new t({start:i(e),end:r(e),left:s(e.left),operator:"=",right:s(e.right)})},SpreadElement:function(e){return new ke({start:i(e),end:r(e),expression:s(e.argument)})},RestElement:function(e){return new ke({start:i(e),end:r(e),expression:s(e.argument)})},TemplateElement:function(e){return new He({start:i(e),end:r(e),value:e.value.cooked,raw:e.value.raw})},TemplateLiteral:function(e){for(var t=[],n=0;n1||e.guardedHandlers&&e.guardedHandlers.length)throw new Error("Multiple catch clauses are not supported.");return new nt({start:i(e),end:r(e),body:s(e.block).body,bcatch:s(t[0]),bfinally:e.finalizer?new rt(s(e.finalizer)):null})},Property:function(e){var t=e.key,n={start:i(t||e.value),end:r(e.value),key:"Identifier"==t.type?t.name:t.value,value:s(e.value)};return e.computed&&(n.key=s(e.key)),e.method?(n.is_generator=e.value.generator,n.async=e.value.async,e.computed?n.key=s(e.key):n.key=new zt({name:n.key}),new wt(n)):"init"==e.kind?("Identifier"!=t.type&&"Literal"!=t.type&&(n.key=s(t)),new Mt(n)):("string"!=typeof n.key&&"number"!=typeof n.key||(n.key=new zt({name:n.key})),n.value=new Le(n.value),"get"==e.kind?new Nt(n):"set"==e.kind?new Rt(n):"method"==e.kind?(n.async=e.value.async,n.is_generator=e.value.generator,n.quote=e.computed?'"':null,new wt(n)):void 0)},MethodDefinition:function(e){var t={start:i(e),end:r(e),key:e.computed?s(e.key):new zt({name:e.key.name||e.key.value}),value:s(e.value),static:e.static};return"get"==e.kind?new Nt(t):"set"==e.kind?new Rt(t):(t.is_generator=e.value.generator,t.async=e.value.async,new wt(t))},ArrayExpression:function(e){return new Ct({start:i(e),end:r(e),elements:e.elements.map((function(e){return null===e?new mn:s(e)}))})},ObjectExpression:function(e){return new Ot({start:i(e),end:r(e),properties:e.properties.map((function(e){return"SpreadElement"===e.type?s(e):(e.type="Property",s(e))}))})},SequenceExpression:function(e){return new mt({start:i(e),end:r(e),expressions:e.expressions.map(s)})},MemberExpression:function(e){return new(e.computed?Dt:ht)({start:i(e),end:r(e),property:e.computed?s(e.property):e.property.name,expression:s(e.object)})},SwitchCase:function(e){return new(e.test?tt:et)({start:i(e),end:r(e),expression:s(e.test),body:e.consequent.map(s)})},VariableDeclaration:function(e){return new("const"===e.kind?ut:"let"===e.kind?st:at)({start:i(e),end:r(e),definitions:e.declarations.map(s)})},ImportDeclaration:function(e){var t=null,n=null;return e.specifiers.forEach((function(e){"ImportSpecifier"===e.type?(n||(n=[]),n.push(new ct({start:i(e),end:r(e),foreign_name:s(e.imported),name:s(e.local)}))):"ImportDefaultSpecifier"===e.type?t=s(e.local):"ImportNamespaceSpecifier"===e.type&&(n||(n=[]),n.push(new ct({start:i(e),end:r(e),foreign_name:new Zt({name:"*"}),name:s(e.local)})))})),new lt({start:i(e),end:r(e),imported_name:t,imported_names:n,module_name:s(e.source)})},ExportAllDeclaration:function(e){return new ft({start:i(e),end:r(e),exported_names:[new ct({name:new tn({name:"*"}),foreign_name:new tn({name:"*"})})],module_name:s(e.source)})},ExportNamedDeclaration:function(e){return new ft({start:i(e),end:r(e),exported_definition:s(e.declaration),exported_names:e.specifiers&&e.specifiers.length?e.specifiers.map((function(e){return new ct({foreign_name:s(e.exported),name:s(e.local)})})):null,module_name:s(e.source)})},ExportDefaultDeclaration:function(e){return new ft({start:i(e),end:r(e),exported_value:s(e.declaration),is_default:!0})},Literal:function(e){var t=e.value,n={start:i(e),end:r(e)},o=e.regex;if(o&&o.pattern)return n.value={source:o.pattern,flags:o.flags},new ln(n);if(o){const i=e.raw||t,r=i.match(/^\/(.*)\/(\w*)$/);if(!r)throw new Error("Invalid regex source "+i);const[o,a,s]=r;return n.value={source:a,flags:s},new ln(n)}if(null===t)return new pn(n);switch(typeof t){case"string":return n.value=t,new sn(n);case"number":return n.value=t,new un(n);case"boolean":return new(t?gn:Dn)(n)}},MetaProperty:function(e){if("new"===e.meta.name&&"target"===e.property.name)return new Vt({start:i(e),end:r(e)})},Identifier:function(e){var t=a[a.length-2];return new("LabeledStatement"==t.type?Jt:"VariableDeclarator"==t.type&&t.id===e?"const"==t.kind?Ut:"let"==t.kind?Gt:Bt:/Import.*Specifier/.test(t.type)?t.local===e?jt:Zt:"ExportSpecifier"==t.type?t.local===e?en:tn:"FunctionExpression"==t.type?t.id===e?Wt:Ht:"FunctionDeclaration"==t.type?t.id===e?Xt:Ht:"ArrowFunctionExpression"==t.type?t.params.includes(e)?Ht:Qt:"ClassExpression"==t.type?t.id===e?qt:Qt:"Property"==t.type?t.key===e&&t.computed||t.value===e?Qt:zt:"ClassDeclaration"==t.type?t.id===e?Yt:Qt:"MethodDefinition"==t.type?t.computed?Qt:zt:"CatchClause"==t.type?$t:"BreakStatement"==t.type||"ContinueStatement"==t.type?nn:Qt)({start:i(e),end:r(e),name:e.name})},BigIntLiteral:e=>new cn({start:i(e),end:r(e),value:e.value})};function n(e){if("Literal"==e.type)return null!=e.raw?e.raw:e.value+""}function i(e){var t=e.loc,i=t&&t.start,r=e.range;return new fe({file:t&&t.source,line:i&&i.line,col:i&&i.column,pos:r?r[0]:e.start,endline:i&&i.line,endcol:i&&i.column,endpos:r?r[0]:e.start,raw:n(e)})}function r(e){var t=e.loc,i=t&&t.end,r=e.range;return new fe({file:t&&t.source,line:i&&i.line,col:i&&i.column,pos:r?r[1]:e.end,endline:i&&i.line,endcol:i&&i.column,endpos:r?r[1]:e.end,raw:n(e)})}function o(e,n,o){var a="function From_Moz_"+e+"(M){\n";a+="return new U2."+n.name+"({\nstart: my_start_token(M),\nend: my_end_token(M)";var c="function To_Moz_"+e+"(M){\n";c+="return {\ntype: "+JSON.stringify(e),o&&o.split(/\s*,\s*/).forEach((function(e){var t=/([a-z0-9$_]+)([=@>%])([a-z0-9$_]+)/i.exec(e);if(!t)throw new Error("Can't understand property map: "+e);var n=t[1],i=t[2],r=t[3];switch(a+=",\n"+r+": ",c+=",\n"+n+": ",i){case"@":a+="M."+n+".map(from_moz)",c+="M."+r+".map(to_moz)";break;case">":a+="from_moz(M."+n+")",c+="to_moz(M."+r+")";break;case"=":a+="M."+n,c+="M."+r;break;case"%":a+="from_moz(M."+n+").body",c+="to_moz_block(M)";break;default:throw new Error("Can't understand operator in propmap: "+e)}})),a+="\n})\n}",c+="\n}\n}",a=new Function("U2","my_start_token","my_end_token","from_moz","return("+a+")")(On,i,r,s),c=new Function("to_moz","to_moz_block","to_moz_scope","return("+c+")")(l,_,d),t[e]=a,u(n,c)}t.UpdateExpression=t.UnaryExpression=function(e){return new(("prefix"in e?e.prefix:"UnaryExpression"==e.type)?St:At)({start:i(e),end:r(e),operator:e.operator,expression:s(e.argument)})},t.ClassDeclaration=t.ClassExpression=function(e){return new("ClassDeclaration"===e.type?kt:It)({start:i(e),end:r(e),name:s(e.id),extends:s(e.superClass),properties:e.body.body.map(s)})},o("EmptyStatement",Ae),o("BlockStatement",Se,"body@body"),o("IfStatement",Ze,"test>condition, consequent>body, alternate>alternative"),o("LabeledStatement",Te,"label>label, body>body"),o("BreakStatement",$e,"label>label"),o("ContinueStatement",je,"label>label"),o("WithStatement",Ne,"object>expression, body>body"),o("SwitchStatement",Je,"discriminant>expression, cases@body"),o("ReturnStatement",We,"argument>value"),o("ThrowStatement",Ye,"argument>value"),o("WhileStatement",Oe,"test>condition, body>body"),o("DoWhileStatement",Ce,"test>condition, body>body"),o("ForStatement",Fe,"init>init, test>condition, update>step, body>body"),o("ForInStatement",Me,"left>init, right>object, body>body"),o("ForOfStatement",Re,"left>init, right>object, body>body, await=await"),o("AwaitExpression",Sn,"argument>expression"),o("YieldExpression",An,"argument>expression, delegate=is_star"),o("DebuggerStatement",de),o("VariableDeclarator",pt,"id>name, init>value"),o("CatchClause",it,"param>argname, body%body"),o("ThisExpression",rn),o("Super",on),o("BinaryExpression",vt,"operator=operator, left>left, right>right"),o("LogicalExpression",vt,"operator=operator, left>left, right>right"),o("AssignmentExpression",bt,"operator=operator, left>left, right>right"),o("ConditionalExpression",Tt,"test>condition, consequent>consequent, alternate>alternative"),o("NewExpression",dt,"callee>expression, arguments@args"),o("CallExpression",_t,"callee>expression, arguments@args"),u(xe,(function(e){return d("Program",e)})),u(ke,(function(e,t){return{type:f()?"RestElement":"SpreadElement",argument:l(e.expression)}})),u(Ue,(function(e){return{type:"TaggedTemplateExpression",tag:l(e.prefix),quasi:l(e.template_string)}})),u(Ge,(function(e){for(var t=[],n=[],i=0;i({type:"BigIntLiteral",value:e.value})),hn.DEFMETHOD("to_mozilla_ast",an.prototype.to_mozilla_ast),pn.DEFMETHOD("to_mozilla_ast",an.prototype.to_mozilla_ast),mn.DEFMETHOD("to_mozilla_ast",(function(){return null})),ge.DEFMETHOD("to_mozilla_ast",Se.prototype.to_mozilla_ast),Ie.DEFMETHOD("to_mozilla_ast",Ve.prototype.to_mozilla_ast);var a=null;function s(e){a.push(e);var n=null!=e?t[e.type](e):null;return a.pop(),n}function u(e,t){e.DEFMETHOD("to_mozilla_ast",(function(e){return n=this,i=t(this,e),r=n.start,o=n.end,r&&o?(null!=r.pos&&null!=o.endpos&&(i.range=[r.pos,o.endpos]),r.line&&(i.loc={start:{line:r.line,column:r.col},end:o.endline?{line:o.endline,column:o.endcol}:null},r.file&&(i.loc.source=r.file)),i):i;var n,i,r,o}))}pe.from_mozilla_ast=function(e){var t=a;a=[];var n=s(e);return a=t,n};var c=null;function l(e){null===c&&(c=[]),c.push(e);var t=null!=e?e.to_mozilla_ast(c[c.length-2]):null;return c.pop(),0===c.length&&(c=null),t}function f(){for(var e=c.length;e--;)if(c[e]instanceof Ke)return!0;return!1}function _(e){return{type:"BlockStatement",body:e.body.map(l)}}function d(e,t){var n=t.body.map(l);return t.body[0]instanceof Ee&&t.body[0].body instanceof sn&&n.unshift(l(new Ae(t.body[0]))),{type:e,body:n}}}(),e.AST_Accessor=Le,e.AST_Array=Ct,e.AST_Arrow=Pe,e.AST_Assign=bt,e.AST_Atom=fn,e.AST_Await=Sn,e.AST_Binary=vt,e.AST_Block=ge,e.AST_BlockStatement=Se,e.AST_Boolean=hn,e.AST_Break=$e,e.AST_Call=_t,e.AST_Case=tt,e.AST_Catch=it,e.AST_Class=xt,e.AST_ClassExpression=It,e.AST_ConciseMethod=wt,e.AST_Conditional=Tt,e.AST_Const=ut,e.AST_Constant=an,e.AST_Continue=je,e.AST_DWLoop=ye,e.AST_Debugger=de,e.AST_DefClass=kt,e.AST_Default=et,e.AST_DefaultAssign=yt,e.AST_Definitions=ot,e.AST_Defun=Be,e.AST_Destructuring=Ke,e.AST_Directive=me,e.AST_Do=Ce,e.AST_Dot=ht,e.AST_EmptyStatement=Ae,e.AST_Exit=ze,e.AST_Expansion=ke,e.AST_Export=ft,e.AST_False=Dn,e.AST_Finally=rt,e.AST_For=Fe,e.AST_ForIn=Me,e.AST_ForOf=Re,e.AST_Function=Ve,e.AST_Hole=mn,e.AST_If=Ze,e.AST_Import=lt,e.AST_Infinity=En,e.AST_IterationStatement=be,e.AST_Jump=Xe,e.AST_Label=Jt,e.AST_LabelRef=nn,e.AST_LabeledStatement=Te,e.AST_Lambda=Ie,e.AST_Let=st,e.AST_LoopControl=qe,e.AST_NaN=_n,e.AST_NameMapping=ct,e.AST_New=dt,e.AST_NewTarget=Vt,e.AST_Node=pe,e.AST_Null=pn,e.AST_Number=un,e.AST_Object=Ot,e.AST_ObjectGetter=Nt,e.AST_ObjectKeyVal=Mt,e.AST_ObjectProperty=Ft,e.AST_ObjectSetter=Rt,e.AST_PrefixedTemplateString=Ue,e.AST_PropAccess=Et,e.AST_RegExp=ln,e.AST_Return=We,e.AST_Scope=we,e.AST_Sequence=mt,e.AST_SimpleStatement=Ee,e.AST_Statement=_e,e.AST_StatementWithBody=ve,e.AST_String=sn,e.AST_Sub=Dt,e.AST_Super=on,e.AST_Switch=Je,e.AST_SwitchBranch=Qe,e.AST_Symbol=Lt,e.AST_SymbolBlockDeclaration=Kt,e.AST_SymbolCatch=$t,e.AST_SymbolClass=qt,e.AST_SymbolConst=Ut,e.AST_SymbolDeclaration=Pt,e.AST_SymbolDefClass=Yt,e.AST_SymbolDefun=Xt,e.AST_SymbolExport=en,e.AST_SymbolExportForeign=tn,e.AST_SymbolFunarg=Ht,e.AST_SymbolImport=jt,e.AST_SymbolImportForeign=Zt,e.AST_SymbolLambda=Wt,e.AST_SymbolLet=Gt,e.AST_SymbolMethod=zt,e.AST_SymbolRef=Qt,e.AST_SymbolVar=Bt,e.AST_TemplateSegment=He,e.AST_TemplateString=Ge,e.AST_This=rn,e.AST_Throw=Ye,e.AST_Token=fe,e.AST_Toplevel=xe,e.AST_True=gn,e.AST_Try=nt,e.AST_Unary=gt,e.AST_UnaryPostfix=At,e.AST_UnaryPrefix=St,e.AST_Undefined=dn,e.AST_Var=at,e.AST_VarDef=pt,e.AST_While=Oe,e.AST_With=Ne,e.AST_Yield=An,e.Compressor=ni,e.OutputStream=Ln,e.TreeTransformer=Tn,e.TreeWalker=vn,e._INLINE=yn,e._JS_Parse_Error=Q,e._NOINLINE=Cn,e._PURE=bn,e._has_annotation=b,e._tokenizer=ie,e.base54=Xn,e.default_options=function(){const e={};return Object.keys(_r({0:0})).forEach(t=>{const n=_r({[t]:{0:0}});n&&(e[t]=n)}),e},e.defaults=o,e.mangle_properties=ar,e.minify=pr,e.parse=ce,e.push_uniq=_,e.reserve_quoted_keys=rr,e.string_template=d,e.to_ascii=sr})); +//# sourceMappingURL=bundle.min.js.map diff --git a/public/node_modules/_terser@4.5.1@terser/dist/bundle.min.js.map b/public/node_modules/_terser@4.5.1@terser/dist/bundle.min.js.map new file mode 100644 index 000000000..7917570ab --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/dist/bundle.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.min.js","sources":["../lib/utils/index.js","../lib/parse.js","../lib/ast.js","../lib/transform.js","../lib/utils/first_in_statement.js","../lib/output.js","../lib/scope.js","../lib/compress/index.js","../tools/domprops.js","../lib/propmangle.js","../lib/minify.js","../lib/sourcemap.js","../tools/node.js","../lib/mozilla-ast.js"],"sourcesContent":["/***********************************************************************\n\n A JavaScript tokenizer / parser / beautifier / compressor.\n https://github.com/mishoo/UglifyJS2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Mihai Bazon\n \n http://mihai.bazon.net/blog\n\n Distributed under the BSD license:\n\n Copyright 2012 (c) Mihai Bazon \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n ***********************************************************************/\n\n\"use strict\";\n\nfunction characters(str) {\n return str.split(\"\");\n}\n\nfunction member(name, array) {\n return array.includes(name);\n}\n\nclass DefaultsError extends Error {\n constructor(msg, defs) {\n super();\n\n this.name = \"DefaultsError\";\n this.message = msg;\n this.defs = defs;\n }\n}\n\nfunction defaults(args, defs, croak) {\n if (args === true)\n args = {};\n const ret = args || {};\n if (croak) for (const i in ret) if (HOP(ret, i) && !HOP(defs, i))\n throw new DefaultsError(\"`\" + i + \"` is not a supported option\", defs);\n for (const i in defs) if (HOP(defs, i)) {\n if (!args || !HOP(args, i)) {\n ret[i] = defs[i];\n } else if (i === \"ecma\") {\n let ecma = args[i] | 0;\n if (ecma > 5 && ecma < 2015) ecma += 2009;\n ret[i] = ecma;\n } else {\n ret[i] = (args && HOP(args, i)) ? args[i] : defs[i];\n }\n }\n return ret;\n}\n\nfunction noop() {}\nfunction return_false() { return false; }\nfunction return_true() { return true; }\nfunction return_this() { return this; }\nfunction return_null() { return null; }\n\nvar MAP = (function() {\n function MAP(a, f, backwards) {\n var ret = [], top = [], i;\n function doit() {\n var val = f(a[i], i);\n var is_last = val instanceof Last;\n if (is_last) val = val.v;\n if (val instanceof AtTop) {\n val = val.v;\n if (val instanceof Splice) {\n top.push.apply(top, backwards ? val.v.slice().reverse() : val.v);\n } else {\n top.push(val);\n }\n } else if (val !== skip) {\n if (val instanceof Splice) {\n ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v);\n } else {\n ret.push(val);\n }\n }\n return is_last;\n }\n if (Array.isArray(a)) {\n if (backwards) {\n for (i = a.length; --i >= 0;) if (doit()) break;\n ret.reverse();\n top.reverse();\n } else {\n for (i = 0; i < a.length; ++i) if (doit()) break;\n }\n } else {\n for (i in a) if (HOP(a, i)) if (doit()) break;\n }\n return top.concat(ret);\n }\n MAP.at_top = function(val) { return new AtTop(val); };\n MAP.splice = function(val) { return new Splice(val); };\n MAP.last = function(val) { return new Last(val); };\n var skip = MAP.skip = {};\n function AtTop(val) { this.v = val; }\n function Splice(val) { this.v = val; }\n function Last(val) { this.v = val; }\n return MAP;\n})();\n\nfunction make_node(ctor, orig, props) {\n if (!props) props = {};\n if (orig) {\n if (!props.start) props.start = orig.start;\n if (!props.end) props.end = orig.end;\n }\n return new ctor(props);\n}\n\nfunction push_uniq(array, el) {\n if (!array.includes(el))\n array.push(el);\n}\n\nfunction string_template(text, props) {\n return text.replace(/{(.+?)}/g, function(str, p) {\n return props && props[p];\n });\n}\n\nfunction remove(array, el) {\n for (var i = array.length; --i >= 0;) {\n if (array[i] === el) array.splice(i, 1);\n }\n}\n\nfunction mergeSort(array, cmp) {\n if (array.length < 2) return array.slice();\n function merge(a, b) {\n var r = [], ai = 0, bi = 0, i = 0;\n while (ai < a.length && bi < b.length) {\n cmp(a[ai], b[bi]) <= 0\n ? r[i++] = a[ai++]\n : r[i++] = b[bi++];\n }\n if (ai < a.length) r.push.apply(r, a.slice(ai));\n if (bi < b.length) r.push.apply(r, b.slice(bi));\n return r;\n }\n function _ms(a) {\n if (a.length <= 1)\n return a;\n var m = Math.floor(a.length / 2), left = a.slice(0, m), right = a.slice(m);\n left = _ms(left);\n right = _ms(right);\n return merge(left, right);\n }\n return _ms(array);\n}\n\nfunction makePredicate(words) {\n if (!Array.isArray(words)) words = words.split(\" \");\n\n return new Set(words);\n}\n\nfunction map_add(map, key, value) {\n if (map.has(key)) {\n map.get(key).push(value);\n } else {\n map.set(key, [ value ]);\n }\n}\n\nfunction map_from_object(obj) {\n var map = new Map();\n for (var key in obj) {\n if (HOP(obj, key) && key.charAt(0) === \"$\") {\n map.set(key.substr(1), obj[key]);\n }\n }\n return map;\n}\n\nfunction map_to_object(map) {\n var obj = Object.create(null);\n map.forEach(function (value, key) {\n obj[\"$\" + key] = value;\n });\n return obj;\n}\n\nfunction HOP(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nfunction keep_name(keep_setting, name) {\n return keep_setting === true\n || (keep_setting instanceof RegExp && keep_setting.test(name));\n}\n\nvar lineTerminatorEscape = {\n \"\\n\": \"n\",\n \"\\r\": \"r\",\n \"\\u2028\": \"u2028\",\n \"\\u2029\": \"u2029\",\n};\nfunction regexp_source_fix(source) {\n // V8 does not escape line terminators in regexp patterns in node 12\n return source.replace(/[\\n\\r\\u2028\\u2029]/g, function (match, offset) {\n var escaped = source[offset - 1] == \"\\\\\"\n && (source[offset - 2] != \"\\\\\"\n || /(?:^|[^\\\\])(?:\\\\{2})*$/.test(source.slice(0, offset - 1)));\n return (escaped ? \"\" : \"\\\\\") + lineTerminatorEscape[match];\n });\n}\nconst all_flags = \"gimuy\";\nfunction sort_regexp_flags(flags) {\n const existing_flags = new Set(flags.split(\"\"));\n let out = \"\";\n for (const flag of all_flags) {\n if (existing_flags.has(flag)) {\n out += flag;\n existing_flags.delete(flag);\n }\n }\n if (existing_flags.size) {\n // Flags Terser doesn't know about\n existing_flags.forEach(flag => { out += flag; });\n }\n return out;\n}\n\nfunction has_annotation(node, annotation) {\n return node._annotations & annotation;\n}\n\nfunction set_annotation(node, annotation) {\n node._annotations |= annotation;\n}\n\nexport {\n characters,\n defaults,\n HOP,\n keep_name,\n make_node,\n makePredicate,\n map_add,\n map_from_object,\n map_to_object,\n MAP,\n member,\n mergeSort,\n noop,\n push_uniq,\n regexp_source_fix,\n remove,\n return_false,\n return_null,\n return_this,\n return_true,\n sort_regexp_flags,\n string_template,\n has_annotation,\n set_annotation\n};\n","/***********************************************************************\n\n A JavaScript tokenizer / parser / beautifier / compressor.\n https://github.com/mishoo/UglifyJS2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Mihai Bazon\n \n http://mihai.bazon.net/blog\n\n Distributed under the BSD license:\n\n Copyright 2012 (c) Mihai Bazon \n Parser based on parse-js (http://marijn.haverbeke.nl/parse-js/).\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n ***********************************************************************/\n\n\"use strict\";\n\nimport {\n characters,\n defaults,\n HOP,\n makePredicate,\n set_annotation,\n} from \"./utils/index.js\";\nimport {\n AST_Accessor,\n AST_Array,\n AST_Arrow,\n AST_Assign,\n AST_Await,\n AST_BigInt,\n AST_Binary,\n AST_BlockStatement,\n AST_Break,\n AST_Call,\n AST_Case,\n AST_Catch,\n AST_ClassExpression,\n AST_ConciseMethod,\n AST_Conditional,\n AST_Const,\n AST_Continue,\n AST_Debugger,\n AST_Default,\n AST_DefaultAssign,\n AST_DefClass,\n AST_Definitions,\n AST_Defun,\n AST_Destructuring,\n AST_Directive,\n AST_Do,\n AST_Dot,\n AST_EmptyStatement,\n AST_Expansion,\n AST_Export,\n AST_False,\n AST_Finally,\n AST_For,\n AST_ForIn,\n AST_ForOf,\n AST_Function,\n AST_Hole,\n AST_If,\n AST_Import,\n AST_IterationStatement,\n AST_Label,\n AST_LabeledStatement,\n AST_LabelRef,\n AST_Lambda,\n AST_Let,\n AST_NameMapping,\n AST_New,\n AST_NewTarget,\n AST_Node,\n AST_Null,\n AST_Number,\n AST_Object,\n AST_ObjectGetter,\n AST_ObjectKeyVal,\n AST_ObjectProperty,\n AST_ObjectSetter,\n AST_PrefixedTemplateString,\n AST_PropAccess,\n AST_RegExp,\n AST_Return,\n AST_Sequence,\n AST_SimpleStatement,\n AST_String,\n AST_Sub,\n AST_Super,\n AST_Switch,\n AST_SymbolCatch,\n AST_SymbolClass,\n AST_SymbolConst,\n AST_SymbolDeclaration,\n AST_SymbolDefClass,\n AST_SymbolDefun,\n AST_SymbolExport,\n AST_SymbolExportForeign,\n AST_SymbolFunarg,\n AST_SymbolImport,\n AST_SymbolImportForeign,\n AST_SymbolLambda,\n AST_SymbolLet,\n AST_SymbolMethod,\n AST_SymbolRef,\n AST_SymbolVar,\n AST_TemplateSegment,\n AST_TemplateString,\n AST_This,\n AST_Throw,\n AST_Token,\n AST_Toplevel,\n AST_True,\n AST_Try,\n AST_UnaryPostfix,\n AST_UnaryPrefix,\n AST_Var,\n AST_VarDef,\n AST_While,\n AST_With,\n AST_Yield,\n _INLINE,\n _NOINLINE,\n _PURE\n} from \"./ast.js\";\n\nvar KEYWORDS = \"break case catch class const continue debugger default delete do else export extends finally for function if in instanceof let new return switch throw try typeof var void while with\";\nvar KEYWORDS_ATOM = \"false null true\";\nvar RESERVED_WORDS = \"enum implements import interface package private protected public static super this \" + KEYWORDS_ATOM + \" \" + KEYWORDS;\nvar KEYWORDS_BEFORE_EXPRESSION = \"return new delete throw else case yield await\";\n\nKEYWORDS = makePredicate(KEYWORDS);\nRESERVED_WORDS = makePredicate(RESERVED_WORDS);\nKEYWORDS_BEFORE_EXPRESSION = makePredicate(KEYWORDS_BEFORE_EXPRESSION);\nKEYWORDS_ATOM = makePredicate(KEYWORDS_ATOM);\n\nvar OPERATOR_CHARS = makePredicate(characters(\"+-*&%=<>!?|~^\"));\n\nvar RE_NUM_LITERAL = /[0-9a-f]/i;\nvar RE_HEX_NUMBER = /^0x[0-9a-f]+$/i;\nvar RE_OCT_NUMBER = /^0[0-7]+$/;\nvar RE_ES6_OCT_NUMBER = /^0o[0-7]+$/i;\nvar RE_BIN_NUMBER = /^0b[01]+$/i;\nvar RE_DEC_NUMBER = /^\\d*\\.?\\d*(?:e[+-]?\\d*(?:\\d\\.?|\\.?\\d)\\d*)?$/i;\nvar RE_BIG_INT = /^(0[xob])?[0-9a-f]+n$/i;\n\nvar OPERATORS = makePredicate([\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"new\",\n \"void\",\n \"delete\",\n \"++\",\n \"--\",\n \"+\",\n \"-\",\n \"!\",\n \"~\",\n \"&\",\n \"|\",\n \"^\",\n \"*\",\n \"**\",\n \"/\",\n \"%\",\n \">>\",\n \"<<\",\n \">>>\",\n \"<\",\n \">\",\n \"<=\",\n \">=\",\n \"==\",\n \"===\",\n \"!=\",\n \"!==\",\n \"?\",\n \"=\",\n \"+=\",\n \"-=\",\n \"/=\",\n \"*=\",\n \"**=\",\n \"%=\",\n \">>=\",\n \"<<=\",\n \">>>=\",\n \"|=\",\n \"^=\",\n \"&=\",\n \"&&\",\n \"||\"\n]);\n\nvar WHITESPACE_CHARS = makePredicate(characters(\" \\u00a0\\n\\r\\t\\f\\u000b\\u200b\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\uFEFF\"));\n\nvar NEWLINE_CHARS = makePredicate(characters(\"\\n\\r\\u2028\\u2029\"));\n\nvar PUNC_AFTER_EXPRESSION = makePredicate(characters(\";]),:\"));\n\nvar PUNC_BEFORE_EXPRESSION = makePredicate(characters(\"[{(,;:\"));\n\nvar PUNC_CHARS = makePredicate(characters(\"[]{}(),;:\"));\n\n/* -----[ Tokenizer ]----- */\n\n// surrogate safe regexps adapted from https://github.com/mathiasbynens/unicode-8.0.0/tree/89b412d8a71ecca9ed593d9e9fa073ab64acfebe/Binary_Property\nvar UNICODE = {\n ID_Start: /[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A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C4\\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\\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\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]/,\n ID_Continue: /[0-9A-Z_a-z\\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-\\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0D9A-\\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\\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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00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/,\n};\n\nfunction get_full_char(str, pos) {\n var char = str.charAt(pos);\n if (is_surrogate_pair_head(char)) {\n var next = str.charAt(pos + 1);\n if (is_surrogate_pair_tail(next)) {\n return char + next;\n }\n } else if (is_surrogate_pair_tail(char)) {\n var prev = str.charAt(pos - 1);\n if (is_surrogate_pair_head(prev)) {\n return prev + char;\n }\n }\n return char;\n}\n\nfunction get_full_char_code(str, pos) {\n // https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates\n if (is_surrogate_pair_head(str.charAt(pos))) {\n return 0x10000 + (str.charCodeAt(pos) - 0xd800 << 10) + str.charCodeAt(pos + 1) - 0xdc00;\n }\n return str.charCodeAt(pos);\n}\n\nfunction get_full_char_length(str) {\n var surrogates = 0;\n\n for (var i = 0; i < str.length; i++) {\n if (is_surrogate_pair_head(str.charCodeAt(i))) {\n if (is_surrogate_pair_tail(str.charCodeAt(i + 1))) {\n surrogates++;\n i++;\n }\n }\n }\n\n return str.length - surrogates;\n}\n\nfunction from_char_code(code) {\n // Based on https://github.com/mathiasbynens/String.fromCodePoint/blob/master/fromcodepoint.js\n if (code > 0xFFFF) {\n code -= 0x10000;\n return (String.fromCharCode((code >> 10) + 0xD800) +\n String.fromCharCode((code % 0x400) + 0xDC00));\n }\n return String.fromCharCode(code);\n}\n\nfunction is_surrogate_pair_head(code) {\n if (typeof code === \"string\")\n code = code.charCodeAt(0);\n\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction is_surrogate_pair_tail(code) {\n if (typeof code === \"string\")\n code = code.charCodeAt(0);\n return code >= 0xdc00 && code <= 0xdfff;\n}\n\nfunction is_digit(code) {\n return code >= 48 && code <= 57;\n}\n\nfunction is_identifier_start(ch) {\n var code = ch.charCodeAt(0);\n return UNICODE.ID_Start.test(ch) || code == 36 || code == 95;\n}\n\nfunction is_identifier_char(ch) {\n var code = ch.charCodeAt(0);\n return UNICODE.ID_Continue.test(ch)\n || code == 36\n || code == 95\n || code == 8204 // \\u200c: zero-width non-joiner \n || code == 8205 // \\u200d: zero-width joiner (in my ECMA-262 PDF, this is also 200c)\n ;\n}\n\nfunction is_identifier_string(str) {\n return /^[a-z_$][a-z0-9_$]*$/i.test(str);\n}\n\nfunction parse_js_number(num, allow_e = true) {\n if (!allow_e && num.includes(\"e\")) {\n return NaN;\n }\n if (RE_HEX_NUMBER.test(num)) {\n return parseInt(num.substr(2), 16);\n } else if (RE_OCT_NUMBER.test(num)) {\n return parseInt(num.substr(1), 8);\n } else if (RE_ES6_OCT_NUMBER.test(num)) {\n return parseInt(num.substr(2), 8);\n } else if (RE_BIN_NUMBER.test(num)) {\n return parseInt(num.substr(2), 2);\n } else if (RE_DEC_NUMBER.test(num)) {\n return parseFloat(num);\n } else {\n var val = parseFloat(num);\n if (val == num) return val;\n }\n}\n\nclass JS_Parse_Error extends Error {\n constructor(message, filename, line, col, pos) {\n super();\n\n this.name = \"SyntaxError\";\n this.message = message;\n this.filename = filename;\n this.line = line;\n this.col = col;\n this.pos = pos;\n }\n}\n\nfunction js_error(message, filename, line, col, pos) {\n throw new JS_Parse_Error(message, filename, line, col, pos);\n}\n\nfunction is_token(token, type, val) {\n return token.type == type && (val == null || token.value == val);\n}\n\nvar EX_EOF = {};\n\nfunction tokenizer($TEXT, filename, html5_comments, shebang) {\n var S = {\n text : $TEXT,\n filename : filename,\n pos : 0,\n tokpos : 0,\n line : 1,\n tokline : 0,\n col : 0,\n tokcol : 0,\n newline_before : false,\n regex_allowed : false,\n brace_counter : 0,\n template_braces : [],\n comments_before : [],\n directives : {},\n directive_stack : []\n };\n\n function peek() { return get_full_char(S.text, S.pos); }\n\n function next(signal_eof, in_string) {\n var ch = get_full_char(S.text, S.pos++);\n if (signal_eof && !ch)\n throw EX_EOF;\n if (NEWLINE_CHARS.has(ch)) {\n S.newline_before = S.newline_before || !in_string;\n ++S.line;\n S.col = 0;\n if (ch == \"\\r\" && peek() == \"\\n\") {\n // treat a \\r\\n sequence as a single \\n\n ++S.pos;\n ch = \"\\n\";\n }\n } else {\n if (ch.length > 1) {\n ++S.pos;\n ++S.col;\n }\n ++S.col;\n }\n return ch;\n }\n\n function forward(i) {\n while (i-- > 0) next();\n }\n\n function looking_at(str) {\n return S.text.substr(S.pos, str.length) == str;\n }\n\n function find_eol() {\n var text = S.text;\n for (var i = S.pos, n = S.text.length; i < n; ++i) {\n var ch = text[i];\n if (NEWLINE_CHARS.has(ch))\n return i;\n }\n return -1;\n }\n\n function find(what, signal_eof) {\n var pos = S.text.indexOf(what, S.pos);\n if (signal_eof && pos == -1) throw EX_EOF;\n return pos;\n }\n\n function start_token() {\n S.tokline = S.line;\n S.tokcol = S.col;\n S.tokpos = S.pos;\n }\n\n var prev_was_dot = false;\n var previous_token = null;\n function token(type, value, is_comment) {\n S.regex_allowed = ((type == \"operator\" && !UNARY_POSTFIX.has(value)) ||\n (type == \"keyword\" && KEYWORDS_BEFORE_EXPRESSION.has(value)) ||\n (type == \"punc\" && PUNC_BEFORE_EXPRESSION.has(value))) ||\n (type == \"arrow\");\n if (type == \"punc\" && value == \".\") {\n prev_was_dot = true;\n } else if (!is_comment) {\n prev_was_dot = false;\n }\n var ret = {\n type : type,\n value : value,\n line : S.tokline,\n col : S.tokcol,\n pos : S.tokpos,\n endline : S.line,\n endcol : S.col,\n endpos : S.pos,\n nlb : S.newline_before,\n file : filename\n };\n if (/^(?:num|string|regexp)$/i.test(type)) {\n ret.raw = $TEXT.substring(ret.pos, ret.endpos);\n }\n if (!is_comment) {\n ret.comments_before = S.comments_before;\n ret.comments_after = S.comments_before = [];\n }\n S.newline_before = false;\n ret = new AST_Token(ret);\n if (!is_comment) previous_token = ret;\n return ret;\n }\n\n function skip_whitespace() {\n while (WHITESPACE_CHARS.has(peek()))\n next();\n }\n\n function read_while(pred) {\n var ret = \"\", ch, i = 0;\n while ((ch = peek()) && pred(ch, i++))\n ret += next();\n return ret;\n }\n\n function parse_error(err) {\n js_error(err, filename, S.tokline, S.tokcol, S.tokpos);\n }\n\n function read_num(prefix) {\n var has_e = false, after_e = false, has_x = false, has_dot = prefix == \".\", is_big_int = false;\n var num = read_while(function(ch, i) {\n if (is_big_int) return false;\n\n var code = ch.charCodeAt(0);\n switch (code) {\n case 98: case 66: // bB\n return (has_x = true); // Can occur in hex sequence, don't return false yet\n case 111: case 79: // oO\n case 120: case 88: // xX\n return has_x ? false : (has_x = true);\n case 101: case 69: // eE\n return has_x ? true : has_e ? false : (has_e = after_e = true);\n case 45: // -\n return after_e || (i == 0 && !prefix);\n case 43: // +\n return after_e;\n case (after_e = false, 46): // .\n return (!has_dot && !has_x && !has_e) ? (has_dot = true) : false;\n }\n\n if (ch === \"n\") {\n is_big_int = true;\n\n return true;\n }\n\n return RE_NUM_LITERAL.test(ch);\n });\n if (prefix) num = prefix + num;\n if (RE_OCT_NUMBER.test(num) && next_token.has_directive(\"use strict\")) {\n parse_error(\"Legacy octal literals are not allowed in strict mode\");\n }\n if (num.endsWith(\"n\")) {\n const without_n = num.slice(0, -1);\n const valid = parse_js_number(without_n, /*allow_e=*/false);\n if (!has_dot && RE_BIG_INT.test(num) && !isNaN(valid))\n return token(\"big_int\", without_n);\n parse_error(\"Invalid or unexpected token\");\n }\n var valid = parse_js_number(num);\n if (!isNaN(valid)) {\n return token(\"num\", valid);\n } else {\n parse_error(\"Invalid syntax: \" + num);\n }\n }\n\n function is_octal(ch) {\n return ch >= \"0\" && ch <= \"7\";\n }\n\n function read_escaped_char(in_string, strict_hex, template_string) {\n var ch = next(true, in_string);\n switch (ch.charCodeAt(0)) {\n case 110 : return \"\\n\";\n case 114 : return \"\\r\";\n case 116 : return \"\\t\";\n case 98 : return \"\\b\";\n case 118 : return \"\\u000b\"; // \\v\n case 102 : return \"\\f\";\n case 120 : return String.fromCharCode(hex_bytes(2, strict_hex)); // \\x\n case 117 : // \\u\n if (peek() == \"{\") {\n next(true);\n if (peek() === \"}\")\n parse_error(\"Expecting hex-character between {}\");\n while (peek() == \"0\") next(true); // No significance\n var result, length = find(\"}\", true) - S.pos;\n // Avoid 32 bit integer overflow (1 << 32 === 1)\n // We know first character isn't 0 and thus out of range anyway\n if (length > 6 || (result = hex_bytes(length, strict_hex)) > 0x10FFFF) {\n parse_error(\"Unicode reference out of bounds\");\n }\n next(true);\n return from_char_code(result);\n }\n return String.fromCharCode(hex_bytes(4, strict_hex));\n case 10 : return \"\"; // newline\n case 13 : // \\r\n if (peek() == \"\\n\") { // DOS newline\n next(true, in_string);\n return \"\";\n }\n }\n if (is_octal(ch)) {\n if (template_string && strict_hex) {\n const represents_null_character = ch === \"0\" && !is_octal(peek());\n if (!represents_null_character) {\n parse_error(\"Octal escape sequences are not allowed in template strings\");\n }\n }\n return read_octal_escape_sequence(ch, strict_hex);\n }\n return ch;\n }\n\n function read_octal_escape_sequence(ch, strict_octal) {\n // Read\n var p = peek();\n if (p >= \"0\" && p <= \"7\") {\n ch += next(true);\n if (ch[0] <= \"3\" && (p = peek()) >= \"0\" && p <= \"7\")\n ch += next(true);\n }\n\n // Parse\n if (ch === \"0\") return \"\\0\";\n if (ch.length > 0 && next_token.has_directive(\"use strict\") && strict_octal)\n parse_error(\"Legacy octal escape sequences are not allowed in strict mode\");\n return String.fromCharCode(parseInt(ch, 8));\n }\n\n function hex_bytes(n, strict_hex) {\n var num = 0;\n for (; n > 0; --n) {\n if (!strict_hex && isNaN(parseInt(peek(), 16))) {\n return parseInt(num, 16) || \"\";\n }\n var digit = next(true);\n if (isNaN(parseInt(digit, 16)))\n parse_error(\"Invalid hex-character pattern in string\");\n num += digit;\n }\n return parseInt(num, 16);\n }\n\n var read_string = with_eof_error(\"Unterminated string constant\", function() {\n var quote = next(), ret = \"\";\n for (;;) {\n var ch = next(true, true);\n if (ch == \"\\\\\") ch = read_escaped_char(true, true);\n else if (ch == \"\\r\" || ch == \"\\n\") parse_error(\"Unterminated string constant\");\n else if (ch == quote) break;\n ret += ch;\n }\n var tok = token(\"string\", ret);\n tok.quote = quote;\n return tok;\n });\n\n var read_template_characters = with_eof_error(\"Unterminated template\", function(begin) {\n if (begin) {\n S.template_braces.push(S.brace_counter);\n }\n var content = \"\", raw = \"\", ch, tok;\n next(true, true);\n while ((ch = next(true, true)) != \"`\") {\n if (ch == \"\\r\") {\n if (peek() == \"\\n\") ++S.pos;\n ch = \"\\n\";\n } else if (ch == \"$\" && peek() == \"{\") {\n next(true, true);\n S.brace_counter++;\n tok = token(begin ? \"template_head\" : \"template_substitution\", content);\n tok.raw = raw;\n return tok;\n }\n\n raw += ch;\n if (ch == \"\\\\\") {\n var tmp = S.pos;\n var prev_is_tag = previous_token && (previous_token.type === \"name\" || previous_token.type === \"punc\" && (previous_token.value === \")\" || previous_token.value === \"]\"));\n ch = read_escaped_char(true, !prev_is_tag, true);\n raw += S.text.substr(tmp, S.pos - tmp);\n }\n\n content += ch;\n }\n S.template_braces.pop();\n tok = token(begin ? \"template_head\" : \"template_substitution\", content);\n tok.raw = raw;\n tok.end = true;\n return tok;\n });\n\n function skip_line_comment(type) {\n var regex_allowed = S.regex_allowed;\n var i = find_eol(), ret;\n if (i == -1) {\n ret = S.text.substr(S.pos);\n S.pos = S.text.length;\n } else {\n ret = S.text.substring(S.pos, i);\n S.pos = i;\n }\n S.col = S.tokcol + (S.pos - S.tokpos);\n S.comments_before.push(token(type, ret, true));\n S.regex_allowed = regex_allowed;\n return next_token;\n }\n\n var skip_multiline_comment = with_eof_error(\"Unterminated multiline comment\", function() {\n var regex_allowed = S.regex_allowed;\n var i = find(\"*/\", true);\n var text = S.text.substring(S.pos, i).replace(/\\r\\n|\\r|\\u2028|\\u2029/g, \"\\n\");\n // update stream position\n forward(get_full_char_length(text) /* text length doesn't count \\r\\n as 2 char while S.pos - i does */ + 2);\n S.comments_before.push(token(\"comment2\", text, true));\n S.newline_before = S.newline_before || text.includes(\"\\n\");\n S.regex_allowed = regex_allowed;\n return next_token;\n });\n\n var read_name = with_eof_error(\"Unterminated identifier name\", function() {\n var name, ch, escaped = false;\n var read_escaped_identifier_char = function() {\n escaped = true;\n next();\n if (peek() !== \"u\") {\n parse_error(\"Expecting UnicodeEscapeSequence -- uXXXX or u{XXXX}\");\n }\n return read_escaped_char(false, true);\n };\n\n // Read first character (ID_Start)\n if ((name = peek()) === \"\\\\\") {\n name = read_escaped_identifier_char();\n if (!is_identifier_start(name)) {\n parse_error(\"First identifier char is an invalid identifier char\");\n }\n } else if (is_identifier_start(name)) {\n next();\n } else {\n return \"\";\n }\n\n // Read ID_Continue\n while ((ch = peek()) != null) {\n if ((ch = peek()) === \"\\\\\") {\n ch = read_escaped_identifier_char();\n if (!is_identifier_char(ch)) {\n parse_error(\"Invalid escaped identifier char\");\n }\n } else {\n if (!is_identifier_char(ch)) {\n break;\n }\n next();\n }\n name += ch;\n }\n if (RESERVED_WORDS.has(name) && escaped) {\n parse_error(\"Escaped characters are not allowed in keywords\");\n }\n return name;\n });\n\n var read_regexp = with_eof_error(\"Unterminated regular expression\", function(source) {\n var prev_backslash = false, ch, in_class = false;\n while ((ch = next(true))) if (NEWLINE_CHARS.has(ch)) {\n parse_error(\"Unexpected line terminator\");\n } else if (prev_backslash) {\n source += \"\\\\\" + ch;\n prev_backslash = false;\n } else if (ch == \"[\") {\n in_class = true;\n source += ch;\n } else if (ch == \"]\" && in_class) {\n in_class = false;\n source += ch;\n } else if (ch == \"/\" && !in_class) {\n break;\n } else if (ch == \"\\\\\") {\n prev_backslash = true;\n } else {\n source += ch;\n }\n const flags = read_name();\n return token(\"regexp\", { source, flags });\n });\n\n function read_operator(prefix) {\n function grow(op) {\n if (!peek()) return op;\n var bigger = op + peek();\n if (OPERATORS.has(bigger)) {\n next();\n return grow(bigger);\n } else {\n return op;\n }\n }\n return token(\"operator\", grow(prefix || next()));\n }\n\n function handle_slash() {\n next();\n switch (peek()) {\n case \"/\":\n next();\n return skip_line_comment(\"comment1\");\n case \"*\":\n next();\n return skip_multiline_comment();\n }\n return S.regex_allowed ? read_regexp(\"\") : read_operator(\"/\");\n }\n\n function handle_eq_sign() {\n next();\n if (peek() === \">\") {\n next();\n return token(\"arrow\", \"=>\");\n } else {\n return read_operator(\"=\");\n }\n }\n\n function handle_dot() {\n next();\n if (is_digit(peek().charCodeAt(0))) {\n return read_num(\".\");\n }\n if (peek() === \".\") {\n next(); // Consume second dot\n next(); // Consume third dot\n return token(\"expand\", \"...\");\n }\n\n return token(\"punc\", \".\");\n }\n\n function read_word() {\n var word = read_name();\n if (prev_was_dot) return token(\"name\", word);\n return KEYWORDS_ATOM.has(word) ? token(\"atom\", word)\n : !KEYWORDS.has(word) ? token(\"name\", word)\n : OPERATORS.has(word) ? token(\"operator\", word)\n : token(\"keyword\", word);\n }\n\n function with_eof_error(eof_error, cont) {\n return function(x) {\n try {\n return cont(x);\n } catch(ex) {\n if (ex === EX_EOF) parse_error(eof_error);\n else throw ex;\n }\n };\n }\n\n function next_token(force_regexp) {\n if (force_regexp != null)\n return read_regexp(force_regexp);\n if (shebang && S.pos == 0 && looking_at(\"#!\")) {\n start_token();\n forward(2);\n skip_line_comment(\"comment5\");\n }\n for (;;) {\n skip_whitespace();\n start_token();\n if (html5_comments) {\n if (looking_at(\"\") && S.newline_before) {\n forward(3);\n skip_line_comment(\"comment4\");\n continue;\n }\n }\n var ch = peek();\n if (!ch) return token(\"eof\");\n var code = ch.charCodeAt(0);\n switch (code) {\n case 34: case 39: return read_string();\n case 46: return handle_dot();\n case 47: {\n var tok = handle_slash();\n if (tok === next_token) continue;\n return tok;\n }\n case 61: return handle_eq_sign();\n case 96: return read_template_characters(true);\n case 123:\n S.brace_counter++;\n break;\n case 125:\n S.brace_counter--;\n if (S.template_braces.length > 0\n && S.template_braces[S.template_braces.length - 1] === S.brace_counter)\n return read_template_characters(false);\n break;\n }\n if (is_digit(code)) return read_num();\n if (PUNC_CHARS.has(ch)) return token(\"punc\", next());\n if (OPERATOR_CHARS.has(ch)) return read_operator();\n if (code == 92 || is_identifier_start(ch)) return read_word();\n break;\n }\n parse_error(\"Unexpected character '\" + ch + \"'\");\n }\n\n next_token.next = next;\n next_token.peek = peek;\n\n next_token.context = function(nc) {\n if (nc) S = nc;\n return S;\n };\n\n next_token.add_directive = function(directive) {\n S.directive_stack[S.directive_stack.length - 1].push(directive);\n\n if (S.directives[directive] === undefined) {\n S.directives[directive] = 1;\n } else {\n S.directives[directive]++;\n }\n };\n\n next_token.push_directives_stack = function() {\n S.directive_stack.push([]);\n };\n\n next_token.pop_directives_stack = function() {\n var directives = S.directive_stack[S.directive_stack.length - 1];\n\n for (var i = 0; i < directives.length; i++) {\n S.directives[directives[i]]--;\n }\n\n S.directive_stack.pop();\n };\n\n next_token.has_directive = function(directive) {\n return S.directives[directive] > 0;\n };\n\n return next_token;\n\n}\n\n/* -----[ Parser (constants) ]----- */\n\nvar UNARY_PREFIX = makePredicate([\n \"typeof\",\n \"void\",\n \"delete\",\n \"--\",\n \"++\",\n \"!\",\n \"~\",\n \"-\",\n \"+\"\n]);\n\nvar UNARY_POSTFIX = makePredicate([ \"--\", \"++\" ]);\n\nvar ASSIGNMENT = makePredicate([ \"=\", \"+=\", \"-=\", \"/=\", \"*=\", \"**=\", \"%=\", \">>=\", \"<<=\", \">>>=\", \"|=\", \"^=\", \"&=\" ]);\n\nvar PRECEDENCE = (function(a, ret) {\n for (var i = 0; i < a.length; ++i) {\n var b = a[i];\n for (var j = 0; j < b.length; ++j) {\n ret[b[j]] = i + 1;\n }\n }\n return ret;\n})(\n [\n [\"||\"],\n [\"&&\"],\n [\"|\"],\n [\"^\"],\n [\"&\"],\n [\"==\", \"===\", \"!=\", \"!==\"],\n [\"<\", \">\", \"<=\", \">=\", \"in\", \"instanceof\"],\n [\">>\", \"<<\", \">>>\"],\n [\"+\", \"-\"],\n [\"*\", \"/\", \"%\"],\n [\"**\"]\n ],\n {}\n);\n\nvar ATOMIC_START_TOKEN = makePredicate([ \"atom\", \"num\", \"big_int\", \"string\", \"regexp\", \"name\" ]);\n\n/* -----[ Parser ]----- */\n\nfunction parse($TEXT, options) {\n // maps start tokens to count of comments found outside of their parens\n // Example: /* I count */ ( /* I don't */ foo() )\n // Useful because comments_before property of call with parens outside\n // contains both comments inside and outside these parens. Used to find the\n // right #__PURE__ comments for an expression\n const outer_comments_before_counts = new Map();\n\n options = defaults(options, {\n bare_returns : false,\n ecma : 2017,\n expression : false,\n filename : null,\n html5_comments : true,\n module : false,\n shebang : true,\n strict : false,\n toplevel : null,\n }, true);\n\n var S = {\n input : (typeof $TEXT == \"string\"\n ? tokenizer($TEXT, options.filename,\n options.html5_comments, options.shebang)\n : $TEXT),\n token : null,\n prev : null,\n peeked : null,\n in_function : 0,\n in_async : -1,\n in_generator : -1,\n in_directives : true,\n in_loop : 0,\n labels : []\n };\n\n S.token = next();\n\n function is(type, value) {\n return is_token(S.token, type, value);\n }\n\n function peek() { return S.peeked || (S.peeked = S.input()); }\n\n function next() {\n S.prev = S.token;\n\n if (!S.peeked) peek();\n S.token = S.peeked;\n S.peeked = null;\n S.in_directives = S.in_directives && (\n S.token.type == \"string\" || is(\"punc\", \";\")\n );\n return S.token;\n }\n\n function prev() {\n return S.prev;\n }\n\n function croak(msg, line, col, pos) {\n var ctx = S.input.context();\n js_error(msg,\n ctx.filename,\n line != null ? line : ctx.tokline,\n col != null ? col : ctx.tokcol,\n pos != null ? pos : ctx.tokpos);\n }\n\n function token_error(token, msg) {\n croak(msg, token.line, token.col);\n }\n\n function unexpected(token) {\n if (token == null)\n token = S.token;\n token_error(token, \"Unexpected token: \" + token.type + \" (\" + token.value + \")\");\n }\n\n function expect_token(type, val) {\n if (is(type, val)) {\n return next();\n }\n token_error(S.token, \"Unexpected token \" + S.token.type + \" «\" + S.token.value + \"»\" + \", expected \" + type + \" «\" + val + \"»\");\n }\n\n function expect(punc) { return expect_token(\"punc\", punc); }\n\n function has_newline_before(token) {\n return token.nlb || !token.comments_before.every((comment) => !comment.nlb);\n }\n\n function can_insert_semicolon() {\n return !options.strict\n && (is(\"eof\") || is(\"punc\", \"}\") || has_newline_before(S.token));\n }\n\n function is_in_generator() {\n return S.in_generator === S.in_function;\n }\n\n function is_in_async() {\n return S.in_async === S.in_function;\n }\n\n function semicolon(optional) {\n if (is(\"punc\", \";\")) next();\n else if (!optional && !can_insert_semicolon()) unexpected();\n }\n\n function parenthesised() {\n expect(\"(\");\n var exp = expression(true);\n expect(\")\");\n return exp;\n }\n\n function embed_tokens(parser) {\n return function(...args) {\n const start = S.token;\n const expr = parser(...args);\n expr.start = start;\n expr.end = prev();\n return expr;\n };\n }\n\n function handle_regexp() {\n if (is(\"operator\", \"/\") || is(\"operator\", \"/=\")) {\n S.peeked = null;\n S.token = S.input(S.token.value.substr(1)); // force regexp\n }\n }\n\n var statement = embed_tokens(function(is_export_default, is_for_body, is_if_body) {\n handle_regexp();\n switch (S.token.type) {\n case \"string\":\n if (S.in_directives) {\n var token = peek();\n if (!S.token.raw.includes(\"\\\\\")\n && (is_token(token, \"punc\", \";\")\n || is_token(token, \"punc\", \"}\")\n || has_newline_before(token)\n || is_token(token, \"eof\"))) {\n S.input.add_directive(S.token.value);\n } else {\n S.in_directives = false;\n }\n }\n var dir = S.in_directives, stat = simple_statement();\n return dir && stat.body instanceof AST_String ? new AST_Directive(stat.body) : stat;\n case \"template_head\":\n case \"num\":\n case \"big_int\":\n case \"regexp\":\n case \"operator\":\n case \"atom\":\n return simple_statement();\n\n case \"name\":\n if (S.token.value == \"async\" && is_token(peek(), \"keyword\", \"function\")) {\n next();\n next();\n if (is_for_body) {\n croak(\"functions are not allowed as the body of a loop\");\n }\n return function_(AST_Defun, false, true, is_export_default);\n }\n if (S.token.value == \"import\" && !is_token(peek(), \"punc\", \"(\")) {\n next();\n var node = import_();\n semicolon();\n return node;\n }\n return is_token(peek(), \"punc\", \":\")\n ? labeled_statement()\n : simple_statement();\n\n case \"punc\":\n switch (S.token.value) {\n case \"{\":\n return new AST_BlockStatement({\n start : S.token,\n body : block_(),\n end : prev()\n });\n case \"[\":\n case \"(\":\n return simple_statement();\n case \";\":\n S.in_directives = false;\n next();\n return new AST_EmptyStatement();\n default:\n unexpected();\n }\n\n case \"keyword\":\n switch (S.token.value) {\n case \"break\":\n next();\n return break_cont(AST_Break);\n\n case \"continue\":\n next();\n return break_cont(AST_Continue);\n\n case \"debugger\":\n next();\n semicolon();\n return new AST_Debugger();\n\n case \"do\":\n next();\n var body = in_loop(statement);\n expect_token(\"keyword\", \"while\");\n var condition = parenthesised();\n semicolon(true);\n return new AST_Do({\n body : body,\n condition : condition\n });\n\n case \"while\":\n next();\n return new AST_While({\n condition : parenthesised(),\n body : in_loop(function() { return statement(false, true); })\n });\n\n case \"for\":\n next();\n return for_();\n\n case \"class\":\n next();\n if (is_for_body) {\n croak(\"classes are not allowed as the body of a loop\");\n }\n if (is_if_body) {\n croak(\"classes are not allowed as the body of an if\");\n }\n return class_(AST_DefClass);\n\n case \"function\":\n next();\n if (is_for_body) {\n croak(\"functions are not allowed as the body of a loop\");\n }\n return function_(AST_Defun, false, false, is_export_default);\n\n case \"if\":\n next();\n return if_();\n\n case \"return\":\n if (S.in_function == 0 && !options.bare_returns)\n croak(\"'return' outside of function\");\n next();\n var value = null;\n if (is(\"punc\", \";\")) {\n next();\n } else if (!can_insert_semicolon()) {\n value = expression(true);\n semicolon();\n }\n return new AST_Return({\n value: value\n });\n\n case \"switch\":\n next();\n return new AST_Switch({\n expression : parenthesised(),\n body : in_loop(switch_body_)\n });\n\n case \"throw\":\n next();\n if (has_newline_before(S.token))\n croak(\"Illegal newline after 'throw'\");\n var value = expression(true);\n semicolon();\n return new AST_Throw({\n value: value\n });\n\n case \"try\":\n next();\n return try_();\n\n case \"var\":\n next();\n var node = var_();\n semicolon();\n return node;\n\n case \"let\":\n next();\n var node = let_();\n semicolon();\n return node;\n\n case \"const\":\n next();\n var node = const_();\n semicolon();\n return node;\n\n case \"with\":\n if (S.input.has_directive(\"use strict\")) {\n croak(\"Strict mode may not include a with statement\");\n }\n next();\n return new AST_With({\n expression : parenthesised(),\n body : statement()\n });\n\n case \"export\":\n if (!is_token(peek(), \"punc\", \"(\")) {\n next();\n var node = export_();\n if (is(\"punc\", \";\")) semicolon();\n return node;\n }\n }\n }\n unexpected();\n });\n\n function labeled_statement() {\n var label = as_symbol(AST_Label);\n if (label.name === \"await\" && is_in_async()) {\n token_error(S.prev, \"await cannot be used as label inside async function\");\n }\n if (S.labels.some((l) => l.name === label.name)) {\n // ECMA-262, 12.12: An ECMAScript program is considered\n // syntactically incorrect if it contains a\n // LabelledStatement that is enclosed by a\n // LabelledStatement with the same Identifier as label.\n croak(\"Label \" + label.name + \" defined twice\");\n }\n expect(\":\");\n S.labels.push(label);\n var stat = statement();\n S.labels.pop();\n if (!(stat instanceof AST_IterationStatement)) {\n // check for `continue` that refers to this label.\n // those should be reported as syntax errors.\n // https://github.com/mishoo/UglifyJS2/issues/287\n label.references.forEach(function(ref) {\n if (ref instanceof AST_Continue) {\n ref = ref.label.start;\n croak(\"Continue label `\" + label.name + \"` refers to non-IterationStatement.\",\n ref.line, ref.col, ref.pos);\n }\n });\n }\n return new AST_LabeledStatement({ body: stat, label: label });\n }\n\n function simple_statement(tmp) {\n return new AST_SimpleStatement({ body: (tmp = expression(true), semicolon(), tmp) });\n }\n\n function break_cont(type) {\n var label = null, ldef;\n if (!can_insert_semicolon()) {\n label = as_symbol(AST_LabelRef, true);\n }\n if (label != null) {\n ldef = S.labels.find((l) => l.name === label.name);\n if (!ldef)\n croak(\"Undefined label \" + label.name);\n label.thedef = ldef;\n } else if (S.in_loop == 0)\n croak(type.TYPE + \" not inside a loop or switch\");\n semicolon();\n var stat = new type({ label: label });\n if (ldef) ldef.references.push(stat);\n return stat;\n }\n\n function for_() {\n var for_await_error = \"`for await` invalid in this context\";\n var await_tok = S.token;\n if (await_tok.type == \"name\" && await_tok.value == \"await\") {\n if (!is_in_async()) {\n token_error(await_tok, for_await_error);\n }\n next();\n } else {\n await_tok = false;\n }\n expect(\"(\");\n var init = null;\n if (!is(\"punc\", \";\")) {\n init =\n is(\"keyword\", \"var\") ? (next(), var_(true)) :\n is(\"keyword\", \"let\") ? (next(), let_(true)) :\n is(\"keyword\", \"const\") ? (next(), const_(true)) :\n expression(true, true);\n var is_in = is(\"operator\", \"in\");\n var is_of = is(\"name\", \"of\");\n if (await_tok && !is_of) {\n token_error(await_tok, for_await_error);\n }\n if (is_in || is_of) {\n if (init instanceof AST_Definitions) {\n if (init.definitions.length > 1)\n token_error(init.start, \"Only one variable declaration allowed in for..in loop\");\n } else if (!(is_assignable(init) || (init = to_destructuring(init)) instanceof AST_Destructuring)) {\n token_error(init.start, \"Invalid left-hand side in for..in loop\");\n }\n next();\n if (is_in) {\n return for_in(init);\n } else {\n return for_of(init, !!await_tok);\n }\n }\n } else if (await_tok) {\n token_error(await_tok, for_await_error);\n }\n return regular_for(init);\n }\n\n function regular_for(init) {\n expect(\";\");\n var test = is(\"punc\", \";\") ? null : expression(true);\n expect(\";\");\n var step = is(\"punc\", \")\") ? null : expression(true);\n expect(\")\");\n return new AST_For({\n init : init,\n condition : test,\n step : step,\n body : in_loop(function() { return statement(false, true); })\n });\n }\n\n function for_of(init, is_await) {\n var lhs = init instanceof AST_Definitions ? init.definitions[0].name : null;\n var obj = expression(true);\n expect(\")\");\n return new AST_ForOf({\n await : is_await,\n init : init,\n name : lhs,\n object : obj,\n body : in_loop(function() { return statement(false, true); })\n });\n }\n\n function for_in(init) {\n var obj = expression(true);\n expect(\")\");\n return new AST_ForIn({\n init : init,\n object : obj,\n body : in_loop(function() { return statement(false, true); })\n });\n }\n\n var arrow_function = function(start, argnames, is_async) {\n if (has_newline_before(S.token)) {\n croak(\"Unexpected newline before arrow (=>)\");\n }\n\n expect_token(\"arrow\", \"=>\");\n\n var body = _function_body(is(\"punc\", \"{\"), false, is_async);\n\n var end =\n body instanceof Array && body.length ? body[body.length - 1].end :\n body instanceof Array ? start :\n body.end;\n\n return new AST_Arrow({\n start : start,\n end : end,\n async : is_async,\n argnames : argnames,\n body : body\n });\n };\n\n var function_ = function(ctor, is_generator_property, is_async, is_export_default) {\n var start = S.token;\n\n var in_statement = ctor === AST_Defun;\n var is_generator = is(\"operator\", \"*\");\n if (is_generator) {\n next();\n }\n\n var name = is(\"name\") ? as_symbol(in_statement ? AST_SymbolDefun : AST_SymbolLambda) : null;\n if (in_statement && !name) {\n if (is_export_default) {\n ctor = AST_Function;\n } else {\n unexpected();\n }\n }\n\n if (name && ctor !== AST_Accessor && !(name instanceof AST_SymbolDeclaration))\n unexpected(prev());\n\n var args = [];\n var body = _function_body(true, is_generator || is_generator_property, is_async, name, args);\n return new ctor({\n start : args.start,\n end : body.end,\n is_generator: is_generator,\n async : is_async,\n name : name,\n argnames: args,\n body : body\n });\n };\n\n function track_used_binding_identifiers(is_parameter, strict) {\n var parameters = new Set();\n var duplicate = false;\n var default_assignment = false;\n var spread = false;\n var strict_mode = !!strict;\n var tracker = {\n add_parameter: function(token) {\n if (parameters.has(token.value)) {\n if (duplicate === false) {\n duplicate = token;\n }\n tracker.check_strict();\n } else {\n parameters.add(token.value);\n if (is_parameter) {\n switch (token.value) {\n case \"arguments\":\n case \"eval\":\n case \"yield\":\n if (strict_mode) {\n token_error(token, \"Unexpected \" + token.value + \" identifier as parameter inside strict mode\");\n }\n break;\n default:\n if (RESERVED_WORDS.has(token.value)) {\n unexpected();\n }\n }\n }\n }\n },\n mark_default_assignment: function(token) {\n if (default_assignment === false) {\n default_assignment = token;\n }\n },\n mark_spread: function(token) {\n if (spread === false) {\n spread = token;\n }\n },\n mark_strict_mode: function() {\n strict_mode = true;\n },\n is_strict: function() {\n return default_assignment !== false || spread !== false || strict_mode;\n },\n check_strict: function() {\n if (tracker.is_strict() && duplicate !== false) {\n token_error(duplicate, \"Parameter \" + duplicate.value + \" was used already\");\n }\n }\n };\n\n return tracker;\n }\n\n function parameters(params) {\n var start = S.token;\n var used_parameters = track_used_binding_identifiers(true, S.input.has_directive(\"use strict\"));\n\n expect(\"(\");\n\n while (!is(\"punc\", \")\")) {\n var param = parameter(used_parameters);\n params.push(param);\n\n if (!is(\"punc\", \")\")) {\n expect(\",\");\n if (is(\"punc\", \")\") && options.ecma < 2017) unexpected();\n }\n\n if (param instanceof AST_Expansion) {\n break;\n }\n }\n\n next();\n }\n\n function parameter(used_parameters, symbol_type) {\n var param;\n var expand = false;\n if (used_parameters === undefined) {\n used_parameters = track_used_binding_identifiers(true, S.input.has_directive(\"use strict\"));\n }\n if (is(\"expand\", \"...\")) {\n expand = S.token;\n used_parameters.mark_spread(S.token);\n next();\n }\n param = binding_element(used_parameters, symbol_type);\n\n if (is(\"operator\", \"=\") && expand === false) {\n used_parameters.mark_default_assignment(S.token);\n next();\n param = new AST_DefaultAssign({\n start: param.start,\n left: param,\n operator: \"=\",\n right: expression(false),\n end: S.token\n });\n }\n\n if (expand !== false) {\n if (!is(\"punc\", \")\")) {\n unexpected();\n }\n param = new AST_Expansion({\n start: expand,\n expression: param,\n end: expand\n });\n }\n used_parameters.check_strict();\n\n return param;\n }\n\n function binding_element(used_parameters, symbol_type) {\n var elements = [];\n var first = true;\n var is_expand = false;\n var expand_token;\n var first_token = S.token;\n if (used_parameters === undefined) {\n used_parameters = track_used_binding_identifiers(false, S.input.has_directive(\"use strict\"));\n }\n symbol_type = symbol_type === undefined ? AST_SymbolFunarg : symbol_type;\n if (is(\"punc\", \"[\")) {\n next();\n while (!is(\"punc\", \"]\")) {\n if (first) {\n first = false;\n } else {\n expect(\",\");\n }\n\n if (is(\"expand\", \"...\")) {\n is_expand = true;\n expand_token = S.token;\n used_parameters.mark_spread(S.token);\n next();\n }\n if (is(\"punc\")) {\n switch (S.token.value) {\n case \",\":\n elements.push(new AST_Hole({\n start: S.token,\n end: S.token\n }));\n continue;\n case \"]\": // Trailing comma after last element\n break;\n case \"[\":\n case \"{\":\n elements.push(binding_element(used_parameters, symbol_type));\n break;\n default:\n unexpected();\n }\n } else if (is(\"name\")) {\n used_parameters.add_parameter(S.token);\n elements.push(as_symbol(symbol_type));\n } else {\n croak(\"Invalid function parameter\");\n }\n if (is(\"operator\", \"=\") && is_expand === false) {\n used_parameters.mark_default_assignment(S.token);\n next();\n elements[elements.length - 1] = new AST_DefaultAssign({\n start: elements[elements.length - 1].start,\n left: elements[elements.length - 1],\n operator: \"=\",\n right: expression(false),\n end: S.token\n });\n }\n if (is_expand) {\n if (!is(\"punc\", \"]\")) {\n croak(\"Rest element must be last element\");\n }\n elements[elements.length - 1] = new AST_Expansion({\n start: expand_token,\n expression: elements[elements.length - 1],\n end: expand_token\n });\n }\n }\n expect(\"]\");\n used_parameters.check_strict();\n return new AST_Destructuring({\n start: first_token,\n names: elements,\n is_array: true,\n end: prev()\n });\n } else if (is(\"punc\", \"{\")) {\n next();\n while (!is(\"punc\", \"}\")) {\n if (first) {\n first = false;\n } else {\n expect(\",\");\n }\n if (is(\"expand\", \"...\")) {\n is_expand = true;\n expand_token = S.token;\n used_parameters.mark_spread(S.token);\n next();\n }\n if (is(\"name\") && (is_token(peek(), \"punc\") || is_token(peek(), \"operator\")) && [\",\", \"}\", \"=\"].includes(peek().value)) {\n used_parameters.add_parameter(S.token);\n var start = prev();\n var value = as_symbol(symbol_type);\n if (is_expand) {\n elements.push(new AST_Expansion({\n start: expand_token,\n expression: value,\n end: value.end,\n }));\n } else {\n elements.push(new AST_ObjectKeyVal({\n start: start,\n key: value.name,\n value: value,\n end: value.end,\n }));\n }\n } else if (is(\"punc\", \"}\")) {\n continue; // Allow trailing hole\n } else {\n var property_token = S.token;\n var property = as_property_name();\n if (property === null) {\n unexpected(prev());\n } else if (prev().type === \"name\" && !is(\"punc\", \":\")) {\n elements.push(new AST_ObjectKeyVal({\n start: prev(),\n key: property,\n value: new symbol_type({\n start: prev(),\n name: property,\n end: prev()\n }),\n end: prev()\n }));\n } else {\n expect(\":\");\n elements.push(new AST_ObjectKeyVal({\n start: property_token,\n quote: property_token.quote,\n key: property,\n value: binding_element(used_parameters, symbol_type),\n end: prev()\n }));\n }\n }\n if (is_expand) {\n if (!is(\"punc\", \"}\")) {\n croak(\"Rest element must be last element\");\n }\n } else if (is(\"operator\", \"=\")) {\n used_parameters.mark_default_assignment(S.token);\n next();\n elements[elements.length - 1].value = new AST_DefaultAssign({\n start: elements[elements.length - 1].value.start,\n left: elements[elements.length - 1].value,\n operator: \"=\",\n right: expression(false),\n end: S.token\n });\n }\n }\n expect(\"}\");\n used_parameters.check_strict();\n return new AST_Destructuring({\n start: first_token,\n names: elements,\n is_array: false,\n end: prev()\n });\n } else if (is(\"name\")) {\n used_parameters.add_parameter(S.token);\n return as_symbol(symbol_type);\n } else {\n croak(\"Invalid function parameter\");\n }\n }\n\n function params_or_seq_(allow_arrows, maybe_sequence) {\n var spread_token;\n var invalid_sequence;\n var trailing_comma;\n var a = [];\n expect(\"(\");\n while (!is(\"punc\", \")\")) {\n if (spread_token) unexpected(spread_token);\n if (is(\"expand\", \"...\")) {\n spread_token = S.token;\n if (maybe_sequence) invalid_sequence = S.token;\n next();\n a.push(new AST_Expansion({\n start: prev(),\n expression: expression(),\n end: S.token,\n }));\n } else {\n a.push(expression());\n }\n if (!is(\"punc\", \")\")) {\n expect(\",\");\n if (is(\"punc\", \")\")) {\n if (options.ecma < 2017) unexpected();\n trailing_comma = prev();\n if (maybe_sequence) invalid_sequence = trailing_comma;\n }\n }\n }\n expect(\")\");\n if (allow_arrows && is(\"arrow\", \"=>\")) {\n if (spread_token && trailing_comma) unexpected(trailing_comma);\n } else if (invalid_sequence) {\n unexpected(invalid_sequence);\n }\n return a;\n }\n\n function _function_body(block, generator, is_async, name, args) {\n var loop = S.in_loop;\n var labels = S.labels;\n var current_generator = S.in_generator;\n var current_async = S.in_async;\n ++S.in_function;\n if (generator)\n S.in_generator = S.in_function;\n if (is_async)\n S.in_async = S.in_function;\n if (args) parameters(args);\n if (block)\n S.in_directives = true;\n S.in_loop = 0;\n S.labels = [];\n if (block) {\n S.input.push_directives_stack();\n var a = block_();\n if (name) _verify_symbol(name);\n if (args) args.forEach(_verify_symbol);\n S.input.pop_directives_stack();\n } else {\n var a = [new AST_Return({\n start: S.token,\n value: expression(false),\n end: S.token\n })];\n }\n --S.in_function;\n S.in_loop = loop;\n S.labels = labels;\n S.in_generator = current_generator;\n S.in_async = current_async;\n return a;\n }\n\n function _await_expression() {\n // Previous token must be \"await\" and not be interpreted as an identifier\n if (!is_in_async()) {\n croak(\"Unexpected await expression outside async function\",\n S.prev.line, S.prev.col, S.prev.pos);\n }\n // the await expression is parsed as a unary expression in Babel\n return new AST_Await({\n start: prev(),\n end: S.token,\n expression : maybe_unary(true),\n });\n }\n\n function _yield_expression() {\n // Previous token must be keyword yield and not be interpret as an identifier\n if (!is_in_generator()) {\n croak(\"Unexpected yield expression outside generator function\",\n S.prev.line, S.prev.col, S.prev.pos);\n }\n var start = S.token;\n var star = false;\n var has_expression = true;\n\n // Attempt to get expression or star (and then the mandatory expression)\n // behind yield on the same line.\n //\n // If nothing follows on the same line of the yieldExpression,\n // it should default to the value `undefined` for yield to return.\n // In that case, the `undefined` stored as `null` in ast.\n //\n // Note 1: It isn't allowed for yield* to close without an expression\n // Note 2: If there is a nlb between yield and star, it is interpret as\n // yield *\n if (can_insert_semicolon() ||\n (is(\"punc\") && PUNC_AFTER_EXPRESSION.has(S.token.value))) {\n has_expression = false;\n\n } else if (is(\"operator\", \"*\")) {\n star = true;\n next();\n }\n\n return new AST_Yield({\n start : start,\n is_star : star,\n expression : has_expression ? expression() : null,\n end : prev()\n });\n }\n\n function if_() {\n var cond = parenthesised(), body = statement(false, false, true), belse = null;\n if (is(\"keyword\", \"else\")) {\n next();\n belse = statement(false, false, true);\n }\n return new AST_If({\n condition : cond,\n body : body,\n alternative : belse\n });\n }\n\n function block_() {\n expect(\"{\");\n var a = [];\n while (!is(\"punc\", \"}\")) {\n if (is(\"eof\")) unexpected();\n a.push(statement());\n }\n next();\n return a;\n }\n\n function switch_body_() {\n expect(\"{\");\n var a = [], cur = null, branch = null, tmp;\n while (!is(\"punc\", \"}\")) {\n if (is(\"eof\")) unexpected();\n if (is(\"keyword\", \"case\")) {\n if (branch) branch.end = prev();\n cur = [];\n branch = new AST_Case({\n start : (tmp = S.token, next(), tmp),\n expression : expression(true),\n body : cur\n });\n a.push(branch);\n expect(\":\");\n } else if (is(\"keyword\", \"default\")) {\n if (branch) branch.end = prev();\n cur = [];\n branch = new AST_Default({\n start : (tmp = S.token, next(), expect(\":\"), tmp),\n body : cur\n });\n a.push(branch);\n } else {\n if (!cur) unexpected();\n cur.push(statement());\n }\n }\n if (branch) branch.end = prev();\n next();\n return a;\n }\n\n function try_() {\n var body = block_(), bcatch = null, bfinally = null;\n if (is(\"keyword\", \"catch\")) {\n var start = S.token;\n next();\n if (is(\"punc\", \"{\")) {\n var name = null;\n } else {\n expect(\"(\");\n var name = parameter(undefined, AST_SymbolCatch);\n expect(\")\");\n }\n bcatch = new AST_Catch({\n start : start,\n argname : name,\n body : block_(),\n end : prev()\n });\n }\n if (is(\"keyword\", \"finally\")) {\n var start = S.token;\n next();\n bfinally = new AST_Finally({\n start : start,\n body : block_(),\n end : prev()\n });\n }\n if (!bcatch && !bfinally)\n croak(\"Missing catch/finally blocks\");\n return new AST_Try({\n body : body,\n bcatch : bcatch,\n bfinally : bfinally\n });\n }\n\n function vardefs(no_in, kind) {\n var a = [];\n var def;\n for (;;) {\n var sym_type =\n kind === \"var\" ? AST_SymbolVar :\n kind === \"const\" ? AST_SymbolConst :\n kind === \"let\" ? AST_SymbolLet : null;\n if (is(\"punc\", \"{\") || is(\"punc\", \"[\")) {\n def = new AST_VarDef({\n start: S.token,\n name: binding_element(undefined ,sym_type),\n value: is(\"operator\", \"=\") ? (expect_token(\"operator\", \"=\"), expression(false, no_in)) : null,\n end: prev()\n });\n } else {\n def = new AST_VarDef({\n start : S.token,\n name : as_symbol(sym_type),\n value : is(\"operator\", \"=\")\n ? (next(), expression(false, no_in))\n : !no_in && kind === \"const\"\n ? croak(\"Missing initializer in const declaration\") : null,\n end : prev()\n });\n if (def.name.name == \"import\") croak(\"Unexpected token: import\");\n }\n a.push(def);\n if (!is(\"punc\", \",\"))\n break;\n next();\n }\n return a;\n }\n\n var var_ = function(no_in) {\n return new AST_Var({\n start : prev(),\n definitions : vardefs(no_in, \"var\"),\n end : prev()\n });\n };\n\n var let_ = function(no_in) {\n return new AST_Let({\n start : prev(),\n definitions : vardefs(no_in, \"let\"),\n end : prev()\n });\n };\n\n var const_ = function(no_in) {\n return new AST_Const({\n start : prev(),\n definitions : vardefs(no_in, \"const\"),\n end : prev()\n });\n };\n\n var new_ = function(allow_calls) {\n var start = S.token;\n expect_token(\"operator\", \"new\");\n if (is(\"punc\", \".\")) {\n next();\n expect_token(\"name\", \"target\");\n return subscripts(new AST_NewTarget({\n start : start,\n end : prev()\n }), allow_calls);\n }\n var newexp = expr_atom(false), args;\n if (is(\"punc\", \"(\")) {\n next();\n args = expr_list(\")\", options.ecma >= 2017);\n } else {\n args = [];\n }\n var call = new AST_New({\n start : start,\n expression : newexp,\n args : args,\n end : prev()\n });\n annotate(call);\n return subscripts(call, allow_calls);\n };\n\n function as_atom_node() {\n var tok = S.token, ret;\n switch (tok.type) {\n case \"name\":\n ret = _make_symbol(AST_SymbolRef);\n break;\n case \"num\":\n ret = new AST_Number({ start: tok, end: tok, value: tok.value });\n break;\n case \"big_int\":\n ret = new AST_BigInt({ start: tok, end: tok, value: tok.value });\n break;\n case \"string\":\n ret = new AST_String({\n start : tok,\n end : tok,\n value : tok.value,\n quote : tok.quote\n });\n break;\n case \"regexp\":\n ret = new AST_RegExp({ start: tok, end: tok, value: tok.value });\n break;\n case \"atom\":\n switch (tok.value) {\n case \"false\":\n ret = new AST_False({ start: tok, end: tok });\n break;\n case \"true\":\n ret = new AST_True({ start: tok, end: tok });\n break;\n case \"null\":\n ret = new AST_Null({ start: tok, end: tok });\n break;\n }\n break;\n }\n next();\n return ret;\n }\n\n function to_fun_args(ex, _, __, default_seen_above) {\n var insert_default = function(ex, default_value) {\n if (default_value) {\n return new AST_DefaultAssign({\n start: ex.start,\n left: ex,\n operator: \"=\",\n right: default_value,\n end: default_value.end\n });\n }\n return ex;\n };\n if (ex instanceof AST_Object) {\n return insert_default(new AST_Destructuring({\n start: ex.start,\n end: ex.end,\n is_array: false,\n names: ex.properties.map(to_fun_args)\n }), default_seen_above);\n } else if (ex instanceof AST_ObjectKeyVal) {\n ex.value = to_fun_args(ex.value, 0, [ex.key]);\n return insert_default(ex, default_seen_above);\n } else if (ex instanceof AST_Hole) {\n return ex;\n } else if (ex instanceof AST_Destructuring) {\n ex.names = ex.names.map(to_fun_args);\n return insert_default(ex, default_seen_above);\n } else if (ex instanceof AST_SymbolRef) {\n return insert_default(new AST_SymbolFunarg({\n name: ex.name,\n start: ex.start,\n end: ex.end\n }), default_seen_above);\n } else if (ex instanceof AST_Expansion) {\n ex.expression = to_fun_args(ex.expression);\n return insert_default(ex, default_seen_above);\n } else if (ex instanceof AST_Array) {\n return insert_default(new AST_Destructuring({\n start: ex.start,\n end: ex.end,\n is_array: true,\n names: ex.elements.map(to_fun_args)\n }), default_seen_above);\n } else if (ex instanceof AST_Assign) {\n return insert_default(to_fun_args(ex.left, undefined, undefined, ex.right), default_seen_above);\n } else if (ex instanceof AST_DefaultAssign) {\n ex.left = to_fun_args(ex.left, 0, [ex.left]);\n return ex;\n } else {\n croak(\"Invalid function parameter\", ex.start.line, ex.start.col);\n }\n }\n\n var expr_atom = function(allow_calls, allow_arrows) {\n if (is(\"operator\", \"new\")) {\n return new_(allow_calls);\n }\n var start = S.token;\n var peeked;\n var async = is(\"name\", \"async\")\n && (peeked = peek()).value != \"[\"\n && peeked.type != \"arrow\"\n && as_atom_node();\n if (is(\"punc\")) {\n switch (S.token.value) {\n case \"(\":\n if (async && !allow_calls) break;\n var exprs = params_or_seq_(allow_arrows, !async);\n if (allow_arrows && is(\"arrow\", \"=>\")) {\n return arrow_function(start, exprs.map(to_fun_args), !!async);\n }\n var ex = async ? new AST_Call({\n expression: async,\n args: exprs\n }) : exprs.length == 1 ? exprs[0] : new AST_Sequence({\n expressions: exprs\n });\n if (ex.start) {\n const outer_comments_before = start.comments_before.length;\n outer_comments_before_counts.set(start, outer_comments_before);\n ex.start.comments_before.unshift(...start.comments_before);\n start.comments_before = ex.start.comments_before;\n if (outer_comments_before == 0 && start.comments_before.length > 0) {\n var comment = start.comments_before[0];\n if (!comment.nlb) {\n comment.nlb = start.nlb;\n start.nlb = false;\n }\n }\n start.comments_after = ex.start.comments_after;\n }\n ex.start = start;\n var end = prev();\n if (ex.end) {\n end.comments_before = ex.end.comments_before;\n ex.end.comments_after.push(...end.comments_after);\n end.comments_after = ex.end.comments_after;\n }\n ex.end = end;\n if (ex instanceof AST_Call) annotate(ex);\n return subscripts(ex, allow_calls);\n case \"[\":\n return subscripts(array_(), allow_calls);\n case \"{\":\n return subscripts(object_or_destructuring_(), allow_calls);\n }\n if (!async) unexpected();\n }\n if (allow_arrows && is(\"name\") && is_token(peek(), \"arrow\")) {\n var param = new AST_SymbolFunarg({\n name: S.token.value,\n start: start,\n end: start,\n });\n next();\n return arrow_function(start, [param], !!async);\n }\n if (is(\"keyword\", \"function\")) {\n next();\n var func = function_(AST_Function, false, !!async);\n func.start = start;\n func.end = prev();\n return subscripts(func, allow_calls);\n }\n if (async) return subscripts(async, allow_calls);\n if (is(\"keyword\", \"class\")) {\n next();\n var cls = class_(AST_ClassExpression);\n cls.start = start;\n cls.end = prev();\n return subscripts(cls, allow_calls);\n }\n if (is(\"template_head\")) {\n return subscripts(template_string(false), allow_calls);\n }\n if (ATOMIC_START_TOKEN.has(S.token.type)) {\n return subscripts(as_atom_node(), allow_calls);\n }\n unexpected();\n };\n\n function template_string(tagged) {\n var segments = [], start = S.token;\n\n segments.push(new AST_TemplateSegment({\n start: S.token,\n raw: S.token.raw,\n value: S.token.value,\n end: S.token\n }));\n while (!S.token.end) {\n next();\n handle_regexp();\n segments.push(expression(true));\n\n if (!is_token(\"template_substitution\")) {\n unexpected();\n }\n\n segments.push(new AST_TemplateSegment({\n start: S.token,\n raw: S.token.raw,\n value: S.token.value,\n end: S.token\n }));\n }\n next();\n\n return new AST_TemplateString({\n start: start,\n segments: segments,\n end: S.token\n });\n }\n\n function expr_list(closing, allow_trailing_comma, allow_empty) {\n var first = true, a = [];\n while (!is(\"punc\", closing)) {\n if (first) first = false; else expect(\",\");\n if (allow_trailing_comma && is(\"punc\", closing)) break;\n if (is(\"punc\", \",\") && allow_empty) {\n a.push(new AST_Hole({ start: S.token, end: S.token }));\n } else if (is(\"expand\", \"...\")) {\n next();\n a.push(new AST_Expansion({start: prev(), expression: expression(),end: S.token}));\n } else {\n a.push(expression(false));\n }\n }\n next();\n return a;\n }\n\n var array_ = embed_tokens(function() {\n expect(\"[\");\n return new AST_Array({\n elements: expr_list(\"]\", !options.strict, true)\n });\n });\n\n var create_accessor = embed_tokens((is_generator, is_async) => {\n return function_(AST_Accessor, is_generator, is_async);\n });\n\n var object_or_destructuring_ = embed_tokens(function object_or_destructuring_() {\n var start = S.token, first = true, a = [];\n expect(\"{\");\n while (!is(\"punc\", \"}\")) {\n if (first) first = false; else expect(\",\");\n if (!options.strict && is(\"punc\", \"}\"))\n // allow trailing comma\n break;\n\n start = S.token;\n if (start.type == \"expand\") {\n next();\n a.push(new AST_Expansion({\n start: start,\n expression: expression(false),\n end: prev(),\n }));\n continue;\n }\n\n var name = as_property_name();\n var value;\n\n // Check property and fetch value\n if (!is(\"punc\", \":\")) {\n var concise = concise_method_or_getset(name, start);\n if (concise) {\n a.push(concise);\n continue;\n }\n\n value = new AST_SymbolRef({\n start: prev(),\n name: name,\n end: prev()\n });\n } else if (name === null) {\n unexpected(prev());\n } else {\n next(); // `:` - see first condition\n value = expression(false);\n }\n\n // Check for default value and alter value accordingly if necessary\n if (is(\"operator\", \"=\")) {\n next();\n value = new AST_Assign({\n start: start,\n left: value,\n operator: \"=\",\n right: expression(false),\n end: prev()\n });\n }\n\n // Create property\n a.push(new AST_ObjectKeyVal({\n start: start,\n quote: start.quote,\n key: name instanceof AST_Node ? name : \"\" + name,\n value: value,\n end: prev()\n }));\n }\n next();\n return new AST_Object({ properties: a });\n });\n\n function class_(KindOfClass) {\n var start, method, class_name, extends_, a = [];\n\n S.input.push_directives_stack(); // Push directive stack, but not scope stack\n S.input.add_directive(\"use strict\");\n\n if (S.token.type == \"name\" && S.token.value != \"extends\") {\n class_name = as_symbol(KindOfClass === AST_DefClass ? AST_SymbolDefClass : AST_SymbolClass);\n }\n\n if (KindOfClass === AST_DefClass && !class_name) {\n unexpected();\n }\n\n if (S.token.value == \"extends\") {\n next();\n extends_ = expression(true);\n }\n\n expect(\"{\");\n\n while (is(\"punc\", \";\")) { next(); } // Leading semicolons are okay in class bodies.\n while (!is(\"punc\", \"}\")) {\n start = S.token;\n method = concise_method_or_getset(as_property_name(), start, true);\n if (!method) { unexpected(); }\n a.push(method);\n while (is(\"punc\", \";\")) { next(); }\n }\n\n S.input.pop_directives_stack();\n\n next();\n\n return new KindOfClass({\n start: start,\n name: class_name,\n extends: extends_,\n properties: a,\n end: prev(),\n });\n }\n\n function concise_method_or_getset(name, start, is_class) {\n var get_ast = function(name, token) {\n if (typeof name === \"string\" || typeof name === \"number\") {\n return new AST_SymbolMethod({\n start: token,\n name: \"\" + name,\n end: prev()\n });\n } else if (name === null) {\n unexpected();\n }\n return name;\n };\n var is_async = false;\n var is_static = false;\n var is_generator = false;\n var property_token = start;\n if (is_class && name === \"static\" && !is(\"punc\", \"(\")) {\n is_static = true;\n property_token = S.token;\n name = as_property_name();\n }\n if (name === \"async\" && !is(\"punc\", \"(\") && !is(\"punc\", \",\") && !is(\"punc\", \"}\") && !is(\"operator\", \"=\")) {\n is_async = true;\n property_token = S.token;\n name = as_property_name();\n }\n if (name === null) {\n is_generator = true;\n property_token = S.token;\n name = as_property_name();\n if (name === null) {\n unexpected();\n }\n }\n if (is(\"punc\", \"(\")) {\n name = get_ast(name, start);\n var node = new AST_ConciseMethod({\n start : start,\n static : is_static,\n is_generator: is_generator,\n async : is_async,\n key : name,\n quote : name instanceof AST_SymbolMethod ?\n property_token.quote : undefined,\n value : create_accessor(is_generator, is_async),\n end : prev()\n });\n return node;\n }\n property_token = S.token;\n if (name == \"get\") {\n if (!is(\"punc\") || is(\"punc\", \"[\")) {\n name = get_ast(as_property_name(), start);\n return new AST_ObjectGetter({\n start : start,\n static: is_static,\n key : name,\n quote : name instanceof AST_SymbolMethod ?\n property_token.quote : undefined,\n value : create_accessor(),\n end : prev()\n });\n }\n } else if (name == \"set\") {\n if (!is(\"punc\") || is(\"punc\", \"[\")) {\n name = get_ast(as_property_name(), start);\n return new AST_ObjectSetter({\n start : start,\n static: is_static,\n key : name,\n quote : name instanceof AST_SymbolMethod ?\n property_token.quote : undefined,\n value : create_accessor(),\n end : prev()\n });\n }\n }\n }\n\n function import_() {\n var start = prev();\n var imported_name;\n var imported_names;\n if (is(\"name\")) {\n imported_name = as_symbol(AST_SymbolImport);\n }\n\n if (is(\"punc\", \",\")) {\n next();\n }\n\n imported_names = map_names(true);\n\n if (imported_names || imported_name) {\n expect_token(\"name\", \"from\");\n }\n var mod_str = S.token;\n if (mod_str.type !== \"string\") {\n unexpected();\n }\n next();\n return new AST_Import({\n start: start,\n imported_name: imported_name,\n imported_names: imported_names,\n module_name: new AST_String({\n start: mod_str,\n value: mod_str.value,\n quote: mod_str.quote,\n end: mod_str,\n }),\n end: S.token,\n });\n }\n\n function map_name(is_import) {\n function make_symbol(type) {\n return new type({\n name: as_property_name(),\n start: prev(),\n end: prev()\n });\n }\n\n var foreign_type = is_import ? AST_SymbolImportForeign : AST_SymbolExportForeign;\n var type = is_import ? AST_SymbolImport : AST_SymbolExport;\n var start = S.token;\n var foreign_name;\n var name;\n\n if (is_import) {\n foreign_name = make_symbol(foreign_type);\n } else {\n name = make_symbol(type);\n }\n if (is(\"name\", \"as\")) {\n next(); // The \"as\" word\n if (is_import) {\n name = make_symbol(type);\n } else {\n foreign_name = make_symbol(foreign_type);\n }\n } else if (is_import) {\n name = new type(foreign_name);\n } else {\n foreign_name = new foreign_type(name);\n }\n\n return new AST_NameMapping({\n start: start,\n foreign_name: foreign_name,\n name: name,\n end: prev(),\n });\n }\n\n function map_nameAsterisk(is_import, name) {\n var foreign_type = is_import ? AST_SymbolImportForeign : AST_SymbolExportForeign;\n var type = is_import ? AST_SymbolImport : AST_SymbolExport;\n var start = S.token;\n var foreign_name;\n var end = prev();\n\n name = name || new type({\n name: \"*\",\n start: start,\n end: end,\n });\n\n foreign_name = new foreign_type({\n name: \"*\",\n start: start,\n end: end,\n });\n\n return new AST_NameMapping({\n start: start,\n foreign_name: foreign_name,\n name: name,\n end: end,\n });\n }\n\n function map_names(is_import) {\n var names;\n if (is(\"punc\", \"{\")) {\n next();\n names = [];\n while (!is(\"punc\", \"}\")) {\n names.push(map_name(is_import));\n if (is(\"punc\", \",\")) {\n next();\n }\n }\n next();\n } else if (is(\"operator\", \"*\")) {\n var name;\n next();\n if (is_import && is(\"name\", \"as\")) {\n next(); // The \"as\" word\n name = as_symbol(is_import ? AST_SymbolImport : AST_SymbolExportForeign);\n }\n names = [map_nameAsterisk(is_import, name)];\n }\n return names;\n }\n\n function export_() {\n var start = S.token;\n var is_default;\n var exported_names;\n\n if (is(\"keyword\", \"default\")) {\n is_default = true;\n next();\n } else if (exported_names = map_names(false)) {\n if (is(\"name\", \"from\")) {\n next();\n\n var mod_str = S.token;\n if (mod_str.type !== \"string\") {\n unexpected();\n }\n next();\n\n return new AST_Export({\n start: start,\n is_default: is_default,\n exported_names: exported_names,\n module_name: new AST_String({\n start: mod_str,\n value: mod_str.value,\n quote: mod_str.quote,\n end: mod_str,\n }),\n end: prev(),\n });\n } else {\n return new AST_Export({\n start: start,\n is_default: is_default,\n exported_names: exported_names,\n end: prev(),\n });\n }\n }\n\n var node;\n var exported_value;\n var exported_definition;\n if (is(\"punc\", \"{\")\n || is_default\n && (is(\"keyword\", \"class\") || is(\"keyword\", \"function\"))\n && is_token(peek(), \"punc\")) {\n exported_value = expression(false);\n semicolon();\n } else if ((node = statement(is_default)) instanceof AST_Definitions && is_default) {\n unexpected(node.start);\n } else if (node instanceof AST_Definitions || node instanceof AST_Lambda || node instanceof AST_DefClass) {\n exported_definition = node;\n } else if (node instanceof AST_SimpleStatement) {\n exported_value = node.body;\n } else {\n unexpected(node.start);\n }\n\n return new AST_Export({\n start: start,\n is_default: is_default,\n exported_value: exported_value,\n exported_definition: exported_definition,\n end: prev(),\n });\n }\n\n function as_property_name() {\n var tmp = S.token;\n switch (tmp.type) {\n case \"punc\":\n if (tmp.value === \"[\") {\n next();\n var ex = expression(false);\n expect(\"]\");\n return ex;\n } else unexpected(tmp);\n case \"operator\":\n if (tmp.value === \"*\") {\n next();\n return null;\n }\n if (![\"delete\", \"in\", \"instanceof\", \"new\", \"typeof\", \"void\"].includes(tmp.value)) {\n unexpected(tmp);\n }\n case \"name\":\n if (tmp.value == \"yield\") {\n if (is_in_generator()) {\n token_error(tmp, \"Yield cannot be used as identifier inside generators\");\n } else if (!is_token(peek(), \"punc\", \":\")\n && !is_token(peek(), \"punc\", \"(\")\n && S.input.has_directive(\"use strict\")) {\n token_error(tmp, \"Unexpected yield identifier inside strict mode\");\n }\n }\n case \"string\":\n case \"num\":\n case \"big_int\":\n case \"keyword\":\n case \"atom\":\n next();\n return tmp.value;\n default:\n unexpected(tmp);\n }\n }\n\n function as_name() {\n var tmp = S.token;\n if (tmp.type != \"name\") unexpected();\n next();\n return tmp.value;\n }\n\n function _make_symbol(type) {\n var name = S.token.value;\n return new (name == \"this\" ? AST_This :\n name == \"super\" ? AST_Super :\n type)({\n name : String(name),\n start : S.token,\n end : S.token\n });\n }\n\n function _verify_symbol(sym) {\n var name = sym.name;\n if (is_in_generator() && name == \"yield\") {\n token_error(sym.start, \"Yield cannot be used as identifier inside generators\");\n }\n if (S.input.has_directive(\"use strict\")) {\n if (name == \"yield\") {\n token_error(sym.start, \"Unexpected yield identifier inside strict mode\");\n }\n if (sym instanceof AST_SymbolDeclaration && (name == \"arguments\" || name == \"eval\")) {\n token_error(sym.start, \"Unexpected \" + name + \" in strict mode\");\n }\n }\n }\n\n function as_symbol(type, noerror) {\n if (!is(\"name\")) {\n if (!noerror) croak(\"Name expected\");\n return null;\n }\n var sym = _make_symbol(type);\n _verify_symbol(sym);\n next();\n return sym;\n }\n\n // Annotate AST_Call, AST_Lambda or AST_New with the special comments\n function annotate(node) {\n var start = node.start;\n var comments = start.comments_before;\n const comments_outside_parens = outer_comments_before_counts.get(start);\n var i = comments_outside_parens != null ? comments_outside_parens : comments.length;\n while (--i >= 0) {\n var comment = comments[i];\n if (/[@#]__/.test(comment.value)) {\n if (/[@#]__PURE__/.test(comment.value)) {\n set_annotation(node, _PURE);\n break;\n }\n if (/[@#]__INLINE__/.test(comment.value)) {\n set_annotation(node, _INLINE);\n break;\n }\n if (/[@#]__NOINLINE__/.test(comment.value)) {\n set_annotation(node, _NOINLINE);\n break;\n }\n }\n }\n }\n\n var subscripts = function(expr, allow_calls) {\n var start = expr.start;\n if (is(\"punc\", \".\")) {\n next();\n return subscripts(new AST_Dot({\n start : start,\n expression : expr,\n property : as_name(),\n end : prev()\n }), allow_calls);\n }\n if (is(\"punc\", \"[\")) {\n next();\n var prop = expression(true);\n expect(\"]\");\n return subscripts(new AST_Sub({\n start : start,\n expression : expr,\n property : prop,\n end : prev()\n }), allow_calls);\n }\n if (allow_calls && is(\"punc\", \"(\")) {\n next();\n var call = new AST_Call({\n start : start,\n expression : expr,\n args : call_args(),\n end : prev()\n });\n annotate(call);\n return subscripts(call, true);\n }\n if (is(\"template_head\")) {\n return subscripts(new AST_PrefixedTemplateString({\n start: start,\n prefix: expr,\n template_string: template_string(true),\n end: prev()\n }), allow_calls);\n }\n return expr;\n };\n\n function call_args() {\n var args = [];\n while (!is(\"punc\", \")\")) {\n if (is(\"expand\", \"...\")) {\n next();\n args.push(new AST_Expansion({\n start: prev(),\n expression: expression(false),\n end: prev()\n }));\n } else {\n args.push(expression(false));\n }\n if (!is(\"punc\", \")\")) {\n expect(\",\");\n if (is(\"punc\", \")\") && options.ecma < 2017) unexpected();\n }\n }\n next();\n return args;\n }\n\n var maybe_unary = function(allow_calls, allow_arrows) {\n var start = S.token;\n if (start.type == \"name\" && start.value == \"await\") {\n if (is_in_async()) {\n next();\n return _await_expression();\n } else if (S.input.has_directive(\"use strict\")) {\n token_error(S.token, \"Unexpected await identifier inside strict mode\");\n }\n }\n if (is(\"operator\") && UNARY_PREFIX.has(start.value)) {\n next();\n handle_regexp();\n var ex = make_unary(AST_UnaryPrefix, start, maybe_unary(allow_calls));\n ex.start = start;\n ex.end = prev();\n return ex;\n }\n var val = expr_atom(allow_calls, allow_arrows);\n while (is(\"operator\") && UNARY_POSTFIX.has(S.token.value) && !has_newline_before(S.token)) {\n if (val instanceof AST_Arrow) unexpected();\n val = make_unary(AST_UnaryPostfix, S.token, val);\n val.start = start;\n val.end = S.token;\n next();\n }\n return val;\n };\n\n function make_unary(ctor, token, expr) {\n var op = token.value;\n switch (op) {\n case \"++\":\n case \"--\":\n if (!is_assignable(expr))\n croak(\"Invalid use of \" + op + \" operator\", token.line, token.col, token.pos);\n break;\n case \"delete\":\n if (expr instanceof AST_SymbolRef && S.input.has_directive(\"use strict\"))\n croak(\"Calling delete on expression not allowed in strict mode\", expr.start.line, expr.start.col, expr.start.pos);\n break;\n }\n return new ctor({ operator: op, expression: expr });\n }\n\n var expr_op = function(left, min_prec, no_in) {\n var op = is(\"operator\") ? S.token.value : null;\n if (op == \"in\" && no_in) op = null;\n if (op == \"**\" && left instanceof AST_UnaryPrefix\n /* unary token in front not allowed - parenthesis required */\n && !is_token(left.start, \"punc\", \"(\")\n && left.operator !== \"--\" && left.operator !== \"++\")\n unexpected(left.start);\n var prec = op != null ? PRECEDENCE[op] : null;\n if (prec != null && (prec > min_prec || (op === \"**\" && min_prec === prec))) {\n next();\n var right = expr_op(maybe_unary(true), prec, no_in);\n return expr_op(new AST_Binary({\n start : left.start,\n left : left,\n operator : op,\n right : right,\n end : right.end\n }), min_prec, no_in);\n }\n return left;\n };\n\n function expr_ops(no_in) {\n return expr_op(maybe_unary(true, true), 0, no_in);\n }\n\n var maybe_conditional = function(no_in) {\n var start = S.token;\n var expr = expr_ops(no_in);\n if (is(\"operator\", \"?\")) {\n next();\n var yes = expression(false);\n expect(\":\");\n return new AST_Conditional({\n start : start,\n condition : expr,\n consequent : yes,\n alternative : expression(false, no_in),\n end : prev()\n });\n }\n return expr;\n };\n\n function is_assignable(expr) {\n return expr instanceof AST_PropAccess || expr instanceof AST_SymbolRef;\n }\n\n function to_destructuring(node) {\n if (node instanceof AST_Object) {\n node = new AST_Destructuring({\n start: node.start,\n names: node.properties.map(to_destructuring),\n is_array: false,\n end: node.end\n });\n } else if (node instanceof AST_Array) {\n var names = [];\n\n for (var i = 0; i < node.elements.length; i++) {\n // Only allow expansion as last element\n if (node.elements[i] instanceof AST_Expansion) {\n if (i + 1 !== node.elements.length) {\n token_error(node.elements[i].start, \"Spread must the be last element in destructuring array\");\n }\n node.elements[i].expression = to_destructuring(node.elements[i].expression);\n }\n\n names.push(to_destructuring(node.elements[i]));\n }\n\n node = new AST_Destructuring({\n start: node.start,\n names: names,\n is_array: true,\n end: node.end\n });\n } else if (node instanceof AST_ObjectProperty) {\n node.value = to_destructuring(node.value);\n } else if (node instanceof AST_Assign) {\n node = new AST_DefaultAssign({\n start: node.start,\n left: node.left,\n operator: \"=\",\n right: node.right,\n end: node.end\n });\n }\n return node;\n }\n\n // In ES6, AssignmentExpression can also be an ArrowFunction\n var maybe_assign = function(no_in) {\n handle_regexp();\n var start = S.token;\n\n if (start.type == \"name\" && start.value == \"yield\") {\n if (is_in_generator()) {\n next();\n return _yield_expression();\n } else if (S.input.has_directive(\"use strict\")) {\n token_error(S.token, \"Unexpected yield identifier inside strict mode\");\n }\n }\n\n var left = maybe_conditional(no_in);\n var val = S.token.value;\n\n if (is(\"operator\") && ASSIGNMENT.has(val)) {\n if (is_assignable(left) || (left = to_destructuring(left)) instanceof AST_Destructuring) {\n next();\n return new AST_Assign({\n start : start,\n left : left,\n operator : val,\n right : maybe_assign(no_in),\n end : prev()\n });\n }\n croak(\"Invalid assignment\");\n }\n return left;\n };\n\n var expression = function(commas, no_in) {\n var start = S.token;\n var exprs = [];\n while (true) {\n exprs.push(maybe_assign(no_in));\n if (!commas || !is(\"punc\", \",\")) break;\n next();\n commas = true;\n }\n return exprs.length == 1 ? exprs[0] : new AST_Sequence({\n start : start,\n expressions : exprs,\n end : peek()\n });\n };\n\n function in_loop(cont) {\n ++S.in_loop;\n var ret = cont();\n --S.in_loop;\n return ret;\n }\n\n if (options.expression) {\n return expression(true);\n }\n\n return (function() {\n var start = S.token;\n var body = [];\n S.input.push_directives_stack();\n if (options.module) S.input.add_directive(\"use strict\");\n while (!is(\"eof\"))\n body.push(statement());\n S.input.pop_directives_stack();\n var end = prev();\n var toplevel = options.toplevel;\n if (toplevel) {\n toplevel.body = toplevel.body.concat(body);\n toplevel.end = end;\n } else {\n toplevel = new AST_Toplevel({ start: start, body: body, end: end });\n }\n return toplevel;\n })();\n\n}\n\nexport {\n get_full_char_code,\n get_full_char,\n is_identifier_char,\n is_identifier_string,\n is_surrogate_pair_head,\n is_surrogate_pair_tail,\n js_error,\n JS_Parse_Error,\n parse,\n PRECEDENCE,\n RESERVED_WORDS,\n tokenizer,\n};\n","/***********************************************************************\n\n A JavaScript tokenizer / parser / beautifier / compressor.\n https://github.com/mishoo/UglifyJS2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Mihai Bazon\n \n http://mihai.bazon.net/blog\n\n Distributed under the BSD license:\n\n Copyright 2012 (c) Mihai Bazon \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n ***********************************************************************/\n\n\"use strict\";\n\nimport {\n HOP,\n MAP,\n noop,\n string_template,\n} from \"./utils/index.js\";\nimport { parse } from \"./parse.js\";\n\nfunction DEFNODE(type, props, methods, base = AST_Node) {\n if (!props) props = [];\n else props = props.split(/\\s+/);\n var self_props = props;\n if (base && base.PROPS)\n props = props.concat(base.PROPS);\n var code = \"return function AST_\" + type + \"(props){ if (props) { \";\n for (var i = props.length; --i >= 0;) {\n code += \"this.\" + props[i] + \" = props.\" + props[i] + \";\";\n }\n const proto = base && Object.create(base.prototype);\n if (proto && proto.initialize || (methods && methods.initialize))\n code += \"this.initialize();\";\n code += \"}\";\n code += \"this.flags = 0;\";\n code += \"}\";\n var ctor = new Function(code)();\n if (proto) {\n ctor.prototype = proto;\n ctor.BASE = base;\n }\n if (base) base.SUBCLASSES.push(ctor);\n ctor.prototype.CTOR = ctor;\n ctor.PROPS = props || null;\n ctor.SELF_PROPS = self_props;\n ctor.SUBCLASSES = [];\n if (type) {\n ctor.prototype.TYPE = ctor.TYPE = type;\n }\n if (methods) for (i in methods) if (HOP(methods, i)) {\n if (i[0] === \"$\") {\n ctor[i.substr(1)] = methods[i];\n } else {\n ctor.prototype[i] = methods[i];\n }\n }\n ctor.DEFMETHOD = function(name, method) {\n this.prototype[name] = method;\n };\n return ctor;\n}\n\nvar AST_Token = DEFNODE(\"Token\", \"type value line col pos endline endcol endpos nlb comments_before comments_after file raw quote end\", {\n}, null);\n\nvar AST_Node = DEFNODE(\"Node\", \"start end\", {\n _clone: function(deep) {\n if (deep) {\n var self = this.clone();\n return self.transform(new TreeTransformer(function(node) {\n if (node !== self) {\n return node.clone(true);\n }\n }));\n }\n return new this.CTOR(this);\n },\n clone: function(deep) {\n return this._clone(deep);\n },\n $documentation: \"Base class of all AST nodes\",\n $propdoc: {\n start: \"[AST_Token] The first token of this node\",\n end: \"[AST_Token] The last token of this node\"\n },\n _walk: function(visitor) {\n return visitor._visit(this);\n },\n walk: function(visitor) {\n return this._walk(visitor); // not sure the indirection will be any help\n }\n}, null);\n\nAST_Node.warn_function = null;\nAST_Node.warn = function(txt, props) {\n if (AST_Node.warn_function)\n AST_Node.warn_function(string_template(txt, props));\n};\n\n/* -----[ statements ]----- */\n\nvar AST_Statement = DEFNODE(\"Statement\", null, {\n $documentation: \"Base class of all statements\",\n});\n\nvar AST_Debugger = DEFNODE(\"Debugger\", null, {\n $documentation: \"Represents a debugger statement\",\n}, AST_Statement);\n\nvar AST_Directive = DEFNODE(\"Directive\", \"value quote\", {\n $documentation: \"Represents a directive, like \\\"use strict\\\";\",\n $propdoc: {\n value: \"[string] The value of this directive as a plain string (it's not an AST_String!)\",\n quote: \"[string] the original quote character\"\n },\n}, AST_Statement);\n\nvar AST_SimpleStatement = DEFNODE(\"SimpleStatement\", \"body\", {\n $documentation: \"A statement consisting of an expression, i.e. a = 1 + 2\",\n $propdoc: {\n body: \"[AST_Node] an expression node (should not be instanceof AST_Statement)\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.body._walk(visitor);\n });\n }\n}, AST_Statement);\n\nfunction walk_body(node, visitor) {\n var body = node.body;\n if (body instanceof AST_Node) {\n body._walk(visitor);\n } else for (var i = 0, len = body.length; i < len; i++) {\n body[i]._walk(visitor);\n }\n}\n\nfunction clone_block_scope(deep) {\n var clone = this._clone(deep);\n if (this.block_scope) {\n // TODO this is sometimes undefined during compression.\n // But it should always have a value!\n clone.block_scope = this.block_scope.clone();\n }\n return clone;\n}\n\nvar AST_Block = DEFNODE(\"Block\", \"body block_scope\", {\n $documentation: \"A body of statements (usually braced)\",\n $propdoc: {\n body: \"[AST_Statement*] an array of statements\",\n block_scope: \"[AST_Scope] the block scope\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n walk_body(this, visitor);\n });\n },\n clone: clone_block_scope\n}, AST_Statement);\n\nvar AST_BlockStatement = DEFNODE(\"BlockStatement\", null, {\n $documentation: \"A block statement\",\n}, AST_Block);\n\nvar AST_EmptyStatement = DEFNODE(\"EmptyStatement\", null, {\n $documentation: \"The empty statement (empty block or simply a semicolon)\"\n}, AST_Statement);\n\nvar AST_StatementWithBody = DEFNODE(\"StatementWithBody\", \"body\", {\n $documentation: \"Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`\",\n $propdoc: {\n body: \"[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement\"\n }\n}, AST_Statement);\n\nvar AST_LabeledStatement = DEFNODE(\"LabeledStatement\", \"label\", {\n $documentation: \"Statement with a label\",\n $propdoc: {\n label: \"[AST_Label] a label definition\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.label._walk(visitor);\n this.body._walk(visitor);\n });\n },\n clone: function(deep) {\n var node = this._clone(deep);\n if (deep) {\n var label = node.label;\n var def = this.label;\n node.walk(new TreeWalker(function(node) {\n if (node instanceof AST_LoopControl\n && node.label && node.label.thedef === def) {\n node.label.thedef = label;\n label.references.push(node);\n }\n }));\n }\n return node;\n }\n}, AST_StatementWithBody);\n\nvar AST_IterationStatement = DEFNODE(\"IterationStatement\", \"block_scope\", {\n $documentation: \"Internal class. All loops inherit from it.\",\n $propdoc: {\n block_scope: \"[AST_Scope] the block scope for this iteration statement.\"\n },\n clone: clone_block_scope\n}, AST_StatementWithBody);\n\nvar AST_DWLoop = DEFNODE(\"DWLoop\", \"condition\", {\n $documentation: \"Base class for do/while statements\",\n $propdoc: {\n condition: \"[AST_Node] the loop condition. Should not be instanceof AST_Statement\"\n }\n}, AST_IterationStatement);\n\nvar AST_Do = DEFNODE(\"Do\", null, {\n $documentation: \"A `do` statement\",\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.body._walk(visitor);\n this.condition._walk(visitor);\n });\n }\n}, AST_DWLoop);\n\nvar AST_While = DEFNODE(\"While\", null, {\n $documentation: \"A `while` statement\",\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.condition._walk(visitor);\n this.body._walk(visitor);\n });\n }\n}, AST_DWLoop);\n\nvar AST_For = DEFNODE(\"For\", \"init condition step\", {\n $documentation: \"A `for` statement\",\n $propdoc: {\n init: \"[AST_Node?] the `for` initialization code, or null if empty\",\n condition: \"[AST_Node?] the `for` termination clause, or null if empty\",\n step: \"[AST_Node?] the `for` update clause, or null if empty\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n if (this.init) this.init._walk(visitor);\n if (this.condition) this.condition._walk(visitor);\n if (this.step) this.step._walk(visitor);\n this.body._walk(visitor);\n });\n }\n}, AST_IterationStatement);\n\nvar AST_ForIn = DEFNODE(\"ForIn\", \"init object\", {\n $documentation: \"A `for ... in` statement\",\n $propdoc: {\n init: \"[AST_Node] the `for/in` initialization code\",\n object: \"[AST_Node] the object that we're looping through\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.init._walk(visitor);\n this.object._walk(visitor);\n this.body._walk(visitor);\n });\n }\n}, AST_IterationStatement);\n\nvar AST_ForOf = DEFNODE(\"ForOf\", \"await\", {\n $documentation: \"A `for ... of` statement\",\n}, AST_ForIn);\n\nvar AST_With = DEFNODE(\"With\", \"expression\", {\n $documentation: \"A `with` statement\",\n $propdoc: {\n expression: \"[AST_Node] the `with` expression\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.expression._walk(visitor);\n this.body._walk(visitor);\n });\n }\n}, AST_StatementWithBody);\n\n/* -----[ scope and functions ]----- */\n\nvar AST_Scope = DEFNODE(\"Scope\", \"variables functions uses_with uses_eval parent_scope enclosed cname _var_name_cache\", {\n $documentation: \"Base class for all statements introducing a lexical scope\",\n $propdoc: {\n variables: \"[Map/S] a map of name -> SymbolDef for all variables/functions defined in this scope\",\n functions: \"[Map/S] like `variables`, but only lists function declarations\",\n uses_with: \"[boolean/S] tells whether this scope uses the `with` statement\",\n uses_eval: \"[boolean/S] tells whether this scope contains a direct call to the global `eval`\",\n parent_scope: \"[AST_Scope?/S] link to the parent scope\",\n enclosed: \"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes\",\n cname: \"[integer/S] current index for mangling variables (used internally by the mangler)\",\n },\n get_defun_scope: function() {\n var self = this;\n while (self.is_block_scope()) {\n self = self.parent_scope;\n }\n return self;\n },\n clone: function(deep) {\n var node = this._clone(deep);\n if (this.variables) node.variables = new Map(this.variables);\n if (this.functions) node.functions = new Map(this.functions);\n if (this.enclosed) node.enclosed = this.enclosed.slice();\n return node;\n },\n pinned: function() {\n return this.uses_eval || this.uses_with;\n }\n}, AST_Block);\n\nvar AST_Toplevel = DEFNODE(\"Toplevel\", \"globals\", {\n $documentation: \"The toplevel scope\",\n $propdoc: {\n globals: \"[Map/S] a map of name -> SymbolDef for all undeclared names\",\n },\n wrap_commonjs: function(name) {\n var body = this.body;\n var wrapped_tl = \"(function(exports){'$ORIG';})(typeof \" + name + \"=='undefined'?(\" + name + \"={}):\" + name + \");\";\n wrapped_tl = parse(wrapped_tl);\n wrapped_tl = wrapped_tl.transform(new TreeTransformer(function(node) {\n if (node instanceof AST_Directive && node.value == \"$ORIG\") {\n return MAP.splice(body);\n }\n }));\n return wrapped_tl;\n },\n wrap_enclose: function(args_values) {\n if (typeof args_values != \"string\") args_values = \"\";\n var index = args_values.indexOf(\":\");\n if (index < 0) index = args_values.length;\n var body = this.body;\n return parse([\n \"(function(\",\n args_values.slice(0, index),\n '){\"$ORIG\"})(',\n args_values.slice(index + 1),\n \")\"\n ].join(\"\")).transform(new TreeTransformer(function(node) {\n if (node instanceof AST_Directive && node.value == \"$ORIG\") {\n return MAP.splice(body);\n }\n }));\n }\n}, AST_Scope);\n\nvar AST_Expansion = DEFNODE(\"Expansion\", \"expression\", {\n $documentation: \"An expandible argument, such as ...rest, a splat, such as [1,2,...all], or an expansion in a variable declaration, such as var [first, ...rest] = list\",\n $propdoc: {\n expression: \"[AST_Node] the thing to be expanded\"\n },\n _walk: function(visitor) {\n var self = this;\n return visitor._visit(this, function() {\n self.expression.walk(visitor);\n });\n }\n});\n\nvar AST_Lambda = DEFNODE(\"Lambda\", \"name argnames uses_arguments is_generator async\", {\n $documentation: \"Base class for functions\",\n $propdoc: {\n name: \"[AST_SymbolDeclaration?] the name of this function\",\n argnames: \"[AST_SymbolFunarg|AST_Destructuring|AST_Expansion|AST_DefaultAssign*] array of function arguments, destructurings, or expanding arguments\",\n uses_arguments: \"[boolean/S] tells whether this function accesses the arguments array\",\n is_generator: \"[boolean] is this a generator method\",\n async: \"[boolean] is this method async\",\n },\n args_as_names: function () {\n var out = [];\n for (var i = 0; i < this.argnames.length; i++) {\n if (this.argnames[i] instanceof AST_Destructuring) {\n out.push(...this.argnames[i].all_symbols());\n } else {\n out.push(this.argnames[i]);\n }\n }\n return out;\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n if (this.name) this.name._walk(visitor);\n var argnames = this.argnames;\n for (var i = 0, len = argnames.length; i < len; i++) {\n argnames[i]._walk(visitor);\n }\n walk_body(this, visitor);\n });\n }\n}, AST_Scope);\n\nvar AST_Accessor = DEFNODE(\"Accessor\", null, {\n $documentation: \"A setter/getter function. The `name` property is always null.\"\n}, AST_Lambda);\n\nvar AST_Function = DEFNODE(\"Function\", null, {\n $documentation: \"A function expression\"\n}, AST_Lambda);\n\nvar AST_Arrow = DEFNODE(\"Arrow\", null, {\n $documentation: \"An ES6 Arrow function ((a) => b)\"\n}, AST_Lambda);\n\nvar AST_Defun = DEFNODE(\"Defun\", null, {\n $documentation: \"A function definition\"\n}, AST_Lambda);\n\n/* -----[ DESTRUCTURING ]----- */\nvar AST_Destructuring = DEFNODE(\"Destructuring\", \"names is_array\", {\n $documentation: \"A destructuring of several names. Used in destructuring assignment and with destructuring function argument names\",\n $propdoc: {\n \"names\": \"[AST_Node*] Array of properties or elements\",\n \"is_array\": \"[Boolean] Whether the destructuring represents an object or array\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.names.forEach(function(name) {\n name._walk(visitor);\n });\n });\n },\n all_symbols: function() {\n var out = [];\n this.walk(new TreeWalker(function (node) {\n if (node instanceof AST_Symbol) {\n out.push(node);\n }\n }));\n return out;\n }\n});\n\nvar AST_PrefixedTemplateString = DEFNODE(\"PrefixedTemplateString\", \"template_string prefix\", {\n $documentation: \"A templatestring with a prefix, such as String.raw`foobarbaz`\",\n $propdoc: {\n template_string: \"[AST_TemplateString] The template string\",\n prefix: \"[AST_SymbolRef|AST_PropAccess] The prefix, which can be a symbol such as `foo` or a dotted expression such as `String.raw`.\"\n },\n _walk: function(visitor) {\n this.prefix._walk(visitor);\n this.template_string._walk(visitor);\n }\n});\n\nvar AST_TemplateString = DEFNODE(\"TemplateString\", \"segments\", {\n $documentation: \"A template string literal\",\n $propdoc: {\n segments: \"[AST_Node*] One or more segments, starting with AST_TemplateSegment. AST_Node may follow AST_TemplateSegment, but each AST_Node must be followed by AST_TemplateSegment.\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.segments.forEach(function(seg) {\n seg._walk(visitor);\n });\n });\n }\n});\n\nvar AST_TemplateSegment = DEFNODE(\"TemplateSegment\", \"value raw\", {\n $documentation: \"A segment of a template string literal\",\n $propdoc: {\n value: \"Content of the segment\",\n raw: \"Raw content of the segment\"\n }\n});\n\n/* -----[ JUMPS ]----- */\n\nvar AST_Jump = DEFNODE(\"Jump\", null, {\n $documentation: \"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)\"\n}, AST_Statement);\n\nvar AST_Exit = DEFNODE(\"Exit\", \"value\", {\n $documentation: \"Base class for “exits” (`return` and `throw`)\",\n $propdoc: {\n value: \"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, this.value && function() {\n this.value._walk(visitor);\n });\n }\n}, AST_Jump);\n\nvar AST_Return = DEFNODE(\"Return\", null, {\n $documentation: \"A `return` statement\"\n}, AST_Exit);\n\nvar AST_Throw = DEFNODE(\"Throw\", null, {\n $documentation: \"A `throw` statement\"\n}, AST_Exit);\n\nvar AST_LoopControl = DEFNODE(\"LoopControl\", \"label\", {\n $documentation: \"Base class for loop control statements (`break` and `continue`)\",\n $propdoc: {\n label: \"[AST_LabelRef?] the label, or null if none\",\n },\n _walk: function(visitor) {\n return visitor._visit(this, this.label && function() {\n this.label._walk(visitor);\n });\n }\n}, AST_Jump);\n\nvar AST_Break = DEFNODE(\"Break\", null, {\n $documentation: \"A `break` statement\"\n}, AST_LoopControl);\n\nvar AST_Continue = DEFNODE(\"Continue\", null, {\n $documentation: \"A `continue` statement\"\n}, AST_LoopControl);\n\n/* -----[ IF ]----- */\n\nvar AST_If = DEFNODE(\"If\", \"condition alternative\", {\n $documentation: \"A `if` statement\",\n $propdoc: {\n condition: \"[AST_Node] the `if` condition\",\n alternative: \"[AST_Statement?] the `else` part, or null if not present\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.condition._walk(visitor);\n this.body._walk(visitor);\n if (this.alternative) this.alternative._walk(visitor);\n });\n }\n}, AST_StatementWithBody);\n\n/* -----[ SWITCH ]----- */\n\nvar AST_Switch = DEFNODE(\"Switch\", \"expression\", {\n $documentation: \"A `switch` statement\",\n $propdoc: {\n expression: \"[AST_Node] the `switch` “discriminant”\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.expression._walk(visitor);\n walk_body(this, visitor);\n });\n }\n}, AST_Block);\n\nvar AST_SwitchBranch = DEFNODE(\"SwitchBranch\", null, {\n $documentation: \"Base class for `switch` branches\",\n}, AST_Block);\n\nvar AST_Default = DEFNODE(\"Default\", null, {\n $documentation: \"A `default` switch branch\",\n}, AST_SwitchBranch);\n\nvar AST_Case = DEFNODE(\"Case\", \"expression\", {\n $documentation: \"A `case` switch branch\",\n $propdoc: {\n expression: \"[AST_Node] the `case` expression\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.expression._walk(visitor);\n walk_body(this, visitor);\n });\n }\n}, AST_SwitchBranch);\n\n/* -----[ EXCEPTIONS ]----- */\n\nvar AST_Try = DEFNODE(\"Try\", \"bcatch bfinally\", {\n $documentation: \"A `try` statement\",\n $propdoc: {\n bcatch: \"[AST_Catch?] the catch block, or null if not present\",\n bfinally: \"[AST_Finally?] the finally block, or null if not present\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n walk_body(this, visitor);\n if (this.bcatch) this.bcatch._walk(visitor);\n if (this.bfinally) this.bfinally._walk(visitor);\n });\n }\n}, AST_Block);\n\nvar AST_Catch = DEFNODE(\"Catch\", \"argname\", {\n $documentation: \"A `catch` node; only makes sense as part of a `try` statement\",\n $propdoc: {\n argname: \"[AST_SymbolCatch|AST_Destructuring|AST_Expansion|AST_DefaultAssign] symbol for the exception\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n if (this.argname) this.argname._walk(visitor);\n walk_body(this, visitor);\n });\n }\n}, AST_Block);\n\nvar AST_Finally = DEFNODE(\"Finally\", null, {\n $documentation: \"A `finally` node; only makes sense as part of a `try` statement\"\n}, AST_Block);\n\n/* -----[ VAR/CONST ]----- */\n\nvar AST_Definitions = DEFNODE(\"Definitions\", \"definitions\", {\n $documentation: \"Base class for `var` or `const` nodes (variable declarations/initializations)\",\n $propdoc: {\n definitions: \"[AST_VarDef*] array of variable definitions\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n var definitions = this.definitions;\n for (var i = 0, len = definitions.length; i < len; i++) {\n definitions[i]._walk(visitor);\n }\n });\n }\n}, AST_Statement);\n\nvar AST_Var = DEFNODE(\"Var\", null, {\n $documentation: \"A `var` statement\"\n}, AST_Definitions);\n\nvar AST_Let = DEFNODE(\"Let\", null, {\n $documentation: \"A `let` statement\"\n}, AST_Definitions);\n\nvar AST_Const = DEFNODE(\"Const\", null, {\n $documentation: \"A `const` statement\"\n}, AST_Definitions);\n\nvar AST_NameMapping = DEFNODE(\"NameMapping\", \"foreign_name name\", {\n $documentation: \"The part of the export/import statement that declare names from a module.\",\n $propdoc: {\n foreign_name: \"[AST_SymbolExportForeign|AST_SymbolImportForeign] The name being exported/imported (as specified in the module)\",\n name: \"[AST_SymbolExport|AST_SymbolImport] The name as it is visible to this module.\"\n },\n _walk: function (visitor) {\n return visitor._visit(this, function() {\n this.foreign_name._walk(visitor);\n this.name._walk(visitor);\n });\n }\n});\n\nvar AST_Import = DEFNODE(\"Import\", \"imported_name imported_names module_name\", {\n $documentation: \"An `import` statement\",\n $propdoc: {\n imported_name: \"[AST_SymbolImport] The name of the variable holding the module's default export.\",\n imported_names: \"[AST_NameMapping*] The names of non-default imported variables\",\n module_name: \"[AST_String] String literal describing where this module came from\",\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n if (this.imported_name) {\n this.imported_name._walk(visitor);\n }\n if (this.imported_names) {\n this.imported_names.forEach(function(name_import) {\n name_import._walk(visitor);\n });\n }\n this.module_name._walk(visitor);\n });\n }\n});\n\nvar AST_Export = DEFNODE(\"Export\", \"exported_definition exported_value is_default exported_names module_name\", {\n $documentation: \"An `export` statement\",\n $propdoc: {\n exported_definition: \"[AST_Defun|AST_Definitions|AST_DefClass?] An exported definition\",\n exported_value: \"[AST_Node?] An exported value\",\n exported_names: \"[AST_NameMapping*?] List of exported names\",\n module_name: \"[AST_String?] Name of the file to load exports from\",\n is_default: \"[Boolean] Whether this is the default exported value of this module\"\n },\n _walk: function (visitor) {\n visitor._visit(this, function () {\n if (this.exported_definition) {\n this.exported_definition._walk(visitor);\n }\n if (this.exported_value) {\n this.exported_value._walk(visitor);\n }\n if (this.exported_names) {\n this.exported_names.forEach(function(name_export) {\n name_export._walk(visitor);\n });\n }\n if (this.module_name) {\n this.module_name._walk(visitor);\n }\n });\n }\n}, AST_Statement);\n\nvar AST_VarDef = DEFNODE(\"VarDef\", \"name value\", {\n $documentation: \"A variable declaration; only appears in a AST_Definitions node\",\n $propdoc: {\n name: \"[AST_Destructuring|AST_SymbolConst|AST_SymbolLet|AST_SymbolVar] name of the variable\",\n value: \"[AST_Node?] initializer, or null of there's no initializer\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.name._walk(visitor);\n if (this.value) this.value._walk(visitor);\n });\n }\n});\n\n/* -----[ OTHER ]----- */\n\nvar AST_Call = DEFNODE(\"Call\", \"expression args _annotations\", {\n $documentation: \"A function call expression\",\n $propdoc: {\n expression: \"[AST_Node] expression to invoke as function\",\n args: \"[AST_Node*] array of arguments\",\n _annotations: \"[number] bitfield containing information about the call\"\n },\n initialize() {\n if (this._annotations == null) this._annotations = 0;\n },\n _walk(visitor) {\n return visitor._visit(this, function() {\n var args = this.args;\n for (var i = 0, len = args.length; i < len; i++) {\n args[i]._walk(visitor);\n }\n this.expression._walk(visitor);\n });\n }\n});\n\nvar AST_New = DEFNODE(\"New\", null, {\n $documentation: \"An object instantiation. Derives from a function call since it has exactly the same properties\"\n}, AST_Call);\n\nvar AST_Sequence = DEFNODE(\"Sequence\", \"expressions\", {\n $documentation: \"A sequence expression (comma-separated expressions)\",\n $propdoc: {\n expressions: \"[AST_Node*] array of expressions (at least two)\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.expressions.forEach(function(node) {\n node._walk(visitor);\n });\n });\n }\n});\n\nvar AST_PropAccess = DEFNODE(\"PropAccess\", \"expression property\", {\n $documentation: \"Base class for property access expressions, i.e. `a.foo` or `a[\\\"foo\\\"]`\",\n $propdoc: {\n expression: \"[AST_Node] the “container” expression\",\n property: \"[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node\"\n }\n});\n\nvar AST_Dot = DEFNODE(\"Dot\", \"quote\", {\n $documentation: \"A dotted property access expression\",\n $propdoc: {\n quote: \"[string] the original quote character when transformed from AST_Sub\",\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.expression._walk(visitor);\n });\n }\n}, AST_PropAccess);\n\nvar AST_Sub = DEFNODE(\"Sub\", null, {\n $documentation: \"Index-style property access, i.e. `a[\\\"foo\\\"]`\",\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.expression._walk(visitor);\n this.property._walk(visitor);\n });\n }\n}, AST_PropAccess);\n\nvar AST_Unary = DEFNODE(\"Unary\", \"operator expression\", {\n $documentation: \"Base class for unary expressions\",\n $propdoc: {\n operator: \"[string] the operator\",\n expression: \"[AST_Node] expression that this unary operator applies to\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.expression._walk(visitor);\n });\n }\n});\n\nvar AST_UnaryPrefix = DEFNODE(\"UnaryPrefix\", null, {\n $documentation: \"Unary prefix expression, i.e. `typeof i` or `++i`\"\n}, AST_Unary);\n\nvar AST_UnaryPostfix = DEFNODE(\"UnaryPostfix\", null, {\n $documentation: \"Unary postfix expression, i.e. `i++`\"\n}, AST_Unary);\n\nvar AST_Binary = DEFNODE(\"Binary\", \"operator left right\", {\n $documentation: \"Binary expression, i.e. `a + b`\",\n $propdoc: {\n left: \"[AST_Node] left-hand side expression\",\n operator: \"[string] the operator\",\n right: \"[AST_Node] right-hand side expression\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.left._walk(visitor);\n this.right._walk(visitor);\n });\n }\n});\n\nvar AST_Conditional = DEFNODE(\"Conditional\", \"condition consequent alternative\", {\n $documentation: \"Conditional expression using the ternary operator, i.e. `a ? b : c`\",\n $propdoc: {\n condition: \"[AST_Node]\",\n consequent: \"[AST_Node]\",\n alternative: \"[AST_Node]\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.condition._walk(visitor);\n this.consequent._walk(visitor);\n this.alternative._walk(visitor);\n });\n }\n});\n\nvar AST_Assign = DEFNODE(\"Assign\", null, {\n $documentation: \"An assignment expression — `a = b + 5`\",\n}, AST_Binary);\n\nvar AST_DefaultAssign = DEFNODE(\"DefaultAssign\", null, {\n $documentation: \"A default assignment expression like in `(a = 3) => a`\"\n}, AST_Binary);\n\n/* -----[ LITERALS ]----- */\n\nvar AST_Array = DEFNODE(\"Array\", \"elements\", {\n $documentation: \"An array literal\",\n $propdoc: {\n elements: \"[AST_Node*] array of elements\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n var elements = this.elements;\n for (var i = 0, len = elements.length; i < len; i++) {\n elements[i]._walk(visitor);\n }\n });\n }\n});\n\nvar AST_Object = DEFNODE(\"Object\", \"properties\", {\n $documentation: \"An object literal\",\n $propdoc: {\n properties: \"[AST_ObjectProperty*] array of properties\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n var properties = this.properties;\n for (var i = 0, len = properties.length; i < len; i++) {\n properties[i]._walk(visitor);\n }\n });\n }\n});\n\nvar AST_ObjectProperty = DEFNODE(\"ObjectProperty\", \"key value\", {\n $documentation: \"Base class for literal object properties\",\n $propdoc: {\n key: \"[string|AST_Node] property name. For ObjectKeyVal this is a string. For getters, setters and computed property this is an AST_Node.\",\n value: \"[AST_Node] property value. For getters and setters this is an AST_Accessor.\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n if (this.key instanceof AST_Node)\n this.key._walk(visitor);\n this.value._walk(visitor);\n });\n }\n});\n\nvar AST_ObjectKeyVal = DEFNODE(\"ObjectKeyVal\", \"quote\", {\n $documentation: \"A key: value object property\",\n $propdoc: {\n quote: \"[string] the original quote character\"\n }\n}, AST_ObjectProperty);\n\nvar AST_ObjectSetter = DEFNODE(\"ObjectSetter\", \"quote static\", {\n $propdoc: {\n quote: \"[string|undefined] the original quote character, if any\",\n static: \"[boolean] whether this is a static setter (classes only)\"\n },\n $documentation: \"An object setter property\",\n}, AST_ObjectProperty);\n\nvar AST_ObjectGetter = DEFNODE(\"ObjectGetter\", \"quote static\", {\n $propdoc: {\n quote: \"[string|undefined] the original quote character, if any\",\n static: \"[boolean] whether this is a static getter (classes only)\"\n },\n $documentation: \"An object getter property\",\n}, AST_ObjectProperty);\n\nvar AST_ConciseMethod = DEFNODE(\"ConciseMethod\", \"quote static is_generator async\", {\n $propdoc: {\n quote: \"[string|undefined] the original quote character, if any\",\n static: \"[boolean] is this method static (classes only)\",\n is_generator: \"[boolean] is this a generator method\",\n async: \"[boolean] is this method async\",\n },\n $documentation: \"An ES6 concise method inside an object or class\"\n}, AST_ObjectProperty);\n\nvar AST_Class = DEFNODE(\"Class\", \"name extends properties\", {\n $propdoc: {\n name: \"[AST_SymbolClass|AST_SymbolDefClass?] optional class name.\",\n extends: \"[AST_Node]? optional parent class\",\n properties: \"[AST_ObjectProperty*] array of properties\"\n },\n $documentation: \"An ES6 class\",\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n if (this.name) {\n this.name._walk(visitor);\n }\n if (this.extends) {\n this.extends._walk(visitor);\n }\n this.properties.forEach((prop) => prop._walk(visitor));\n });\n },\n}, AST_Scope /* TODO a class might have a scope but it's not a scope */);\n\nvar AST_DefClass = DEFNODE(\"DefClass\", null, {\n $documentation: \"A class definition\",\n}, AST_Class);\n\nvar AST_ClassExpression = DEFNODE(\"ClassExpression\", null, {\n $documentation: \"A class expression.\"\n}, AST_Class);\n\nvar AST_Symbol = DEFNODE(\"Symbol\", \"scope name thedef\", {\n $propdoc: {\n name: \"[string] name of this symbol\",\n scope: \"[AST_Scope/S] the current scope (not necessarily the definition scope)\",\n thedef: \"[SymbolDef/S] the definition of this symbol\"\n },\n $documentation: \"Base class for all symbols\"\n});\n\nvar AST_NewTarget = DEFNODE(\"NewTarget\", null, {\n $documentation: \"A reference to new.target\"\n});\n\nvar AST_SymbolDeclaration = DEFNODE(\"SymbolDeclaration\", \"init\", {\n $documentation: \"A declaration symbol (symbol in var/const, function name or argument, symbol in catch)\",\n}, AST_Symbol);\n\nvar AST_SymbolVar = DEFNODE(\"SymbolVar\", null, {\n $documentation: \"Symbol defining a variable\",\n}, AST_SymbolDeclaration);\n\nvar AST_SymbolBlockDeclaration = DEFNODE(\"SymbolBlockDeclaration\", null, {\n $documentation: \"Base class for block-scoped declaration symbols\"\n}, AST_SymbolDeclaration);\n\nvar AST_SymbolConst = DEFNODE(\"SymbolConst\", null, {\n $documentation: \"A constant declaration\"\n}, AST_SymbolBlockDeclaration);\n\nvar AST_SymbolLet = DEFNODE(\"SymbolLet\", null, {\n $documentation: \"A block-scoped `let` declaration\"\n}, AST_SymbolBlockDeclaration);\n\nvar AST_SymbolFunarg = DEFNODE(\"SymbolFunarg\", null, {\n $documentation: \"Symbol naming a function argument\",\n}, AST_SymbolVar);\n\nvar AST_SymbolDefun = DEFNODE(\"SymbolDefun\", null, {\n $documentation: \"Symbol defining a function\",\n}, AST_SymbolDeclaration);\n\nvar AST_SymbolMethod = DEFNODE(\"SymbolMethod\", null, {\n $documentation: \"Symbol in an object defining a method\",\n}, AST_Symbol);\n\nvar AST_SymbolLambda = DEFNODE(\"SymbolLambda\", null, {\n $documentation: \"Symbol naming a function expression\",\n}, AST_SymbolDeclaration);\n\nvar AST_SymbolDefClass = DEFNODE(\"SymbolDefClass\", null, {\n $documentation: \"Symbol naming a class's name in a class declaration. Lexically scoped to its containing scope, and accessible within the class.\"\n}, AST_SymbolBlockDeclaration);\n\nvar AST_SymbolClass = DEFNODE(\"SymbolClass\", null, {\n $documentation: \"Symbol naming a class's name. Lexically scoped to the class.\"\n}, AST_SymbolDeclaration);\n\nvar AST_SymbolCatch = DEFNODE(\"SymbolCatch\", null, {\n $documentation: \"Symbol naming the exception in catch\",\n}, AST_SymbolBlockDeclaration);\n\nvar AST_SymbolImport = DEFNODE(\"SymbolImport\", null, {\n $documentation: \"Symbol referring to an imported name\",\n}, AST_SymbolBlockDeclaration);\n\nvar AST_SymbolImportForeign = DEFNODE(\"SymbolImportForeign\", null, {\n $documentation: \"A symbol imported from a module, but it is defined in the other module, and its real name is irrelevant for this module's purposes\",\n}, AST_Symbol);\n\nvar AST_Label = DEFNODE(\"Label\", \"references\", {\n $documentation: \"Symbol naming a label (declaration)\",\n $propdoc: {\n references: \"[AST_LoopControl*] a list of nodes referring to this label\"\n },\n initialize: function() {\n this.references = [];\n this.thedef = this;\n }\n}, AST_Symbol);\n\nvar AST_SymbolRef = DEFNODE(\"SymbolRef\", null, {\n $documentation: \"Reference to some symbol (not definition/declaration)\",\n}, AST_Symbol);\n\nvar AST_SymbolExport = DEFNODE(\"SymbolExport\", null, {\n $documentation: \"Symbol referring to a name to export\",\n}, AST_SymbolRef);\n\nvar AST_SymbolExportForeign = DEFNODE(\"SymbolExportForeign\", null, {\n $documentation: \"A symbol exported from this module, but it is used in the other module, and its real name is irrelevant for this module's purposes\",\n}, AST_Symbol);\n\nvar AST_LabelRef = DEFNODE(\"LabelRef\", null, {\n $documentation: \"Reference to a label symbol\",\n}, AST_Symbol);\n\nvar AST_This = DEFNODE(\"This\", null, {\n $documentation: \"The `this` symbol\",\n}, AST_Symbol);\n\nvar AST_Super = DEFNODE(\"Super\", null, {\n $documentation: \"The `super` symbol\",\n}, AST_This);\n\nvar AST_Constant = DEFNODE(\"Constant\", null, {\n $documentation: \"Base class for all constants\",\n getValue: function() {\n return this.value;\n }\n});\n\nvar AST_String = DEFNODE(\"String\", \"value quote\", {\n $documentation: \"A string literal\",\n $propdoc: {\n value: \"[string] the contents of this string\",\n quote: \"[string] the original quote character\"\n }\n}, AST_Constant);\n\nvar AST_Number = DEFNODE(\"Number\", \"value literal\", {\n $documentation: \"A number literal\",\n $propdoc: {\n value: \"[number] the numeric value\",\n literal: \"[string] numeric value as string (optional)\"\n }\n}, AST_Constant);\n\nvar AST_BigInt = DEFNODE(\"BigInt\", \"value\", {\n $documentation: \"A big int literal\",\n $propdoc: {\n value: \"[string] big int value\"\n }\n}, AST_Constant);\n\nvar AST_RegExp = DEFNODE(\"RegExp\", \"value\", {\n $documentation: \"A regexp literal\",\n $propdoc: {\n value: \"[RegExp] the actual regexp\",\n }\n}, AST_Constant);\n\nvar AST_Atom = DEFNODE(\"Atom\", null, {\n $documentation: \"Base class for atoms\",\n}, AST_Constant);\n\nvar AST_Null = DEFNODE(\"Null\", null, {\n $documentation: \"The `null` atom\",\n value: null\n}, AST_Atom);\n\nvar AST_NaN = DEFNODE(\"NaN\", null, {\n $documentation: \"The impossible value\",\n value: 0/0\n}, AST_Atom);\n\nvar AST_Undefined = DEFNODE(\"Undefined\", null, {\n $documentation: \"The `undefined` value\",\n value: (function() {}())\n}, AST_Atom);\n\nvar AST_Hole = DEFNODE(\"Hole\", null, {\n $documentation: \"A hole in an array\",\n value: (function() {}())\n}, AST_Atom);\n\nvar AST_Infinity = DEFNODE(\"Infinity\", null, {\n $documentation: \"The `Infinity` value\",\n value: 1/0\n}, AST_Atom);\n\nvar AST_Boolean = DEFNODE(\"Boolean\", null, {\n $documentation: \"Base class for booleans\",\n}, AST_Atom);\n\nvar AST_False = DEFNODE(\"False\", null, {\n $documentation: \"The `false` atom\",\n value: false\n}, AST_Boolean);\n\nvar AST_True = DEFNODE(\"True\", null, {\n $documentation: \"The `true` atom\",\n value: true\n}, AST_Boolean);\n\nvar AST_Await = DEFNODE(\"Await\", \"expression\", {\n $documentation: \"An `await` statement\",\n $propdoc: {\n expression: \"[AST_Node] the mandatory expression being awaited\",\n },\n _walk: function(visitor) {\n return visitor._visit(this, function() {\n this.expression._walk(visitor);\n });\n }\n});\n\nvar AST_Yield = DEFNODE(\"Yield\", \"expression is_star\", {\n $documentation: \"A `yield` statement\",\n $propdoc: {\n expression: \"[AST_Node?] the value returned or thrown by this statement; could be null (representing undefined) but only when is_star is set to false\",\n is_star: \"[Boolean] Whether this is a yield or yield* statement\"\n },\n _walk: function(visitor) {\n return visitor._visit(this, this.expression && function() {\n this.expression._walk(visitor);\n });\n }\n});\n\n/* -----[ TreeWalker ]----- */\n\nclass TreeWalker {\n constructor(callback) {\n this.visit = callback;\n this.stack = [];\n this.directives = Object.create(null);\n }\n\n _visit(node, descend) {\n this.push(node);\n var ret = this.visit(node, descend ? function() {\n descend.call(node);\n } : noop);\n if (!ret && descend) {\n descend.call(node);\n }\n this.pop();\n return ret;\n }\n\n parent(n) {\n return this.stack[this.stack.length - 2 - (n || 0)];\n }\n\n push(node) {\n if (node instanceof AST_Lambda) {\n this.directives = Object.create(this.directives);\n } else if (node instanceof AST_Directive && !this.directives[node.value]) {\n this.directives[node.value] = node;\n } else if (node instanceof AST_Class) {\n this.directives = Object.create(this.directives);\n if (!this.directives[\"use strict\"]) {\n this.directives[\"use strict\"] = node;\n }\n }\n this.stack.push(node);\n }\n\n pop() {\n var node = this.stack.pop();\n if (node instanceof AST_Lambda || node instanceof AST_Class) {\n this.directives = Object.getPrototypeOf(this.directives);\n }\n }\n\n self() {\n return this.stack[this.stack.length - 1];\n }\n\n find_parent(type) {\n var stack = this.stack;\n for (var i = stack.length; --i >= 0;) {\n var x = stack[i];\n if (x instanceof type) return x;\n }\n }\n\n has_directive(type) {\n var dir = this.directives[type];\n if (dir) return dir;\n var node = this.stack[this.stack.length - 1];\n if (node instanceof AST_Scope && node.body) {\n for (var i = 0; i < node.body.length; ++i) {\n var st = node.body[i];\n if (!(st instanceof AST_Directive)) break;\n if (st.value == type) return st;\n }\n }\n }\n\n loopcontrol_target(node) {\n var stack = this.stack;\n if (node.label) for (var i = stack.length; --i >= 0;) {\n var x = stack[i];\n if (x instanceof AST_LabeledStatement && x.label.name == node.label.name)\n return x.body;\n } else for (var i = stack.length; --i >= 0;) {\n var x = stack[i];\n if (x instanceof AST_IterationStatement\n || node instanceof AST_Break && x instanceof AST_Switch)\n return x;\n }\n }\n}\n\n// Tree transformer helpers.\nclass TreeTransformer extends TreeWalker {\n constructor(before, after) {\n super();\n this.before = before;\n this.after = after;\n }\n}\n\nconst _PURE = 0b00000001;\nconst _INLINE = 0b00000010;\nconst _NOINLINE = 0b00000100;\n\nexport {\n AST_Accessor,\n AST_Array,\n AST_Arrow,\n AST_Assign,\n AST_Atom,\n AST_Await,\n AST_BigInt,\n AST_Binary,\n AST_Block,\n AST_BlockStatement,\n AST_Boolean,\n AST_Break,\n AST_Call,\n AST_Case,\n AST_Catch,\n AST_Class,\n AST_ClassExpression,\n AST_ConciseMethod,\n AST_Conditional,\n AST_Const,\n AST_Constant,\n AST_Continue,\n AST_Debugger,\n AST_Default,\n AST_DefaultAssign,\n AST_DefClass,\n AST_Definitions,\n AST_Defun,\n AST_Destructuring,\n AST_Directive,\n AST_Do,\n AST_Dot,\n AST_DWLoop,\n AST_EmptyStatement,\n AST_Exit,\n AST_Expansion,\n AST_Export,\n AST_False,\n AST_Finally,\n AST_For,\n AST_ForIn,\n AST_ForOf,\n AST_Function,\n AST_Hole,\n AST_If,\n AST_Import,\n AST_Infinity,\n AST_IterationStatement,\n AST_Jump,\n AST_Label,\n AST_LabeledStatement,\n AST_LabelRef,\n AST_Lambda,\n AST_Let,\n AST_LoopControl,\n AST_NameMapping,\n AST_NaN,\n AST_New,\n AST_NewTarget,\n AST_Node,\n AST_Null,\n AST_Number,\n AST_Object,\n AST_ObjectGetter,\n AST_ObjectKeyVal,\n AST_ObjectProperty,\n AST_ObjectSetter,\n AST_PrefixedTemplateString,\n AST_PropAccess,\n AST_RegExp,\n AST_Return,\n AST_Scope,\n AST_Sequence,\n AST_SimpleStatement,\n AST_Statement,\n AST_StatementWithBody,\n AST_String,\n AST_Sub,\n AST_Super,\n AST_Switch,\n AST_SwitchBranch,\n AST_Symbol,\n AST_SymbolBlockDeclaration,\n AST_SymbolCatch,\n AST_SymbolClass,\n AST_SymbolConst,\n AST_SymbolDeclaration,\n AST_SymbolDefClass,\n AST_SymbolDefun,\n AST_SymbolExport,\n AST_SymbolExportForeign,\n AST_SymbolFunarg,\n AST_SymbolImport,\n AST_SymbolImportForeign,\n AST_SymbolLambda,\n AST_SymbolLet,\n AST_SymbolMethod,\n AST_SymbolRef,\n AST_SymbolVar,\n AST_TemplateSegment,\n AST_TemplateString,\n AST_This,\n AST_Throw,\n AST_Token,\n AST_Toplevel,\n AST_True,\n AST_Try,\n AST_Unary,\n AST_UnaryPostfix,\n AST_UnaryPrefix,\n AST_Undefined,\n AST_Var,\n AST_VarDef,\n AST_While,\n AST_With,\n AST_Yield,\n TreeTransformer,\n TreeWalker,\n walk_body,\n _INLINE,\n _NOINLINE,\n _PURE,\n};\n","/***********************************************************************\n\n A JavaScript tokenizer / parser / beautifier / compressor.\n https://github.com/mishoo/UglifyJS2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Mihai Bazon\n \n http://mihai.bazon.net/blog\n\n Distributed under the BSD license:\n\n Copyright 2012 (c) Mihai Bazon \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n ***********************************************************************/\n\n\"use strict\";\n\nimport {\n AST_Array,\n AST_Await,\n AST_Binary,\n AST_Block,\n AST_Call,\n AST_Case,\n AST_Catch,\n AST_Class,\n AST_Conditional,\n AST_Definitions,\n AST_Destructuring,\n AST_Do,\n AST_Dot,\n AST_Exit,\n AST_Expansion,\n AST_Export,\n AST_For,\n AST_ForIn,\n AST_If,\n AST_Import,\n AST_LabeledStatement,\n AST_Lambda,\n AST_LoopControl,\n AST_NameMapping,\n AST_Node,\n AST_Number,\n AST_Object,\n AST_ObjectProperty,\n AST_PrefixedTemplateString,\n AST_Sequence,\n AST_SimpleStatement,\n AST_Sub,\n AST_Switch,\n AST_TemplateString,\n AST_Try,\n AST_Unary,\n AST_VarDef,\n AST_While,\n AST_With,\n AST_Yield,\n} from \"./ast.js\";\nimport {\n MAP,\n noop,\n} from \"./utils/index.js\";\n\nfunction def_transform(node, descend) {\n node.DEFMETHOD(\"transform\", function(tw, in_list) {\n let transformed = undefined;\n tw.push(this);\n if (tw.before) transformed = tw.before(this, descend, in_list);\n if (transformed === undefined) {\n transformed = this;\n descend(transformed, tw);\n if (tw.after) {\n const after_ret = tw.after(transformed, in_list);\n if (after_ret !== undefined) transformed = after_ret;\n }\n }\n tw.pop();\n return transformed;\n });\n}\n\nfunction do_list(list, tw) {\n return MAP(list, function(node) {\n return node.transform(tw, true);\n });\n}\n\ndef_transform(AST_Node, noop);\n\ndef_transform(AST_LabeledStatement, function(self, tw) {\n self.label = self.label.transform(tw);\n self.body = self.body.transform(tw);\n});\n\ndef_transform(AST_SimpleStatement, function(self, tw) {\n self.body = self.body.transform(tw);\n});\n\ndef_transform(AST_Block, function(self, tw) {\n self.body = do_list(self.body, tw);\n});\n\ndef_transform(AST_Do, function(self, tw) {\n self.body = self.body.transform(tw);\n self.condition = self.condition.transform(tw);\n});\n\ndef_transform(AST_While, function(self, tw) {\n self.condition = self.condition.transform(tw);\n self.body = self.body.transform(tw);\n});\n\ndef_transform(AST_For, function(self, tw) {\n if (self.init) self.init = self.init.transform(tw);\n if (self.condition) self.condition = self.condition.transform(tw);\n if (self.step) self.step = self.step.transform(tw);\n self.body = self.body.transform(tw);\n});\n\ndef_transform(AST_ForIn, function(self, tw) {\n self.init = self.init.transform(tw);\n self.object = self.object.transform(tw);\n self.body = self.body.transform(tw);\n});\n\ndef_transform(AST_With, function(self, tw) {\n self.expression = self.expression.transform(tw);\n self.body = self.body.transform(tw);\n});\n\ndef_transform(AST_Exit, function(self, tw) {\n if (self.value) self.value = self.value.transform(tw);\n});\n\ndef_transform(AST_LoopControl, function(self, tw) {\n if (self.label) self.label = self.label.transform(tw);\n});\n\ndef_transform(AST_If, function(self, tw) {\n self.condition = self.condition.transform(tw);\n self.body = self.body.transform(tw);\n if (self.alternative) self.alternative = self.alternative.transform(tw);\n});\n\ndef_transform(AST_Switch, function(self, tw) {\n self.expression = self.expression.transform(tw);\n self.body = do_list(self.body, tw);\n});\n\ndef_transform(AST_Case, function(self, tw) {\n self.expression = self.expression.transform(tw);\n self.body = do_list(self.body, tw);\n});\n\ndef_transform(AST_Try, function(self, tw) {\n self.body = do_list(self.body, tw);\n if (self.bcatch) self.bcatch = self.bcatch.transform(tw);\n if (self.bfinally) self.bfinally = self.bfinally.transform(tw);\n});\n\ndef_transform(AST_Catch, function(self, tw) {\n if (self.argname) self.argname = self.argname.transform(tw);\n self.body = do_list(self.body, tw);\n});\n\ndef_transform(AST_Definitions, function(self, tw) {\n self.definitions = do_list(self.definitions, tw);\n});\n\ndef_transform(AST_VarDef, function(self, tw) {\n self.name = self.name.transform(tw);\n if (self.value) self.value = self.value.transform(tw);\n});\n\ndef_transform(AST_Destructuring, function(self, tw) {\n self.names = do_list(self.names, tw);\n});\n\ndef_transform(AST_Lambda, function(self, tw) {\n if (self.name) self.name = self.name.transform(tw);\n self.argnames = do_list(self.argnames, tw);\n if (self.body instanceof AST_Node) {\n self.body = self.body.transform(tw);\n } else {\n self.body = do_list(self.body, tw);\n }\n});\n\ndef_transform(AST_Call, function(self, tw) {\n self.expression = self.expression.transform(tw);\n self.args = do_list(self.args, tw);\n});\n\ndef_transform(AST_Sequence, function(self, tw) {\n const result = do_list(self.expressions, tw);\n self.expressions = result.length\n ? result\n : [new AST_Number({ value: 0 })];\n});\n\ndef_transform(AST_Dot, function(self, tw) {\n self.expression = self.expression.transform(tw);\n});\n\ndef_transform(AST_Sub, function(self, tw) {\n self.expression = self.expression.transform(tw);\n self.property = self.property.transform(tw);\n});\n\ndef_transform(AST_Yield, function(self, tw) {\n if (self.expression) self.expression = self.expression.transform(tw);\n});\n\ndef_transform(AST_Await, function(self, tw) {\n self.expression = self.expression.transform(tw);\n});\n\ndef_transform(AST_Unary, function(self, tw) {\n self.expression = self.expression.transform(tw);\n});\n\ndef_transform(AST_Binary, function(self, tw) {\n self.left = self.left.transform(tw);\n self.right = self.right.transform(tw);\n});\n\ndef_transform(AST_Conditional, function(self, tw) {\n self.condition = self.condition.transform(tw);\n self.consequent = self.consequent.transform(tw);\n self.alternative = self.alternative.transform(tw);\n});\n\ndef_transform(AST_Array, function(self, tw) {\n self.elements = do_list(self.elements, tw);\n});\n\ndef_transform(AST_Object, function(self, tw) {\n self.properties = do_list(self.properties, tw);\n});\n\ndef_transform(AST_ObjectProperty, function(self, tw) {\n if (self.key instanceof AST_Node) {\n self.key = self.key.transform(tw);\n }\n self.value = self.value.transform(tw);\n});\n\ndef_transform(AST_Class, function(self, tw) {\n if (self.name) self.name = self.name.transform(tw);\n if (self.extends) self.extends = self.extends.transform(tw);\n self.properties = do_list(self.properties, tw);\n});\n\ndef_transform(AST_Expansion, function(self, tw) {\n self.expression = self.expression.transform(tw);\n});\n\ndef_transform(AST_NameMapping, function(self, tw) {\n self.foreign_name = self.foreign_name.transform(tw);\n self.name = self.name.transform(tw);\n});\n\ndef_transform(AST_Import, function(self, tw) {\n if (self.imported_name) self.imported_name = self.imported_name.transform(tw);\n if (self.imported_names) do_list(self.imported_names, tw);\n self.module_name = self.module_name.transform(tw);\n});\n\ndef_transform(AST_Export, function(self, tw) {\n if (self.exported_definition) self.exported_definition = self.exported_definition.transform(tw);\n if (self.exported_value) self.exported_value = self.exported_value.transform(tw);\n if (self.exported_names) do_list(self.exported_names, tw);\n if (self.module_name) self.module_name = self.module_name.transform(tw);\n});\n\ndef_transform(AST_TemplateString, function(self, tw) {\n self.segments = do_list(self.segments, tw);\n});\n\ndef_transform(AST_PrefixedTemplateString, function(self, tw) {\n self.prefix = self.prefix.transform(tw);\n self.template_string = self.template_string.transform(tw);\n});\n\n","import {\n AST_Binary,\n AST_Conditional,\n AST_Dot,\n AST_Object,\n AST_Sequence,\n AST_Statement,\n AST_Sub,\n AST_UnaryPostfix,\n AST_PrefixedTemplateString\n} from \"../ast.js\";\n\n// return true if the node at the top of the stack (that means the\n// innermost node in the current output) is lexically the first in\n// a statement.\nfunction first_in_statement(stack) {\n let node = stack.parent(-1);\n for (let i = 0, p; p = stack.parent(i); i++) {\n if (p instanceof AST_Statement && p.body === node)\n return true;\n if ((p instanceof AST_Sequence && p.expressions[0] === node) ||\n (p.TYPE === \"Call\" && p.expression === node) ||\n (p instanceof AST_PrefixedTemplateString && p.prefix === node) ||\n (p instanceof AST_Dot && p.expression === node) ||\n (p instanceof AST_Sub && p.expression === node) ||\n (p instanceof AST_Conditional && p.condition === node) ||\n (p instanceof AST_Binary && p.left === node) ||\n (p instanceof AST_UnaryPostfix && p.expression === node)\n ) {\n node = p;\n } else {\n return false;\n }\n }\n}\n\n// Returns whether the leftmost item in the expression is an object\nfunction left_is_object(node) {\n if (node instanceof AST_Object) return true;\n if (node instanceof AST_Sequence) return left_is_object(node.expressions[0]);\n if (node.TYPE === \"Call\") return left_is_object(node.expression);\n if (node instanceof AST_PrefixedTemplateString) return left_is_object(node.prefix);\n if (node instanceof AST_Dot || node instanceof AST_Sub) return left_is_object(node.expression);\n if (node instanceof AST_Conditional) return left_is_object(node.condition);\n if (node instanceof AST_Binary) return left_is_object(node.left);\n if (node instanceof AST_UnaryPostfix) return left_is_object(node.expression);\n return false;\n}\n\nexport { first_in_statement, left_is_object };\n","/***********************************************************************\n\n A JavaScript tokenizer / parser / beautifier / compressor.\n https://github.com/mishoo/UglifyJS2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Mihai Bazon\n \n http://mihai.bazon.net/blog\n\n Distributed under the BSD license:\n\n Copyright 2012 (c) Mihai Bazon \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n ***********************************************************************/\n\n\"use strict\";\n\nimport {\n defaults,\n makePredicate,\n noop,\n regexp_source_fix,\n sort_regexp_flags,\n return_false,\n return_true,\n} from \"./utils/index.js\";\nimport { first_in_statement, left_is_object } from \"./utils/first_in_statement.js\";\nimport {\n AST_Array,\n AST_Arrow,\n AST_Assign,\n AST_Await,\n AST_BigInt,\n AST_Binary,\n AST_BlockStatement,\n AST_Break,\n AST_Call,\n AST_Case,\n AST_Catch,\n AST_Class,\n AST_ClassExpression,\n AST_ConciseMethod,\n AST_Conditional,\n AST_Const,\n AST_Constant,\n AST_Continue,\n AST_Debugger,\n AST_Default,\n AST_DefaultAssign,\n AST_Definitions,\n AST_Defun,\n AST_Destructuring,\n AST_Directive,\n AST_Do,\n AST_Dot,\n AST_EmptyStatement,\n AST_Exit,\n AST_Expansion,\n AST_Export,\n AST_Finally,\n AST_For,\n AST_ForIn,\n AST_ForOf,\n AST_Function,\n AST_Hole,\n AST_If,\n AST_Import,\n AST_Jump,\n AST_LabeledStatement,\n AST_Lambda,\n AST_Let,\n AST_LoopControl,\n AST_NameMapping,\n AST_New,\n AST_NewTarget,\n AST_Node,\n AST_Number,\n AST_Object,\n AST_ObjectGetter,\n AST_ObjectKeyVal,\n AST_ObjectProperty,\n AST_ObjectSetter,\n AST_PrefixedTemplateString,\n AST_PropAccess,\n AST_RegExp,\n AST_Return,\n AST_Scope,\n AST_Sequence,\n AST_SimpleStatement,\n AST_Statement,\n AST_StatementWithBody,\n AST_String,\n AST_Sub,\n AST_Super,\n AST_Switch,\n AST_SwitchBranch,\n AST_Symbol,\n AST_SymbolMethod,\n AST_SymbolRef,\n AST_TemplateSegment,\n AST_TemplateString,\n AST_This,\n AST_Throw,\n AST_Toplevel,\n AST_Try,\n AST_Unary,\n AST_UnaryPostfix,\n AST_UnaryPrefix,\n AST_Var,\n AST_VarDef,\n AST_While,\n AST_With,\n AST_Yield,\n TreeWalker,\n} from \"./ast.js\";\nimport {\n get_full_char_code,\n get_full_char,\n is_identifier_char,\n is_identifier_string,\n is_surrogate_pair_head,\n is_surrogate_pair_tail,\n PRECEDENCE,\n RESERVED_WORDS,\n} from \"./parse.js\";\n\nconst EXPECT_DIRECTIVE = /^$|[;{][\\s\\n]*$/;\nconst CODE_LINE_BREAK = 10;\nconst CODE_SPACE = 32;\n\nconst r_annotation = /[@#]__(PURE|INLINE|NOINLINE)__/g;\n\nfunction is_some_comments(comment) {\n // multiline comment\n return comment.type == \"comment2\" && /@preserve|@lic|@cc_on|^\\**!/i.test(comment.value);\n}\n\nfunction OutputStream(options) {\n\n var readonly = !options;\n options = defaults(options, {\n ascii_only : false,\n beautify : false,\n braces : false,\n comments : \"some\",\n ecma : 5,\n ie8 : false,\n indent_level : 4,\n indent_start : 0,\n inline_script : true,\n keep_numbers : false,\n keep_quoted_props: false,\n max_line_len : false,\n preamble : null,\n quote_keys : false,\n quote_style : 0,\n safari10 : false,\n semicolons : true,\n shebang : true,\n shorthand : undefined,\n source_map : null,\n webkit : false,\n width : 80,\n wrap_iife : false,\n wrap_func_args : true,\n }, true);\n\n if (options.shorthand === undefined)\n options.shorthand = options.ecma > 5;\n\n // Convert comment option to RegExp if neccessary and set up comments filter\n var comment_filter = return_false; // Default case, throw all comments away\n if (options.comments) {\n let comments = options.comments;\n if (typeof options.comments === \"string\" && /^\\/.*\\/[a-zA-Z]*$/.test(options.comments)) {\n var regex_pos = options.comments.lastIndexOf(\"/\");\n comments = new RegExp(\n options.comments.substr(1, regex_pos - 1),\n options.comments.substr(regex_pos + 1)\n );\n }\n if (comments instanceof RegExp) {\n comment_filter = function(comment) {\n return comment.type != \"comment5\" && comments.test(comment.value);\n };\n } else if (typeof comments === \"function\") {\n comment_filter = function(comment) {\n return comment.type != \"comment5\" && comments(this, comment);\n };\n } else if (comments === \"some\") {\n comment_filter = is_some_comments;\n } else { // NOTE includes \"all\" option\n comment_filter = return_true;\n }\n }\n\n var indentation = 0;\n var current_col = 0;\n var current_line = 1;\n var current_pos = 0;\n var OUTPUT = \"\";\n let printed_comments = new Set();\n\n var to_utf8 = options.ascii_only ? function(str, identifier) {\n if (options.ecma >= 2015) {\n str = str.replace(/[\\ud800-\\udbff][\\udc00-\\udfff]/g, function(ch) {\n var code = get_full_char_code(ch, 0).toString(16);\n return \"\\\\u{\" + code + \"}\";\n });\n }\n return str.replace(/[\\u0000-\\u001f\\u007f-\\uffff]/g, function(ch) {\n var code = ch.charCodeAt(0).toString(16);\n if (code.length <= 2 && !identifier) {\n while (code.length < 2) code = \"0\" + code;\n return \"\\\\x\" + code;\n } else {\n while (code.length < 4) code = \"0\" + code;\n return \"\\\\u\" + code;\n }\n });\n } : function(str) {\n var s = \"\";\n for (var i = 0, len = str.length; i < len; i++) {\n if (is_surrogate_pair_head(str[i]) && !is_surrogate_pair_tail(str[i + 1])\n || is_surrogate_pair_tail(str[i]) && !is_surrogate_pair_head(str[i - 1])) {\n s += \"\\\\u\" + str.charCodeAt(i).toString(16);\n } else {\n s += str[i];\n }\n }\n return s;\n };\n\n function make_string(str, quote) {\n var dq = 0, sq = 0;\n str = str.replace(/[\\\\\\b\\f\\n\\r\\v\\t\\x22\\x27\\u2028\\u2029\\0\\ufeff]/g,\n function(s, i) {\n switch (s) {\n case '\"': ++dq; return '\"';\n case \"'\": ++sq; return \"'\";\n case \"\\\\\": return \"\\\\\\\\\";\n case \"\\n\": return \"\\\\n\";\n case \"\\r\": return \"\\\\r\";\n case \"\\t\": return \"\\\\t\";\n case \"\\b\": return \"\\\\b\";\n case \"\\f\": return \"\\\\f\";\n case \"\\x0B\": return options.ie8 ? \"\\\\x0B\" : \"\\\\v\";\n case \"\\u2028\": return \"\\\\u2028\";\n case \"\\u2029\": return \"\\\\u2029\";\n case \"\\ufeff\": return \"\\\\ufeff\";\n case \"\\0\":\n return /[0-9]/.test(get_full_char(str, i+1)) ? \"\\\\x00\" : \"\\\\0\";\n }\n return s;\n });\n function quote_single() {\n return \"'\" + str.replace(/\\x27/g, \"\\\\'\") + \"'\";\n }\n function quote_double() {\n return '\"' + str.replace(/\\x22/g, '\\\\\"') + '\"';\n }\n function quote_template() {\n return \"`\" + str.replace(/`/g, \"\\\\`\") + \"`\";\n }\n str = to_utf8(str);\n if (quote === \"`\") return quote_template();\n switch (options.quote_style) {\n case 1:\n return quote_single();\n case 2:\n return quote_double();\n case 3:\n return quote == \"'\" ? quote_single() : quote_double();\n default:\n return dq > sq ? quote_single() : quote_double();\n }\n }\n\n function encode_string(str, quote) {\n var ret = make_string(str, quote);\n if (options.inline_script) {\n ret = ret.replace(/<\\x2f(script)([>\\/\\t\\n\\f\\r ])/gi, \"<\\\\/$1$2\");\n ret = ret.replace(/\\x3c!--/g, \"\\\\x3c!--\");\n ret = ret.replace(/--\\x3e/g, \"--\\\\x3e\");\n }\n return ret;\n }\n\n function make_name(name) {\n name = name.toString();\n name = to_utf8(name, true);\n return name;\n }\n\n function make_indent(back) {\n return \" \".repeat(options.indent_start + indentation - back * options.indent_level);\n }\n\n /* -----[ beautification/minification ]----- */\n\n var has_parens = false;\n var might_need_space = false;\n var might_need_semicolon = false;\n var might_add_newline = 0;\n var need_newline_indented = false;\n var need_space = false;\n var newline_insert = -1;\n var last = \"\";\n var mapping_token, mapping_name, mappings = options.source_map && [];\n\n var do_add_mapping = mappings ? function() {\n mappings.forEach(function(mapping) {\n try {\n options.source_map.add(\n mapping.token.file,\n mapping.line, mapping.col,\n mapping.token.line, mapping.token.col,\n !mapping.name && mapping.token.type == \"name\" ? mapping.token.value : mapping.name\n );\n } catch(ex) {\n mapping.token.file != null && AST_Node.warn(\"Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]\", {\n file: mapping.token.file,\n line: mapping.token.line,\n col: mapping.token.col,\n cline: mapping.line,\n ccol: mapping.col,\n name: mapping.name || \"\"\n });\n }\n });\n mappings = [];\n } : noop;\n\n var ensure_line_len = options.max_line_len ? function() {\n if (current_col > options.max_line_len) {\n if (might_add_newline) {\n var left = OUTPUT.slice(0, might_add_newline);\n var right = OUTPUT.slice(might_add_newline);\n if (mappings) {\n var delta = right.length - current_col;\n mappings.forEach(function(mapping) {\n mapping.line++;\n mapping.col += delta;\n });\n }\n OUTPUT = left + \"\\n\" + right;\n current_line++;\n current_pos++;\n current_col = right.length;\n }\n if (current_col > options.max_line_len) {\n AST_Node.warn(\"Output exceeds {max_line_len} characters\", options);\n }\n }\n if (might_add_newline) {\n might_add_newline = 0;\n do_add_mapping();\n }\n } : noop;\n\n var requireSemicolonChars = makePredicate(\"( [ + * / - , . `\");\n\n function print(str) {\n str = String(str);\n var ch = get_full_char(str, 0);\n if (need_newline_indented && ch) {\n need_newline_indented = false;\n if (ch !== \"\\n\") {\n print(\"\\n\");\n indent();\n }\n }\n if (need_space && ch) {\n need_space = false;\n if (!/[\\s;})]/.test(ch)) {\n space();\n }\n }\n newline_insert = -1;\n var prev = last.charAt(last.length - 1);\n if (might_need_semicolon) {\n might_need_semicolon = false;\n\n if (prev === \":\" && ch === \"}\" || (!ch || !\";}\".includes(ch)) && prev !== \";\") {\n if (options.semicolons || requireSemicolonChars.has(ch)) {\n OUTPUT += \";\";\n current_col++;\n current_pos++;\n } else {\n ensure_line_len();\n if (current_col > 0) {\n OUTPUT += \"\\n\";\n current_pos++;\n current_line++;\n current_col = 0;\n }\n\n if (/^\\s+$/.test(str)) {\n // reset the semicolon flag, since we didn't print one\n // now and might still have to later\n might_need_semicolon = true;\n }\n }\n\n if (!options.beautify)\n might_need_space = false;\n }\n }\n\n if (might_need_space) {\n if ((is_identifier_char(prev)\n && (is_identifier_char(ch) || ch == \"\\\\\"))\n || (ch == \"/\" && ch == prev)\n || ((ch == \"+\" || ch == \"-\") && ch == last)\n ) {\n OUTPUT += \" \";\n current_col++;\n current_pos++;\n }\n might_need_space = false;\n }\n\n if (mapping_token) {\n mappings.push({\n token: mapping_token,\n name: mapping_name,\n line: current_line,\n col: current_col\n });\n mapping_token = false;\n if (!might_add_newline) do_add_mapping();\n }\n\n OUTPUT += str;\n has_parens = str[str.length - 1] == \"(\";\n current_pos += str.length;\n var a = str.split(/\\r?\\n/), n = a.length - 1;\n current_line += n;\n current_col += a[0].length;\n if (n > 0) {\n ensure_line_len();\n current_col = a[n].length;\n }\n last = str;\n }\n\n var star = function() {\n print(\"*\");\n };\n\n var space = options.beautify ? function() {\n print(\" \");\n } : function() {\n might_need_space = true;\n };\n\n var indent = options.beautify ? function(half) {\n if (options.beautify) {\n print(make_indent(half ? 0.5 : 0));\n }\n } : noop;\n\n var with_indent = options.beautify ? function(col, cont) {\n if (col === true) col = next_indent();\n var save_indentation = indentation;\n indentation = col;\n var ret = cont();\n indentation = save_indentation;\n return ret;\n } : function(col, cont) { return cont(); };\n\n var newline = options.beautify ? function() {\n if (newline_insert < 0) return print(\"\\n\");\n if (OUTPUT[newline_insert] != \"\\n\") {\n OUTPUT = OUTPUT.slice(0, newline_insert) + \"\\n\" + OUTPUT.slice(newline_insert);\n current_pos++;\n current_line++;\n }\n newline_insert++;\n } : options.max_line_len ? function() {\n ensure_line_len();\n might_add_newline = OUTPUT.length;\n } : noop;\n\n var semicolon = options.beautify ? function() {\n print(\";\");\n } : function() {\n might_need_semicolon = true;\n };\n\n function force_semicolon() {\n might_need_semicolon = false;\n print(\";\");\n }\n\n function next_indent() {\n return indentation + options.indent_level;\n }\n\n function with_block(cont) {\n var ret;\n print(\"{\");\n newline();\n with_indent(next_indent(), function() {\n ret = cont();\n });\n indent();\n print(\"}\");\n return ret;\n }\n\n function with_parens(cont) {\n print(\"(\");\n //XXX: still nice to have that for argument lists\n //var ret = with_indent(current_col, cont);\n var ret = cont();\n print(\")\");\n return ret;\n }\n\n function with_square(cont) {\n print(\"[\");\n //var ret = with_indent(current_col, cont);\n var ret = cont();\n print(\"]\");\n return ret;\n }\n\n function comma() {\n print(\",\");\n space();\n }\n\n function colon() {\n print(\":\");\n space();\n }\n\n var add_mapping = mappings ? function(token, name) {\n mapping_token = token;\n mapping_name = name;\n } : noop;\n\n function get() {\n if (might_add_newline) {\n ensure_line_len();\n }\n return OUTPUT;\n }\n\n function has_nlb() {\n let n = OUTPUT.length - 1;\n while (n >= 0) {\n const code = OUTPUT.charCodeAt(n);\n if (code === CODE_LINE_BREAK) {\n return true;\n }\n\n if (code !== CODE_SPACE) {\n return false;\n }\n n--;\n }\n return true;\n }\n\n function prepend_comments(node) {\n var self = this;\n var start = node.start;\n if (!start) return;\n var printed_comments = self.printed_comments;\n if (start.comments_before && printed_comments.has(start.comments_before)) return;\n var comments = start.comments_before;\n if (!comments) {\n comments = start.comments_before = [];\n }\n printed_comments.add(comments);\n\n if (node instanceof AST_Exit && node.value) {\n var tw = new TreeWalker(function(node) {\n var parent = tw.parent();\n if (parent instanceof AST_Exit\n || parent instanceof AST_Binary && parent.left === node\n || parent.TYPE == \"Call\" && parent.expression === node\n || parent instanceof AST_Conditional && parent.condition === node\n || parent instanceof AST_Dot && parent.expression === node\n || parent instanceof AST_Sequence && parent.expressions[0] === node\n || parent instanceof AST_Sub && parent.expression === node\n || parent instanceof AST_UnaryPostfix) {\n if (!node.start) return;\n var text = node.start.comments_before;\n if (text && !printed_comments.has(text)) {\n printed_comments.add(text);\n comments = comments.concat(text);\n }\n } else {\n return true;\n }\n });\n tw.push(node);\n node.value.walk(tw);\n }\n\n if (current_pos == 0) {\n if (comments.length > 0 && options.shebang && comments[0].type === \"comment5\"\n && !printed_comments.has(comments[0])) {\n print(\"#!\" + comments.shift().value + \"\\n\");\n indent();\n }\n var preamble = options.preamble;\n if (preamble) {\n print(preamble.replace(/\\r\\n?|[\\n\\u2028\\u2029]|\\s*$/g, \"\\n\"));\n }\n }\n\n comments = comments.filter(comment_filter, node).filter(c => !printed_comments.has(c));\n if (comments.length == 0) return;\n var last_nlb = has_nlb();\n comments.forEach(function(c, i) {\n printed_comments.add(c);\n if (!last_nlb) {\n if (c.nlb) {\n print(\"\\n\");\n indent();\n last_nlb = true;\n } else if (i > 0) {\n space();\n }\n }\n if (/comment[134]/.test(c.type)) {\n print(\"//\" + c.value.replace(r_annotation, \" \") + \"\\n\");\n indent();\n last_nlb = true;\n } else if (c.type == \"comment2\") {\n print(\"/*\" + c.value.replace(r_annotation, \" \") + \"*/\");\n last_nlb = false;\n }\n });\n if (!last_nlb) {\n if (start.nlb) {\n print(\"\\n\");\n indent();\n } else {\n space();\n }\n }\n }\n\n function append_comments(node, tail) {\n var self = this;\n var token = node.end;\n if (!token) return;\n var printed_comments = self.printed_comments;\n var comments = token[tail ? \"comments_before\" : \"comments_after\"];\n if (!comments || printed_comments.has(comments)) return;\n if (!(node instanceof AST_Statement || comments.every((c) =>\n !/comment[134]/.test(c.type)\n ))) return;\n printed_comments.add(comments);\n var insert = OUTPUT.length;\n comments.filter(comment_filter, node).forEach(function(c, i) {\n if (printed_comments.has(c)) return;\n printed_comments.add(c);\n need_space = false;\n if (need_newline_indented) {\n print(\"\\n\");\n indent();\n need_newline_indented = false;\n } else if (c.nlb && (i > 0 || !has_nlb())) {\n print(\"\\n\");\n indent();\n } else if (i > 0 || !tail) {\n space();\n }\n if (/comment[134]/.test(c.type)) {\n print(\"//\" + c.value.replace(r_annotation, \" \"));\n need_newline_indented = true;\n } else if (c.type == \"comment2\") {\n print(\"/*\" + c.value.replace(r_annotation, \" \") + \"*/\");\n need_space = true;\n }\n });\n if (OUTPUT.length > insert) newline_insert = insert;\n }\n\n var stack = [];\n return {\n get : get,\n toString : get,\n indent : indent,\n in_directive : false,\n use_asm : null,\n active_scope : null,\n indentation : function() { return indentation; },\n current_width : function() { return current_col - indentation; },\n should_break : function() { return options.width && this.current_width() >= options.width; },\n has_parens : function() { return has_parens; },\n newline : newline,\n print : print,\n star : star,\n space : space,\n comma : comma,\n colon : colon,\n last : function() { return last; },\n semicolon : semicolon,\n force_semicolon : force_semicolon,\n to_utf8 : to_utf8,\n print_name : function(name) { print(make_name(name)); },\n print_string : function(str, quote, escape_directive) {\n var encoded = encode_string(str, quote);\n if (escape_directive === true && !encoded.includes(\"\\\\\")) {\n // Insert semicolons to break directive prologue\n if (!EXPECT_DIRECTIVE.test(OUTPUT)) {\n force_semicolon();\n }\n force_semicolon();\n }\n print(encoded);\n },\n print_template_string_chars: function(str) {\n var encoded = encode_string(str, \"`\").replace(/\\${/g, \"\\\\${\");\n return print(encoded.substr(1, encoded.length - 2));\n },\n encode_string : encode_string,\n next_indent : next_indent,\n with_indent : with_indent,\n with_block : with_block,\n with_parens : with_parens,\n with_square : with_square,\n add_mapping : add_mapping,\n option : function(opt) { return options[opt]; },\n printed_comments: printed_comments,\n prepend_comments: readonly ? noop : prepend_comments,\n append_comments : readonly || comment_filter === return_false ? noop : append_comments,\n line : function() { return current_line; },\n col : function() { return current_col; },\n pos : function() { return current_pos; },\n push_node : function(node) { stack.push(node); },\n pop_node : function() { return stack.pop(); },\n parent : function(n) {\n return stack[stack.length - 2 - (n || 0)];\n }\n };\n\n}\n\n/* -----[ code generators ]----- */\n\n(function() {\n\n /* -----[ utils ]----- */\n\n function DEFPRINT(nodetype, generator) {\n nodetype.DEFMETHOD(\"_codegen\", generator);\n }\n\n AST_Node.DEFMETHOD(\"print\", function(output, force_parens) {\n var self = this, generator = self._codegen;\n if (self instanceof AST_Scope) {\n output.active_scope = self;\n } else if (!output.use_asm && self instanceof AST_Directive && self.value == \"use asm\") {\n output.use_asm = output.active_scope;\n }\n function doit() {\n output.prepend_comments(self);\n self.add_source_map(output);\n generator(self, output);\n output.append_comments(self);\n }\n output.push_node(self);\n if (force_parens || self.needs_parens(output)) {\n output.with_parens(doit);\n } else {\n doit();\n }\n output.pop_node();\n if (self === output.use_asm) {\n output.use_asm = null;\n }\n });\n AST_Node.DEFMETHOD(\"_print\", AST_Node.prototype.print);\n\n AST_Node.DEFMETHOD(\"print_to_string\", function(options) {\n var output = OutputStream(options);\n this.print(output);\n return output.get();\n });\n\n /* -----[ PARENTHESES ]----- */\n\n function PARENS(nodetype, func) {\n if (Array.isArray(nodetype)) {\n nodetype.forEach(function(nodetype) {\n PARENS(nodetype, func);\n });\n } else {\n nodetype.DEFMETHOD(\"needs_parens\", func);\n }\n }\n\n PARENS(AST_Node, return_false);\n\n // a function expression needs parens around it when it's provably\n // the first token to appear in a statement.\n PARENS(AST_Function, function(output) {\n if (!output.has_parens() && first_in_statement(output)) {\n return true;\n }\n\n if (output.option(\"webkit\")) {\n var p = output.parent();\n if (p instanceof AST_PropAccess && p.expression === this) {\n return true;\n }\n }\n\n if (output.option(\"wrap_iife\")) {\n var p = output.parent();\n if (p instanceof AST_Call && p.expression === this) {\n return true;\n }\n }\n\n if (output.option(\"wrap_func_args\")) {\n var p = output.parent();\n if (p instanceof AST_Call && p.args.includes(this)) {\n return true;\n }\n }\n\n return false;\n });\n\n PARENS(AST_Arrow, function(output) {\n var p = output.parent();\n return p instanceof AST_PropAccess && p.expression === this;\n });\n\n // same goes for an object literal, because otherwise it would be\n // interpreted as a block of code.\n PARENS(AST_Object, function(output) {\n return !output.has_parens() && first_in_statement(output);\n });\n\n PARENS(AST_ClassExpression, first_in_statement);\n\n PARENS(AST_Unary, function(output) {\n var p = output.parent();\n return p instanceof AST_PropAccess && p.expression === this\n || p instanceof AST_Call && p.expression === this\n || p instanceof AST_Binary\n && p.operator === \"**\"\n && this instanceof AST_UnaryPrefix\n && p.left === this\n && this.operator !== \"++\"\n && this.operator !== \"--\";\n });\n\n PARENS(AST_Await, function(output) {\n var p = output.parent();\n return p instanceof AST_PropAccess && p.expression === this\n || p instanceof AST_Call && p.expression === this\n || output.option(\"safari10\") && p instanceof AST_UnaryPrefix;\n });\n\n PARENS(AST_Sequence, function(output) {\n var p = output.parent();\n return p instanceof AST_Call // (foo, bar)() or foo(1, (2, 3), 4)\n || p instanceof AST_Unary // !(foo, bar, baz)\n || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8\n || p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4\n || p instanceof AST_PropAccess // (1, {foo:2}).foo or (1, {foo:2})[\"foo\"] ==> 2\n || p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ]\n || p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2\n || p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30)\n * ==> 20 (side effect, set a := 10 and b := 20) */\n || p instanceof AST_Arrow // x => (x, x)\n || p instanceof AST_DefaultAssign // x => (x = (0, function(){}))\n || p instanceof AST_Expansion // [...(a, b)]\n || p instanceof AST_ForOf && this === p.object // for (e of (foo, bar)) {}\n || p instanceof AST_Yield // yield (foo, bar)\n || p instanceof AST_Export // export default (foo, bar)\n ;\n });\n\n PARENS(AST_Binary, function(output) {\n var p = output.parent();\n // (foo && bar)()\n if (p instanceof AST_Call && p.expression === this)\n return true;\n // typeof (foo && bar)\n if (p instanceof AST_Unary)\n return true;\n // (foo && bar)[\"prop\"], (foo && bar).prop\n if (p instanceof AST_PropAccess && p.expression === this)\n return true;\n // this deals with precedence: 3 * (2 + 1)\n if (p instanceof AST_Binary) {\n var po = p.operator, pp = PRECEDENCE[po];\n var so = this.operator, sp = PRECEDENCE[so];\n if (pp > sp\n || (pp == sp\n && (this === p.right || po == \"**\"))) {\n return true;\n }\n }\n });\n\n PARENS(AST_Yield, function(output) {\n var p = output.parent();\n // (yield 1) + (yield 2)\n // a = yield 3\n if (p instanceof AST_Binary && p.operator !== \"=\")\n return true;\n // (yield 1)()\n // new (yield 1)()\n if (p instanceof AST_Call && p.expression === this)\n return true;\n // (yield 1) ? yield 2 : yield 3\n if (p instanceof AST_Conditional && p.condition === this)\n return true;\n // -(yield 4)\n if (p instanceof AST_Unary)\n return true;\n // (yield x).foo\n // (yield x)['foo']\n if (p instanceof AST_PropAccess && p.expression === this)\n return true;\n });\n\n PARENS(AST_PropAccess, function(output) {\n var p = output.parent();\n if (p instanceof AST_New && p.expression === this) {\n // i.e. new (foo.bar().baz)\n //\n // if there's one call into this subtree, then we need\n // parens around it too, otherwise the call will be\n // interpreted as passing the arguments to the upper New\n // expression.\n var parens = false;\n this.walk(new TreeWalker(function(node) {\n if (parens || node instanceof AST_Scope) return true;\n if (node instanceof AST_Call) {\n parens = true;\n return true;\n }\n }));\n return parens;\n }\n });\n\n PARENS(AST_Call, function(output) {\n var p = output.parent(), p1;\n if (p instanceof AST_New && p.expression === this\n || p instanceof AST_Export && p.is_default && this.expression instanceof AST_Function)\n return true;\n\n // workaround for Safari bug.\n // https://bugs.webkit.org/show_bug.cgi?id=123506\n return this.expression instanceof AST_Function\n && p instanceof AST_PropAccess\n && p.expression === this\n && (p1 = output.parent(1)) instanceof AST_Assign\n && p1.left === p;\n });\n\n PARENS(AST_New, function(output) {\n var p = output.parent();\n if (this.args.length === 0\n && (p instanceof AST_PropAccess // (new Date).getTime(), (new Date)[\"getTime\"]()\n || p instanceof AST_Call && p.expression === this)) // (new foo)(bar)\n return true;\n });\n\n PARENS(AST_Number, function(output) {\n var p = output.parent();\n if (p instanceof AST_PropAccess && p.expression === this) {\n var value = this.getValue();\n if (value < 0 || /^0/.test(make_num(value))) {\n return true;\n }\n }\n });\n\n PARENS(AST_BigInt, function(output) {\n var p = output.parent();\n if (p instanceof AST_PropAccess && p.expression === this) {\n var value = this.getValue();\n if (value.startsWith(\"-\")) {\n return true;\n }\n }\n });\n\n PARENS([ AST_Assign, AST_Conditional ], function(output) {\n var p = output.parent();\n // !(a = false) → true\n if (p instanceof AST_Unary)\n return true;\n // 1 + (a = 2) + 3 → 6, side effect setting a = 2\n if (p instanceof AST_Binary && !(p instanceof AST_Assign))\n return true;\n // (a = func)() —or— new (a = Object)()\n if (p instanceof AST_Call && p.expression === this)\n return true;\n // (a = foo) ? bar : baz\n if (p instanceof AST_Conditional && p.condition === this)\n return true;\n // (a = foo)[\"prop\"] —or— (a = foo).prop\n if (p instanceof AST_PropAccess && p.expression === this)\n return true;\n // ({a, b} = {a: 1, b: 2}), a destructuring assignment\n if (this instanceof AST_Assign && this.left instanceof AST_Destructuring && this.left.is_array === false)\n return true;\n });\n\n /* -----[ PRINTERS ]----- */\n\n DEFPRINT(AST_Directive, function(self, output) {\n output.print_string(self.value, self.quote);\n output.semicolon();\n });\n\n DEFPRINT(AST_Expansion, function (self, output) {\n output.print(\"...\");\n self.expression.print(output);\n });\n\n DEFPRINT(AST_Destructuring, function (self, output) {\n output.print(self.is_array ? \"[\" : \"{\");\n var len = self.names.length;\n self.names.forEach(function (name, i) {\n if (i > 0) output.comma();\n name.print(output);\n // If the final element is a hole, we need to make sure it\n // doesn't look like a trailing comma, by inserting an actual\n // trailing comma.\n if (i == len - 1 && name instanceof AST_Hole) output.comma();\n });\n output.print(self.is_array ? \"]\" : \"}\");\n });\n\n DEFPRINT(AST_Debugger, function(self, output) {\n output.print(\"debugger\");\n output.semicolon();\n });\n\n /* -----[ statements ]----- */\n\n function display_body(body, is_toplevel, output, allow_directives) {\n var last = body.length - 1;\n output.in_directive = allow_directives;\n body.forEach(function(stmt, i) {\n if (output.in_directive === true && !(stmt instanceof AST_Directive ||\n stmt instanceof AST_EmptyStatement ||\n (stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String)\n )) {\n output.in_directive = false;\n }\n if (!(stmt instanceof AST_EmptyStatement)) {\n output.indent();\n stmt.print(output);\n if (!(i == last && is_toplevel)) {\n output.newline();\n if (is_toplevel) output.newline();\n }\n }\n if (output.in_directive === true &&\n stmt instanceof AST_SimpleStatement &&\n stmt.body instanceof AST_String\n ) {\n output.in_directive = false;\n }\n });\n output.in_directive = false;\n }\n\n AST_StatementWithBody.DEFMETHOD(\"_do_print_body\", function(output) {\n force_statement(this.body, output);\n });\n\n DEFPRINT(AST_Statement, function(self, output) {\n self.body.print(output);\n output.semicolon();\n });\n DEFPRINT(AST_Toplevel, function(self, output) {\n display_body(self.body, true, output, true);\n output.print(\"\");\n });\n DEFPRINT(AST_LabeledStatement, function(self, output) {\n self.label.print(output);\n output.colon();\n self.body.print(output);\n });\n DEFPRINT(AST_SimpleStatement, function(self, output) {\n self.body.print(output);\n output.semicolon();\n });\n function print_braced_empty(self, output) {\n output.print(\"{\");\n output.with_indent(output.next_indent(), function() {\n output.append_comments(self, true);\n });\n output.print(\"}\");\n }\n function print_braced(self, output, allow_directives) {\n if (self.body.length > 0) {\n output.with_block(function() {\n display_body(self.body, false, output, allow_directives);\n });\n } else print_braced_empty(self, output);\n }\n DEFPRINT(AST_BlockStatement, function(self, output) {\n print_braced(self, output);\n });\n DEFPRINT(AST_EmptyStatement, function(self, output) {\n output.semicolon();\n });\n DEFPRINT(AST_Do, function(self, output) {\n output.print(\"do\");\n output.space();\n make_block(self.body, output);\n output.space();\n output.print(\"while\");\n output.space();\n output.with_parens(function() {\n self.condition.print(output);\n });\n output.semicolon();\n });\n DEFPRINT(AST_While, function(self, output) {\n output.print(\"while\");\n output.space();\n output.with_parens(function() {\n self.condition.print(output);\n });\n output.space();\n self._do_print_body(output);\n });\n DEFPRINT(AST_For, function(self, output) {\n output.print(\"for\");\n output.space();\n output.with_parens(function() {\n if (self.init) {\n if (self.init instanceof AST_Definitions) {\n self.init.print(output);\n } else {\n parenthesize_for_noin(self.init, output, true);\n }\n output.print(\";\");\n output.space();\n } else {\n output.print(\";\");\n }\n if (self.condition) {\n self.condition.print(output);\n output.print(\";\");\n output.space();\n } else {\n output.print(\";\");\n }\n if (self.step) {\n self.step.print(output);\n }\n });\n output.space();\n self._do_print_body(output);\n });\n DEFPRINT(AST_ForIn, function(self, output) {\n output.print(\"for\");\n if (self.await) {\n output.space();\n output.print(\"await\");\n }\n output.space();\n output.with_parens(function() {\n self.init.print(output);\n output.space();\n output.print(self instanceof AST_ForOf ? \"of\" : \"in\");\n output.space();\n self.object.print(output);\n });\n output.space();\n self._do_print_body(output);\n });\n DEFPRINT(AST_With, function(self, output) {\n output.print(\"with\");\n output.space();\n output.with_parens(function() {\n self.expression.print(output);\n });\n output.space();\n self._do_print_body(output);\n });\n\n /* -----[ functions ]----- */\n AST_Lambda.DEFMETHOD(\"_do_print\", function(output, nokeyword) {\n var self = this;\n if (!nokeyword) {\n if (self.async) {\n output.print(\"async\");\n output.space();\n }\n output.print(\"function\");\n if (self.is_generator) {\n output.star();\n }\n if (self.name) {\n output.space();\n }\n }\n if (self.name instanceof AST_Symbol) {\n self.name.print(output);\n } else if (nokeyword && self.name instanceof AST_Node) {\n output.with_square(function() {\n self.name.print(output); // Computed method name\n });\n }\n output.with_parens(function() {\n self.argnames.forEach(function(arg, i) {\n if (i) output.comma();\n arg.print(output);\n });\n });\n output.space();\n print_braced(self, output, true);\n });\n DEFPRINT(AST_Lambda, function(self, output) {\n self._do_print(output);\n });\n\n DEFPRINT(AST_PrefixedTemplateString, function(self, output) {\n var tag = self.prefix;\n var parenthesize_tag = tag instanceof AST_Lambda\n || tag instanceof AST_Binary\n || tag instanceof AST_Conditional\n || tag instanceof AST_Sequence\n || tag instanceof AST_Unary\n || tag instanceof AST_Dot && tag.expression instanceof AST_Object;\n if (parenthesize_tag) output.print(\"(\");\n self.prefix.print(output);\n if (parenthesize_tag) output.print(\")\");\n self.template_string.print(output);\n });\n DEFPRINT(AST_TemplateString, function(self, output) {\n var is_tagged = output.parent() instanceof AST_PrefixedTemplateString;\n\n output.print(\"`\");\n for (var i = 0; i < self.segments.length; i++) {\n if (!(self.segments[i] instanceof AST_TemplateSegment)) {\n output.print(\"${\");\n self.segments[i].print(output);\n output.print(\"}\");\n } else if (is_tagged) {\n output.print(self.segments[i].raw);\n } else {\n output.print_template_string_chars(self.segments[i].value);\n }\n }\n output.print(\"`\");\n });\n\n AST_Arrow.DEFMETHOD(\"_do_print\", function(output) {\n var self = this;\n var parent = output.parent();\n var needs_parens = (parent instanceof AST_Binary && !(parent instanceof AST_Assign)) ||\n parent instanceof AST_Unary ||\n (parent instanceof AST_Call && self === parent.expression);\n if (needs_parens) { output.print(\"(\"); }\n if (self.async) {\n output.print(\"async\");\n output.space();\n }\n if (self.argnames.length === 1 && self.argnames[0] instanceof AST_Symbol) {\n self.argnames[0].print(output);\n } else {\n output.with_parens(function() {\n self.argnames.forEach(function(arg, i) {\n if (i) output.comma();\n arg.print(output);\n });\n });\n }\n output.space();\n output.print(\"=>\");\n output.space();\n const first_statement = self.body[0];\n if (\n self.body.length === 1\n && first_statement instanceof AST_Return\n ) {\n const returned = first_statement.value;\n if (!returned) {\n output.print(\"{}\");\n } else if (left_is_object(returned)) {\n output.print(\"(\");\n returned.print(output);\n output.print(\")\");\n } else {\n returned.print(output);\n }\n } else {\n print_braced(self, output);\n }\n if (needs_parens) { output.print(\")\"); }\n });\n\n /* -----[ exits ]----- */\n AST_Exit.DEFMETHOD(\"_do_print\", function(output, kind) {\n output.print(kind);\n if (this.value) {\n output.space();\n const comments = this.value.start.comments_before;\n if (comments && comments.length && !output.printed_comments.has(comments)) {\n output.print(\"(\");\n this.value.print(output);\n output.print(\")\");\n } else {\n this.value.print(output);\n }\n }\n output.semicolon();\n });\n DEFPRINT(AST_Return, function(self, output) {\n self._do_print(output, \"return\");\n });\n DEFPRINT(AST_Throw, function(self, output) {\n self._do_print(output, \"throw\");\n });\n\n /* -----[ yield ]----- */\n\n DEFPRINT(AST_Yield, function(self, output) {\n var star = self.is_star ? \"*\" : \"\";\n output.print(\"yield\" + star);\n if (self.expression) {\n output.space();\n self.expression.print(output);\n }\n });\n\n DEFPRINT(AST_Await, function(self, output) {\n output.print(\"await\");\n output.space();\n var e = self.expression;\n var parens = !(\n e instanceof AST_Call\n || e instanceof AST_SymbolRef\n || e instanceof AST_PropAccess\n || e instanceof AST_Unary\n || e instanceof AST_Constant\n );\n if (parens) output.print(\"(\");\n self.expression.print(output);\n if (parens) output.print(\")\");\n });\n\n /* -----[ loop control ]----- */\n AST_LoopControl.DEFMETHOD(\"_do_print\", function(output, kind) {\n output.print(kind);\n if (this.label) {\n output.space();\n this.label.print(output);\n }\n output.semicolon();\n });\n DEFPRINT(AST_Break, function(self, output) {\n self._do_print(output, \"break\");\n });\n DEFPRINT(AST_Continue, function(self, output) {\n self._do_print(output, \"continue\");\n });\n\n /* -----[ if ]----- */\n function make_then(self, output) {\n var b = self.body;\n if (output.option(\"braces\")\n || output.option(\"ie8\") && b instanceof AST_Do)\n return make_block(b, output);\n // The squeezer replaces \"block\"-s that contain only a single\n // statement with the statement itself; technically, the AST\n // is correct, but this can create problems when we output an\n // IF having an ELSE clause where the THEN clause ends in an\n // IF *without* an ELSE block (then the outer ELSE would refer\n // to the inner IF). This function checks for this case and\n // adds the block braces if needed.\n if (!b) return output.force_semicolon();\n while (true) {\n if (b instanceof AST_If) {\n if (!b.alternative) {\n make_block(self.body, output);\n return;\n }\n b = b.alternative;\n } else if (b instanceof AST_StatementWithBody) {\n b = b.body;\n } else break;\n }\n force_statement(self.body, output);\n }\n DEFPRINT(AST_If, function(self, output) {\n output.print(\"if\");\n output.space();\n output.with_parens(function() {\n self.condition.print(output);\n });\n output.space();\n if (self.alternative) {\n make_then(self, output);\n output.space();\n output.print(\"else\");\n output.space();\n if (self.alternative instanceof AST_If)\n self.alternative.print(output);\n else\n force_statement(self.alternative, output);\n } else {\n self._do_print_body(output);\n }\n });\n\n /* -----[ switch ]----- */\n DEFPRINT(AST_Switch, function(self, output) {\n output.print(\"switch\");\n output.space();\n output.with_parens(function() {\n self.expression.print(output);\n });\n output.space();\n var last = self.body.length - 1;\n if (last < 0) print_braced_empty(self, output);\n else output.with_block(function() {\n self.body.forEach(function(branch, i) {\n output.indent(true);\n branch.print(output);\n if (i < last && branch.body.length > 0)\n output.newline();\n });\n });\n });\n AST_SwitchBranch.DEFMETHOD(\"_do_print_body\", function(output) {\n output.newline();\n this.body.forEach(function(stmt) {\n output.indent();\n stmt.print(output);\n output.newline();\n });\n });\n DEFPRINT(AST_Default, function(self, output) {\n output.print(\"default:\");\n self._do_print_body(output);\n });\n DEFPRINT(AST_Case, function(self, output) {\n output.print(\"case\");\n output.space();\n self.expression.print(output);\n output.print(\":\");\n self._do_print_body(output);\n });\n\n /* -----[ exceptions ]----- */\n DEFPRINT(AST_Try, function(self, output) {\n output.print(\"try\");\n output.space();\n print_braced(self, output);\n if (self.bcatch) {\n output.space();\n self.bcatch.print(output);\n }\n if (self.bfinally) {\n output.space();\n self.bfinally.print(output);\n }\n });\n DEFPRINT(AST_Catch, function(self, output) {\n output.print(\"catch\");\n if (self.argname) {\n output.space();\n output.with_parens(function() {\n self.argname.print(output);\n });\n }\n output.space();\n print_braced(self, output);\n });\n DEFPRINT(AST_Finally, function(self, output) {\n output.print(\"finally\");\n output.space();\n print_braced(self, output);\n });\n\n /* -----[ var/const ]----- */\n AST_Definitions.DEFMETHOD(\"_do_print\", function(output, kind) {\n output.print(kind);\n output.space();\n this.definitions.forEach(function(def, i) {\n if (i) output.comma();\n def.print(output);\n });\n var p = output.parent();\n var in_for = p instanceof AST_For || p instanceof AST_ForIn;\n var output_semicolon = !in_for || p && p.init !== this;\n if (output_semicolon)\n output.semicolon();\n });\n DEFPRINT(AST_Let, function(self, output) {\n self._do_print(output, \"let\");\n });\n DEFPRINT(AST_Var, function(self, output) {\n self._do_print(output, \"var\");\n });\n DEFPRINT(AST_Const, function(self, output) {\n self._do_print(output, \"const\");\n });\n DEFPRINT(AST_Import, function(self, output) {\n output.print(\"import\");\n output.space();\n if (self.imported_name) {\n self.imported_name.print(output);\n }\n if (self.imported_name && self.imported_names) {\n output.print(\",\");\n output.space();\n }\n if (self.imported_names) {\n if (self.imported_names.length === 1 && self.imported_names[0].foreign_name.name === \"*\") {\n self.imported_names[0].print(output);\n } else {\n output.print(\"{\");\n self.imported_names.forEach(function (name_import, i) {\n output.space();\n name_import.print(output);\n if (i < self.imported_names.length - 1) {\n output.print(\",\");\n }\n });\n output.space();\n output.print(\"}\");\n }\n }\n if (self.imported_name || self.imported_names) {\n output.space();\n output.print(\"from\");\n output.space();\n }\n self.module_name.print(output);\n output.semicolon();\n });\n\n DEFPRINT(AST_NameMapping, function(self, output) {\n var is_import = output.parent() instanceof AST_Import;\n var definition = self.name.definition();\n var names_are_different =\n (definition && definition.mangled_name || self.name.name) !==\n self.foreign_name.name;\n if (names_are_different) {\n if (is_import) {\n output.print(self.foreign_name.name);\n } else {\n self.name.print(output);\n }\n output.space();\n output.print(\"as\");\n output.space();\n if (is_import) {\n self.name.print(output);\n } else {\n output.print(self.foreign_name.name);\n }\n } else {\n self.name.print(output);\n }\n });\n\n DEFPRINT(AST_Export, function(self, output) {\n output.print(\"export\");\n output.space();\n if (self.is_default) {\n output.print(\"default\");\n output.space();\n }\n if (self.exported_names) {\n if (self.exported_names.length === 1 && self.exported_names[0].name.name === \"*\") {\n self.exported_names[0].print(output);\n } else {\n output.print(\"{\");\n self.exported_names.forEach(function(name_export, i) {\n output.space();\n name_export.print(output);\n if (i < self.exported_names.length - 1) {\n output.print(\",\");\n }\n });\n output.space();\n output.print(\"}\");\n }\n } else if (self.exported_value) {\n self.exported_value.print(output);\n } else if (self.exported_definition) {\n self.exported_definition.print(output);\n if (self.exported_definition instanceof AST_Definitions) return;\n }\n if (self.module_name) {\n output.space();\n output.print(\"from\");\n output.space();\n self.module_name.print(output);\n }\n if (self.exported_value\n && !(self.exported_value instanceof AST_Defun ||\n self.exported_value instanceof AST_Function ||\n self.exported_value instanceof AST_Class)\n || self.module_name\n || self.exported_names\n ) {\n output.semicolon();\n }\n });\n\n function parenthesize_for_noin(node, output, noin) {\n var parens = false;\n // need to take some precautions here:\n // https://github.com/mishoo/UglifyJS2/issues/60\n if (noin) node.walk(new TreeWalker(function(node) {\n if (parens || node instanceof AST_Scope) return true;\n if (node instanceof AST_Binary && node.operator == \"in\") {\n parens = true;\n return true;\n }\n }));\n node.print(output, parens);\n }\n\n DEFPRINT(AST_VarDef, function(self, output) {\n self.name.print(output);\n if (self.value) {\n output.space();\n output.print(\"=\");\n output.space();\n var p = output.parent(1);\n var noin = p instanceof AST_For || p instanceof AST_ForIn;\n parenthesize_for_noin(self.value, output, noin);\n }\n });\n\n /* -----[ other expressions ]----- */\n DEFPRINT(AST_Call, function(self, output) {\n self.expression.print(output);\n if (self instanceof AST_New && self.args.length === 0)\n return;\n if (self.expression instanceof AST_Call || self.expression instanceof AST_Lambda) {\n output.add_mapping(self.start);\n }\n output.with_parens(function() {\n self.args.forEach(function(expr, i) {\n if (i) output.comma();\n expr.print(output);\n });\n });\n });\n DEFPRINT(AST_New, function(self, output) {\n output.print(\"new\");\n output.space();\n AST_Call.prototype._codegen(self, output);\n });\n\n AST_Sequence.DEFMETHOD(\"_do_print\", function(output) {\n this.expressions.forEach(function(node, index) {\n if (index > 0) {\n output.comma();\n if (output.should_break()) {\n output.newline();\n output.indent();\n }\n }\n node.print(output);\n });\n });\n DEFPRINT(AST_Sequence, function(self, output) {\n self._do_print(output);\n // var p = output.parent();\n // if (p instanceof AST_Statement) {\n // output.with_indent(output.next_indent(), function(){\n // self._do_print(output);\n // });\n // } else {\n // self._do_print(output);\n // }\n });\n DEFPRINT(AST_Dot, function(self, output) {\n var expr = self.expression;\n expr.print(output);\n var prop = self.property;\n if (output.option(\"ie8\") && RESERVED_WORDS.has(prop)) {\n output.print(\"[\");\n output.add_mapping(self.end);\n output.print_string(prop);\n output.print(\"]\");\n } else {\n if (expr instanceof AST_Number && expr.getValue() >= 0) {\n if (!/[xa-f.)]/i.test(output.last())) {\n output.print(\".\");\n }\n }\n output.print(\".\");\n // the name after dot would be mapped about here.\n output.add_mapping(self.end);\n output.print_name(prop);\n }\n });\n DEFPRINT(AST_Sub, function(self, output) {\n self.expression.print(output);\n output.print(\"[\");\n self.property.print(output);\n output.print(\"]\");\n });\n DEFPRINT(AST_UnaryPrefix, function(self, output) {\n var op = self.operator;\n output.print(op);\n if (/^[a-z]/i.test(op)\n || (/[+-]$/.test(op)\n && self.expression instanceof AST_UnaryPrefix\n && /^[+-]/.test(self.expression.operator))) {\n output.space();\n }\n self.expression.print(output);\n });\n DEFPRINT(AST_UnaryPostfix, function(self, output) {\n self.expression.print(output);\n output.print(self.operator);\n });\n DEFPRINT(AST_Binary, function(self, output) {\n var op = self.operator;\n self.left.print(output);\n if (op[0] == \">\" /* \">>\" \">>>\" \">\" \">=\" */\n && self.left instanceof AST_UnaryPostfix\n && self.left.operator == \"--\") {\n // space is mandatory to avoid outputting -->\n output.print(\" \");\n } else {\n // the space is optional depending on \"beautify\"\n output.space();\n }\n output.print(op);\n if ((op == \"<\" || op == \"<<\")\n && self.right instanceof AST_UnaryPrefix\n && self.right.operator == \"!\"\n && self.right.expression instanceof AST_UnaryPrefix\n && self.right.expression.operator == \"--\") {\n // space is mandatory to avoid outputting x ? y : false\n if (self.left.operator == \"||\") {\n var lr = self.left.right.evaluate(compressor);\n if (!lr) return make_node(AST_Conditional, self, {\n condition: self.left.left,\n consequent: self.right,\n alternative: self.left.right\n }).optimize(compressor);\n }\n break;\n case \"||\":\n var ll = has_flag(self.left, TRUTHY)\n ? true\n : has_flag(self.left, FALSY)\n ? false\n : self.left.evaluate(compressor);\n if (!ll) {\n compressor.warn(\"Condition left of || always false [{file}:{line},{col}]\", self.start);\n return make_sequence(self, [ self.left, self.right ]).optimize(compressor);\n } else if (!(ll instanceof AST_Node)) {\n compressor.warn(\"Condition left of || always true [{file}:{line},{col}]\", self.start);\n return maintain_this_binding(compressor.parent(), compressor.self(), self.left).optimize(compressor);\n }\n var rr = self.right.evaluate(compressor);\n if (!rr) {\n var parent = compressor.parent();\n if (parent.operator == \"||\" && parent.left === compressor.self() || compressor.in_boolean_context()) {\n compressor.warn(\"Dropping side-effect-free || [{file}:{line},{col}]\", self.start);\n return self.left.optimize(compressor);\n }\n } else if (!(rr instanceof AST_Node)) {\n if (compressor.in_boolean_context()) {\n compressor.warn(\"Boolean || always true [{file}:{line},{col}]\", self.start);\n return make_sequence(self, [\n self.left,\n make_node(AST_True, self)\n ]).optimize(compressor);\n } else {\n set_flag(self, TRUTHY);\n }\n }\n if (self.left.operator == \"&&\") {\n var lr = self.left.right.evaluate(compressor);\n if (lr && !(lr instanceof AST_Node)) return make_node(AST_Conditional, self, {\n condition: self.left.left,\n consequent: self.left.right,\n alternative: self.right\n }).optimize(compressor);\n }\n break;\n }\n var associative = true;\n switch (self.operator) {\n case \"+\":\n // \"foo\" + (\"bar\" + x) => \"foobar\" + x\n if (self.left instanceof AST_Constant\n && self.right instanceof AST_Binary\n && self.right.operator == \"+\"\n && self.right.left instanceof AST_Constant\n && self.right.is_string(compressor)) {\n self = make_node(AST_Binary, self, {\n operator: \"+\",\n left: make_node(AST_String, self.left, {\n value: \"\" + self.left.getValue() + self.right.left.getValue(),\n start: self.left.start,\n end: self.right.left.end\n }),\n right: self.right.right\n });\n }\n // (x + \"foo\") + \"bar\" => x + \"foobar\"\n if (self.right instanceof AST_Constant\n && self.left instanceof AST_Binary\n && self.left.operator == \"+\"\n && self.left.right instanceof AST_Constant\n && self.left.is_string(compressor)) {\n self = make_node(AST_Binary, self, {\n operator: \"+\",\n left: self.left.left,\n right: make_node(AST_String, self.right, {\n value: \"\" + self.left.right.getValue() + self.right.getValue(),\n start: self.left.right.start,\n end: self.right.end\n })\n });\n }\n // (x + \"foo\") + (\"bar\" + y) => (x + \"foobar\") + y\n if (self.left instanceof AST_Binary\n && self.left.operator == \"+\"\n && self.left.is_string(compressor)\n && self.left.right instanceof AST_Constant\n && self.right instanceof AST_Binary\n && self.right.operator == \"+\"\n && self.right.left instanceof AST_Constant\n && self.right.is_string(compressor)) {\n self = make_node(AST_Binary, self, {\n operator: \"+\",\n left: make_node(AST_Binary, self.left, {\n operator: \"+\",\n left: self.left.left,\n right: make_node(AST_String, self.left.right, {\n value: \"\" + self.left.right.getValue() + self.right.left.getValue(),\n start: self.left.right.start,\n end: self.right.left.end\n })\n }),\n right: self.right.right\n });\n }\n // a + -b => a - b\n if (self.right instanceof AST_UnaryPrefix\n && self.right.operator == \"-\"\n && self.left.is_number(compressor)) {\n self = make_node(AST_Binary, self, {\n operator: \"-\",\n left: self.left,\n right: self.right.expression\n });\n break;\n }\n // -a + b => b - a\n if (self.left instanceof AST_UnaryPrefix\n && self.left.operator == \"-\"\n && reversible()\n && self.right.is_number(compressor)) {\n self = make_node(AST_Binary, self, {\n operator: \"-\",\n left: self.right,\n right: self.left.expression\n });\n break;\n }\n case \"*\":\n associative = compressor.option(\"unsafe_math\");\n case \"&\":\n case \"|\":\n case \"^\":\n // a + +b => +b + a\n if (self.left.is_number(compressor)\n && self.right.is_number(compressor)\n && reversible()\n && !(self.left instanceof AST_Binary\n && self.left.operator != self.operator\n && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) {\n var reversed = make_node(AST_Binary, self, {\n operator: self.operator,\n left: self.right,\n right: self.left\n });\n if (self.right instanceof AST_Constant\n && !(self.left instanceof AST_Constant)) {\n self = best_of(compressor, reversed, self);\n } else {\n self = best_of(compressor, self, reversed);\n }\n }\n if (associative && self.is_number(compressor)) {\n // a + (b + c) => (a + b) + c\n if (self.right instanceof AST_Binary\n && self.right.operator == self.operator) {\n self = make_node(AST_Binary, self, {\n operator: self.operator,\n left: make_node(AST_Binary, self.left, {\n operator: self.operator,\n left: self.left,\n right: self.right.left,\n start: self.left.start,\n end: self.right.left.end\n }),\n right: self.right.right\n });\n }\n // (n + 2) + 3 => 5 + n\n // (2 * n) * 3 => 6 + n\n if (self.right instanceof AST_Constant\n && self.left instanceof AST_Binary\n && self.left.operator == self.operator) {\n if (self.left.left instanceof AST_Constant) {\n self = make_node(AST_Binary, self, {\n operator: self.operator,\n left: make_node(AST_Binary, self.left, {\n operator: self.operator,\n left: self.left.left,\n right: self.right,\n start: self.left.left.start,\n end: self.right.end\n }),\n right: self.left.right\n });\n } else if (self.left.right instanceof AST_Constant) {\n self = make_node(AST_Binary, self, {\n operator: self.operator,\n left: make_node(AST_Binary, self.left, {\n operator: self.operator,\n left: self.left.right,\n right: self.right,\n start: self.left.right.start,\n end: self.right.end\n }),\n right: self.left.left\n });\n }\n }\n // (a | 1) | (2 | d) => (3 | a) | b\n if (self.left instanceof AST_Binary\n && self.left.operator == self.operator\n && self.left.right instanceof AST_Constant\n && self.right instanceof AST_Binary\n && self.right.operator == self.operator\n && self.right.left instanceof AST_Constant) {\n self = make_node(AST_Binary, self, {\n operator: self.operator,\n left: make_node(AST_Binary, self.left, {\n operator: self.operator,\n left: make_node(AST_Binary, self.left.left, {\n operator: self.operator,\n left: self.left.right,\n right: self.right.left,\n start: self.left.right.start,\n end: self.right.left.end\n }),\n right: self.left.left\n }),\n right: self.right.right\n });\n }\n }\n }\n }\n // x && (y && z) ==> x && y && z\n // x || (y || z) ==> x || y || z\n // x + (\"y\" + z) ==> x + \"y\" + z\n // \"x\" + (y + \"z\")==> \"x\" + y + \"z\"\n if (self.right instanceof AST_Binary\n && self.right.operator == self.operator\n && (lazy_op.has(self.operator)\n || (self.operator == \"+\"\n && (self.right.left.is_string(compressor)\n || (self.left.is_string(compressor)\n && self.right.right.is_string(compressor)))))\n ) {\n self.left = make_node(AST_Binary, self.left, {\n operator : self.operator,\n left : self.left,\n right : self.right.left\n });\n self.right = self.right.right;\n return self.transform(compressor);\n }\n var ev = self.evaluate(compressor);\n if (ev !== self) {\n ev = make_node_from_constant(ev, self).optimize(compressor);\n return best_of(compressor, ev, self);\n }\n return self;\n});\n\ndef_optimize(AST_SymbolExport, function(self, compressor) {\n return self;\n});\n\nfunction recursive_ref(compressor, def) {\n var node;\n for (var i = 0; node = compressor.parent(i); i++) {\n if (node instanceof AST_Lambda) {\n var name = node.name;\n if (name && name.definition() === def) break;\n }\n }\n return node;\n}\n\nfunction within_array_or_object_literal(compressor) {\n var node, level = 0;\n while (node = compressor.parent(level++)) {\n if (node instanceof AST_Statement) return false;\n if (node instanceof AST_Array\n || node instanceof AST_ObjectKeyVal\n || node instanceof AST_Object) {\n return true;\n }\n }\n return false;\n}\n\ndef_optimize(AST_SymbolRef, function(self, compressor) {\n if (!compressor.option(\"ie8\")\n && is_undeclared_ref(self)\n && (!self.scope.uses_with || !compressor.find_parent(AST_With))) {\n switch (self.name) {\n case \"undefined\":\n return make_node(AST_Undefined, self).optimize(compressor);\n case \"NaN\":\n return make_node(AST_NaN, self).optimize(compressor);\n case \"Infinity\":\n return make_node(AST_Infinity, self).optimize(compressor);\n }\n }\n var parent = compressor.parent();\n if (compressor.option(\"reduce_vars\") && is_lhs(self, parent) !== self) {\n const def = self.definition();\n if (compressor.top_retain && def.global && compressor.top_retain(def)) {\n def.fixed = false;\n def.should_replace = false;\n def.single_use = false;\n return self;\n }\n var fixed = self.fixed_value();\n var single_use = def.single_use\n && !(parent instanceof AST_Call && parent.is_expr_pure(compressor));\n if (single_use && (fixed instanceof AST_Lambda || fixed instanceof AST_Class)) {\n if (retain_top_func(fixed, compressor)) {\n single_use = false;\n } else if (def.scope !== self.scope\n && (def.escaped == 1\n || has_flag(fixed, INLINED)\n || within_array_or_object_literal(compressor))) {\n single_use = false;\n } else if (recursive_ref(compressor, def)) {\n single_use = false;\n } else if (def.scope !== self.scope || def.orig[0] instanceof AST_SymbolFunarg) {\n single_use = fixed.is_constant_expression(self.scope);\n if (single_use == \"f\") {\n var scope = self.scope;\n do {\n if (scope instanceof AST_Defun || is_func_expr(scope)) {\n set_flag(scope, INLINED);\n }\n } while (scope = scope.parent_scope);\n }\n }\n }\n if (single_use && fixed instanceof AST_Lambda) {\n single_use =\n def.scope === self.scope\n || parent instanceof AST_Call && parent.expression === self;\n }\n if (single_use && fixed instanceof AST_Class && fixed.extends) {\n single_use =\n !fixed.extends.may_throw(compressor)\n && (!(fixed.extends instanceof AST_Call) || fixed.extends.is_expr_pure(compressor));\n }\n const can_pull_in = single_use && fixed;\n if (can_pull_in) {\n if (fixed instanceof AST_DefClass) {\n set_flag(fixed, SQUEEZED);\n fixed = make_node(AST_ClassExpression, fixed, fixed);\n }\n if (fixed instanceof AST_Defun) {\n set_flag(fixed, SQUEEZED);\n fixed = make_node(AST_Function, fixed, fixed);\n }\n if (def.recursive_refs > 0 && fixed.name instanceof AST_SymbolDefun) {\n const defun_def = fixed.name.definition();\n let lambda_def = fixed.variables.get(fixed.name.name);\n let name = lambda_def && lambda_def.orig[0];\n if (!(name instanceof AST_SymbolLambda)) {\n name = make_node(AST_SymbolLambda, fixed.name, fixed.name);\n name.scope = fixed;\n fixed.name = name;\n lambda_def = fixed.def_function(name);\n }\n fixed.walk(new TreeWalker(function(node) {\n if (node instanceof AST_SymbolRef && node.definition() === defun_def) {\n node.thedef = lambda_def;\n lambda_def.references.push(node);\n }\n }));\n }\n if (fixed instanceof AST_Lambda || fixed instanceof AST_Class) {\n find_scope(compressor, true).add_child_scope(fixed);\n }\n return fixed.optimize(compressor);\n }\n if (fixed && def.should_replace === undefined) {\n let init;\n if (fixed instanceof AST_This) {\n if (!(def.orig[0] instanceof AST_SymbolFunarg)\n && def.references.every((ref) =>\n def.scope === ref.scope\n )) {\n init = fixed;\n }\n } else {\n var ev = fixed.evaluate(compressor);\n if (ev !== fixed && (compressor.option(\"unsafe_regexp\") || !(ev instanceof RegExp))) {\n init = make_node_from_constant(ev, fixed);\n }\n }\n if (init) {\n var value_length = init.optimize(compressor).print_to_string().length;\n var fn;\n if (has_symbol_ref(fixed)) {\n fn = function() {\n var result = init.optimize(compressor);\n return result === init ? result.clone(true) : result;\n };\n } else {\n value_length = Math.min(value_length, fixed.print_to_string().length);\n fn = function() {\n var result = best_of_expression(init.optimize(compressor), fixed);\n return result === init || result === fixed ? result.clone(true) : result;\n };\n }\n var name_length = def.name.length;\n var overhead = 0;\n if (compressor.option(\"unused\") && !compressor.exposed(def)) {\n overhead = (name_length + 2 + value_length) / (def.references.length - def.assignments);\n }\n def.should_replace = value_length <= name_length + overhead ? fn : false;\n } else {\n def.should_replace = false;\n }\n }\n if (def.should_replace) {\n return def.should_replace();\n }\n }\n return self;\n\n function has_symbol_ref(value) {\n var found;\n value.walk(new TreeWalker(function(node) {\n if (node instanceof AST_SymbolRef) found = true;\n if (found) return true;\n }));\n return found;\n }\n});\n\nfunction is_atomic(lhs, self) {\n return lhs instanceof AST_SymbolRef || lhs.TYPE === self.TYPE;\n}\n\ndef_optimize(AST_Undefined, function(self, compressor) {\n if (compressor.option(\"unsafe_undefined\")) {\n var undef = find_variable(compressor, \"undefined\");\n if (undef) {\n var ref = make_node(AST_SymbolRef, self, {\n name : \"undefined\",\n scope : undef.scope,\n thedef : undef\n });\n set_flag(ref, UNDEFINED);\n return ref;\n }\n }\n var lhs = is_lhs(compressor.self(), compressor.parent());\n if (lhs && is_atomic(lhs, self)) return self;\n return make_node(AST_UnaryPrefix, self, {\n operator: \"void\",\n expression: make_node(AST_Number, self, {\n value: 0\n })\n });\n});\n\ndef_optimize(AST_Infinity, function(self, compressor) {\n var lhs = is_lhs(compressor.self(), compressor.parent());\n if (lhs && is_atomic(lhs, self)) return self;\n if (compressor.option(\"keep_infinity\")\n && !(lhs && !is_atomic(lhs, self))\n && !find_variable(compressor, \"Infinity\"))\n return self;\n return make_node(AST_Binary, self, {\n operator: \"/\",\n left: make_node(AST_Number, self, {\n value: 1\n }),\n right: make_node(AST_Number, self, {\n value: 0\n })\n });\n});\n\ndef_optimize(AST_NaN, function(self, compressor) {\n var lhs = is_lhs(compressor.self(), compressor.parent());\n if (lhs && !is_atomic(lhs, self)\n || find_variable(compressor, \"NaN\")) {\n return make_node(AST_Binary, self, {\n operator: \"/\",\n left: make_node(AST_Number, self, {\n value: 0\n }),\n right: make_node(AST_Number, self, {\n value: 0\n })\n });\n }\n return self;\n});\n\nfunction is_reachable(self, defs) {\n var reachable = false;\n var find_ref = new TreeWalker(function(node) {\n if (reachable) return true;\n if (node instanceof AST_SymbolRef && member(node.definition(), defs)) {\n return reachable = true;\n }\n });\n var scan_scope = new TreeWalker(function(node) {\n if (reachable) return true;\n if (node instanceof AST_Scope && node !== self) {\n var parent = scan_scope.parent();\n if (parent instanceof AST_Call && parent.expression === node) return;\n node.walk(find_ref);\n return true;\n }\n });\n self.walk(scan_scope);\n return reachable;\n}\n\nconst ASSIGN_OPS = makePredicate(\"+ - / * % >> << >>> | ^ &\");\nconst ASSIGN_OPS_COMMUTATIVE = makePredicate(\"* | ^ &\");\ndef_optimize(AST_Assign, function(self, compressor) {\n var def;\n if (compressor.option(\"dead_code\")\n && self.left instanceof AST_SymbolRef\n && (def = self.left.definition()).scope === compressor.find_parent(AST_Lambda)) {\n var level = 0, node, parent = self;\n do {\n node = parent;\n parent = compressor.parent(level++);\n if (parent instanceof AST_Exit) {\n if (in_try(level, parent)) break;\n if (is_reachable(def.scope, [ def ])) break;\n if (self.operator == \"=\") return self.right;\n def.fixed = false;\n return make_node(AST_Binary, self, {\n operator: self.operator.slice(0, -1),\n left: self.left,\n right: self.right\n }).optimize(compressor);\n }\n } while (parent instanceof AST_Binary && parent.right === node\n || parent instanceof AST_Sequence && parent.tail_node() === node);\n }\n self = self.lift_sequences(compressor);\n if (self.operator == \"=\" && self.left instanceof AST_SymbolRef && self.right instanceof AST_Binary) {\n // x = expr1 OP expr2\n if (self.right.left instanceof AST_SymbolRef\n && self.right.left.name == self.left.name\n && ASSIGN_OPS.has(self.right.operator)) {\n // x = x - 2 ---> x -= 2\n self.operator = self.right.operator + \"=\";\n self.right = self.right.right;\n } else if (self.right.right instanceof AST_SymbolRef\n && self.right.right.name == self.left.name\n && ASSIGN_OPS_COMMUTATIVE.has(self.right.operator)\n && !self.right.left.has_side_effects(compressor)) {\n // x = 2 & x ---> x &= 2\n self.operator = self.right.operator + \"=\";\n self.right = self.right.left;\n }\n }\n return self;\n\n function in_try(level, node) {\n var right = self.right;\n self.right = make_node(AST_Null, right);\n var may_throw = node.may_throw(compressor);\n self.right = right;\n var scope = self.left.definition().scope;\n var parent;\n while ((parent = compressor.parent(level++)) !== scope) {\n if (parent instanceof AST_Try) {\n if (parent.bfinally) return true;\n if (may_throw && parent.bcatch) return true;\n }\n }\n }\n});\n\ndef_optimize(AST_DefaultAssign, function(self, compressor) {\n if (!compressor.option(\"evaluate\")) {\n return self;\n }\n var evaluateRight = self.right.evaluate(compressor);\n\n // `[x = undefined] = foo` ---> `[x] = foo`\n if (evaluateRight === undefined) {\n self = self.left;\n } else if (evaluateRight !== self.right) {\n evaluateRight = make_node_from_constant(evaluateRight, self.right);\n self.right = best_of_expression(evaluateRight, self.right);\n }\n\n return self;\n});\n\ndef_optimize(AST_Conditional, function(self, compressor) {\n if (!compressor.option(\"conditionals\")) return self;\n // This looks like lift_sequences(), should probably be under \"sequences\"\n if (self.condition instanceof AST_Sequence) {\n var expressions = self.condition.expressions.slice();\n self.condition = expressions.pop();\n expressions.push(self);\n return make_sequence(self, expressions);\n }\n var cond = self.condition.evaluate(compressor);\n if (cond !== self.condition) {\n if (cond) {\n compressor.warn(\"Condition always true [{file}:{line},{col}]\", self.start);\n return maintain_this_binding(compressor.parent(), compressor.self(), self.consequent);\n } else {\n compressor.warn(\"Condition always false [{file}:{line},{col}]\", self.start);\n return maintain_this_binding(compressor.parent(), compressor.self(), self.alternative);\n }\n }\n var negated = cond.negate(compressor, first_in_statement(compressor));\n if (best_of(compressor, cond, negated) === negated) {\n self = make_node(AST_Conditional, self, {\n condition: negated,\n consequent: self.alternative,\n alternative: self.consequent\n });\n }\n var condition = self.condition;\n var consequent = self.consequent;\n var alternative = self.alternative;\n // x?x:y --> x||y\n if (condition instanceof AST_SymbolRef\n && consequent instanceof AST_SymbolRef\n && condition.definition() === consequent.definition()) {\n return make_node(AST_Binary, self, {\n operator: \"||\",\n left: condition,\n right: alternative\n });\n }\n // if (foo) exp = something; else exp = something_else;\n // |\n // v\n // exp = foo ? something : something_else;\n if (consequent instanceof AST_Assign\n && alternative instanceof AST_Assign\n && consequent.operator == alternative.operator\n && consequent.left.equivalent_to(alternative.left)\n && (!self.condition.has_side_effects(compressor)\n || consequent.operator == \"=\"\n && !consequent.left.has_side_effects(compressor))) {\n return make_node(AST_Assign, self, {\n operator: consequent.operator,\n left: consequent.left,\n right: make_node(AST_Conditional, self, {\n condition: self.condition,\n consequent: consequent.right,\n alternative: alternative.right\n })\n });\n }\n // x ? y(a) : y(b) --> y(x ? a : b)\n var arg_index;\n if (consequent instanceof AST_Call\n && alternative.TYPE === consequent.TYPE\n && consequent.args.length > 0\n && consequent.args.length == alternative.args.length\n && consequent.expression.equivalent_to(alternative.expression)\n && !self.condition.has_side_effects(compressor)\n && !consequent.expression.has_side_effects(compressor)\n && typeof (arg_index = single_arg_diff()) == \"number\") {\n var node = consequent.clone();\n node.args[arg_index] = make_node(AST_Conditional, self, {\n condition: self.condition,\n consequent: consequent.args[arg_index],\n alternative: alternative.args[arg_index]\n });\n return node;\n }\n // x?y?z:a:a --> x&&y?z:a\n if (consequent instanceof AST_Conditional\n && consequent.alternative.equivalent_to(alternative)) {\n return make_node(AST_Conditional, self, {\n condition: make_node(AST_Binary, self, {\n left: self.condition,\n operator: \"&&\",\n right: consequent.condition\n }),\n consequent: consequent.consequent,\n alternative: alternative\n });\n }\n // x ? y : y --> x, y\n if (consequent.equivalent_to(alternative)) {\n return make_sequence(self, [\n self.condition,\n consequent\n ]).optimize(compressor);\n }\n // x ? y || z : z --> x && y || z\n if (consequent instanceof AST_Binary\n && consequent.operator == \"||\"\n && consequent.right.equivalent_to(alternative)) {\n return make_node(AST_Binary, self, {\n operator: \"||\",\n left: make_node(AST_Binary, self, {\n operator: \"&&\",\n left: self.condition,\n right: consequent.left\n }),\n right: alternative\n }).optimize(compressor);\n }\n var in_bool = compressor.in_boolean_context();\n if (is_true(self.consequent)) {\n if (is_false(self.alternative)) {\n // c ? true : false ---> !!c\n return booleanize(self.condition);\n }\n // c ? true : x ---> !!c || x\n return make_node(AST_Binary, self, {\n operator: \"||\",\n left: booleanize(self.condition),\n right: self.alternative\n });\n }\n if (is_false(self.consequent)) {\n if (is_true(self.alternative)) {\n // c ? false : true ---> !c\n return booleanize(self.condition.negate(compressor));\n }\n // c ? false : x ---> !c && x\n return make_node(AST_Binary, self, {\n operator: \"&&\",\n left: booleanize(self.condition.negate(compressor)),\n right: self.alternative\n });\n }\n if (is_true(self.alternative)) {\n // c ? x : true ---> !c || x\n return make_node(AST_Binary, self, {\n operator: \"||\",\n left: booleanize(self.condition.negate(compressor)),\n right: self.consequent\n });\n }\n if (is_false(self.alternative)) {\n // c ? x : false ---> !!c && x\n return make_node(AST_Binary, self, {\n operator: \"&&\",\n left: booleanize(self.condition),\n right: self.consequent\n });\n }\n\n return self;\n\n function booleanize(node) {\n if (node.is_boolean()) return node;\n // !!expression\n return make_node(AST_UnaryPrefix, node, {\n operator: \"!\",\n expression: node.negate(compressor)\n });\n }\n\n // AST_True or !0\n function is_true(node) {\n return node instanceof AST_True\n || in_bool\n && node instanceof AST_Constant\n && node.getValue()\n || (node instanceof AST_UnaryPrefix\n && node.operator == \"!\"\n && node.expression instanceof AST_Constant\n && !node.expression.getValue());\n }\n // AST_False or !1\n function is_false(node) {\n return node instanceof AST_False\n || in_bool\n && node instanceof AST_Constant\n && !node.getValue()\n || (node instanceof AST_UnaryPrefix\n && node.operator == \"!\"\n && node.expression instanceof AST_Constant\n && node.expression.getValue());\n }\n\n function single_arg_diff() {\n var a = consequent.args;\n var b = alternative.args;\n for (var i = 0, len = a.length; i < len; i++) {\n if (a[i] instanceof AST_Expansion) return;\n if (!a[i].equivalent_to(b[i])) {\n if (b[i] instanceof AST_Expansion) return;\n for (var j = i + 1; j < len; j++) {\n if (a[j] instanceof AST_Expansion) return;\n if (!a[j].equivalent_to(b[j])) return;\n }\n return i;\n }\n }\n }\n});\n\ndef_optimize(AST_Boolean, function(self, compressor) {\n if (compressor.in_boolean_context()) return make_node(AST_Number, self, {\n value: +self.value\n });\n var p = compressor.parent();\n if (compressor.option(\"booleans_as_integers\")) {\n if (p instanceof AST_Binary && (p.operator == \"===\" || p.operator == \"!==\")) {\n p.operator = p.operator.replace(/=$/, \"\");\n }\n return make_node(AST_Number, self, {\n value: +self.value\n });\n }\n if (compressor.option(\"booleans\")) {\n if (p instanceof AST_Binary && (p.operator == \"==\"\n || p.operator == \"!=\")) {\n compressor.warn(\"Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]\", {\n operator : p.operator,\n value : self.value,\n file : p.start.file,\n line : p.start.line,\n col : p.start.col,\n });\n return make_node(AST_Number, self, {\n value: +self.value\n });\n }\n return make_node(AST_UnaryPrefix, self, {\n operator: \"!\",\n expression: make_node(AST_Number, self, {\n value: 1 - self.value\n })\n });\n }\n return self;\n});\n\nfunction safe_to_flatten(value, compressor) {\n if (value instanceof AST_SymbolRef) {\n value = value.fixed_value();\n }\n if (!value) return false;\n return !(value instanceof AST_Lambda || value instanceof AST_Class)\n || compressor.parent() instanceof AST_New\n || !value.contains_this();\n}\n\ndef_optimize(AST_Sub, function(self, compressor) {\n var expr = self.expression;\n var prop = self.property;\n if (compressor.option(\"properties\")) {\n var key = prop.evaluate(compressor);\n if (key !== prop) {\n if (typeof key == \"string\") {\n if (key == \"undefined\") {\n key = undefined;\n } else {\n var value = parseFloat(key);\n if (value.toString() == key) {\n key = value;\n }\n }\n }\n prop = self.property = best_of_expression(prop, make_node_from_constant(key, prop).transform(compressor));\n var property = \"\" + key;\n if (is_identifier_string(property)\n && property.length <= prop.print_to_string().length + 1) {\n return make_node(AST_Dot, self, {\n expression: expr,\n property: property,\n quote: prop.quote,\n }).optimize(compressor);\n }\n }\n }\n var fn;\n OPT_ARGUMENTS: if (compressor.option(\"arguments\")\n && expr instanceof AST_SymbolRef\n && expr.name == \"arguments\"\n && expr.definition().orig.length == 1\n && (fn = expr.scope) instanceof AST_Lambda\n && fn.uses_arguments\n && !(fn instanceof AST_Arrow)\n && prop instanceof AST_Number) {\n var index = prop.getValue();\n var params = new Set();\n var argnames = fn.argnames;\n for (var n = 0; n < argnames.length; n++) {\n if (!(argnames[n] instanceof AST_SymbolFunarg)) {\n break OPT_ARGUMENTS; // destructuring parameter - bail\n }\n var param = argnames[n].name;\n if (params.has(param)) {\n break OPT_ARGUMENTS; // duplicate parameter - bail\n }\n params.add(param);\n }\n var argname = fn.argnames[index];\n if (argname && compressor.has_directive(\"use strict\")) {\n var def = argname.definition();\n if (!compressor.option(\"reduce_vars\") || def.assignments || def.orig.length > 1) {\n argname = null;\n }\n } else if (!argname && !compressor.option(\"keep_fargs\") && index < fn.argnames.length + 5) {\n while (index >= fn.argnames.length) {\n argname = make_node(AST_SymbolFunarg, fn, {\n name: fn.make_var_name(\"argument_\" + fn.argnames.length),\n scope: fn\n });\n fn.argnames.push(argname);\n fn.enclosed.push(fn.def_variable(argname));\n }\n }\n if (argname) {\n var sym = make_node(AST_SymbolRef, self, argname);\n sym.reference({});\n clear_flag(argname, UNUSED);\n return sym;\n }\n }\n if (is_lhs(self, compressor.parent())) return self;\n if (key !== prop) {\n var sub = self.flatten_object(property, compressor);\n if (sub) {\n expr = self.expression = sub.expression;\n prop = self.property = sub.property;\n }\n }\n if (compressor.option(\"properties\") && compressor.option(\"side_effects\")\n && prop instanceof AST_Number && expr instanceof AST_Array) {\n var index = prop.getValue();\n var elements = expr.elements;\n var retValue = elements[index];\n FLATTEN: if (safe_to_flatten(retValue, compressor)) {\n var flatten = true;\n var values = [];\n for (var i = elements.length; --i > index;) {\n var value = elements[i].drop_side_effect_free(compressor);\n if (value) {\n values.unshift(value);\n if (flatten && value.has_side_effects(compressor)) flatten = false;\n }\n }\n if (retValue instanceof AST_Expansion) break FLATTEN;\n retValue = retValue instanceof AST_Hole ? make_node(AST_Undefined, retValue) : retValue;\n if (!flatten) values.unshift(retValue);\n while (--i >= 0) {\n var value = elements[i];\n if (value instanceof AST_Expansion) break FLATTEN;\n value = value.drop_side_effect_free(compressor);\n if (value) values.unshift(value);\n else index--;\n }\n if (flatten) {\n values.push(retValue);\n return make_sequence(self, values).optimize(compressor);\n } else return make_node(AST_Sub, self, {\n expression: make_node(AST_Array, expr, {\n elements: values\n }),\n property: make_node(AST_Number, prop, {\n value: index\n })\n });\n }\n }\n var ev = self.evaluate(compressor);\n if (ev !== self) {\n ev = make_node_from_constant(ev, self).optimize(compressor);\n return best_of(compressor, ev, self);\n }\n return self;\n});\n\nAST_Lambda.DEFMETHOD(\"contains_this\", function() {\n var result;\n var self = this;\n self.walk(new TreeWalker(function(node) {\n if (result) return true;\n if (node instanceof AST_This) return result = true;\n if (node !== self && node instanceof AST_Scope && !(node instanceof AST_Arrow)) return true;\n }));\n return result;\n});\n\nAST_PropAccess.DEFMETHOD(\"flatten_object\", function(key, compressor) {\n if (!compressor.option(\"properties\")) return;\n var arrows = compressor.option(\"unsafe_arrows\") && compressor.option(\"ecma\") >= 2015;\n var expr = this.expression;\n if (expr instanceof AST_Object) {\n var props = expr.properties;\n for (var i = props.length; --i >= 0;) {\n var prop = props[i];\n if (\"\" + (prop instanceof AST_ConciseMethod ? prop.key.name : prop.key) == key) {\n if (!props.every((prop) => {\n return prop instanceof AST_ObjectKeyVal\n || arrows && prop instanceof AST_ConciseMethod && !prop.is_generator;\n })) break;\n if (!safe_to_flatten(prop.value, compressor)) break;\n return make_node(AST_Sub, this, {\n expression: make_node(AST_Array, expr, {\n elements: props.map(function(prop) {\n var v = prop.value;\n if (v instanceof AST_Accessor) v = make_node(AST_Function, v, v);\n var k = prop.key;\n if (k instanceof AST_Node && !(k instanceof AST_SymbolMethod)) {\n return make_sequence(prop, [ k, v ]);\n }\n return v;\n })\n }),\n property: make_node(AST_Number, this, {\n value: i\n })\n });\n }\n }\n }\n});\n\ndef_optimize(AST_Dot, function(self, compressor) {\n if (self.property == \"arguments\" || self.property == \"caller\") {\n compressor.warn(\"Function.prototype.{prop} not supported [{file}:{line},{col}]\", {\n prop: self.property,\n file: self.start.file,\n line: self.start.line,\n col: self.start.col\n });\n }\n if (is_lhs(self, compressor.parent())) return self;\n if (compressor.option(\"unsafe_proto\")\n && self.expression instanceof AST_Dot\n && self.expression.property == \"prototype\") {\n var exp = self.expression.expression;\n if (is_undeclared_ref(exp)) switch (exp.name) {\n case \"Array\":\n self.expression = make_node(AST_Array, self.expression, {\n elements: []\n });\n break;\n case \"Function\":\n self.expression = make_node(AST_Function, self.expression, {\n argnames: [],\n body: []\n });\n break;\n case \"Number\":\n self.expression = make_node(AST_Number, self.expression, {\n value: 0\n });\n break;\n case \"Object\":\n self.expression = make_node(AST_Object, self.expression, {\n properties: []\n });\n break;\n case \"RegExp\":\n self.expression = make_node(AST_RegExp, self.expression, {\n value: { source: \"t\", flags: \"\" }\n });\n break;\n case \"String\":\n self.expression = make_node(AST_String, self.expression, {\n value: \"\"\n });\n break;\n }\n }\n var sub = self.flatten_object(self.property, compressor);\n if (sub) return sub.optimize(compressor);\n var ev = self.evaluate(compressor);\n if (ev !== self) {\n ev = make_node_from_constant(ev, self).optimize(compressor);\n return best_of(compressor, ev, self);\n }\n return self;\n});\n\nfunction literals_in_boolean_context(self, compressor) {\n if (compressor.in_boolean_context()) {\n return best_of(compressor, self, make_sequence(self, [\n self,\n make_node(AST_True, self)\n ]).optimize(compressor));\n }\n return self;\n}\n\nfunction inline_array_like_spread(self, compressor, elements) {\n for (var i = 0; i < elements.length; i++) {\n var el = elements[i];\n if (el instanceof AST_Expansion) {\n var expr = el.expression;\n if ( expr instanceof AST_Array) {\n elements.splice(i, 1, ...expr.elements);\n // Step back one, as the element at i is now new.\n i--;\n }\n // In array-like spread, spreading a non-iterable value is TypeError.\n // We therefore can’t optimize anything else, unlike with object spread.\n }\n }\n return self;\n}\n\ndef_optimize(AST_Array, function(self, compressor) {\n var optimized = literals_in_boolean_context(self, compressor);\n if (optimized !== self) {\n return optimized;\n }\n return inline_array_like_spread(self, compressor, self.elements);\n});\n\ndef_optimize(AST_Object, function(self, compressor) {\n var optimized = literals_in_boolean_context(self, compressor);\n if (optimized !== self) {\n return optimized;\n }\n var props = self.properties;\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n if (prop instanceof AST_Expansion) {\n var expr = prop.expression;\n if (expr instanceof AST_Object) {\n props.splice.apply(props, [i, 1].concat(prop.expression.properties));\n // Step back one, as the property at i is now new.\n i--;\n } else if (expr instanceof AST_Constant\n && !(expr instanceof AST_String)) {\n // Unlike array-like spread, in object spread, spreading a\n // non-iterable value silently does nothing; it is thus safe\n // to remove. AST_String is the only iterable AST_Constant.\n props.splice(i, 1);\n }\n }\n }\n return self;\n});\n\ndef_optimize(AST_RegExp, literals_in_boolean_context);\n\ndef_optimize(AST_Return, function(self, compressor) {\n if (self.value && is_undefined(self.value, compressor)) {\n self.value = null;\n }\n return self;\n});\n\ndef_optimize(AST_Arrow, opt_AST_Lambda);\n\ndef_optimize(AST_Function, function(self, compressor) {\n self = opt_AST_Lambda(self, compressor);\n if (compressor.option(\"unsafe_arrows\")\n && compressor.option(\"ecma\") >= 2015\n && !self.name\n && !self.is_generator\n && !self.uses_arguments\n && !self.pinned()) {\n var has_special_symbol = false;\n self.walk(new TreeWalker(function(node) {\n if (has_special_symbol) return true;\n if (node instanceof AST_This) {\n has_special_symbol = true;\n return true;\n }\n }));\n if (!has_special_symbol) return make_node(AST_Arrow, self, self).optimize(compressor);\n }\n return self;\n});\n\ndef_optimize(AST_Class, function(self, compressor) {\n // HACK to avoid compress failure.\n // AST_Class is not really an AST_Scope/AST_Block as it lacks a body.\n return self;\n});\n\ndef_optimize(AST_Yield, function(self, compressor) {\n if (self.expression && !self.is_star && is_undefined(self.expression, compressor)) {\n self.expression = null;\n }\n return self;\n});\n\ndef_optimize(AST_TemplateString, function(self, compressor) {\n if (!compressor.option(\"evaluate\")\n || compressor.parent() instanceof AST_PrefixedTemplateString)\n return self;\n\n var segments = [];\n for (var i = 0; i < self.segments.length; i++) {\n var segment = self.segments[i];\n if (segment instanceof AST_Node) {\n var result = segment.evaluate(compressor);\n // Evaluate to constant value\n // Constant value shorter than ${segment}\n if (result !== segment && (result + \"\").length <= segment.print_to_string().length + \"${}\".length) {\n // There should always be a previous and next segment if segment is a node\n segments[segments.length - 1].value = segments[segments.length - 1].value + result + self.segments[++i].value;\n continue;\n }\n }\n segments.push(segment);\n }\n self.segments = segments;\n\n return segments.length == 1 ? make_node(AST_String, self, segments[0]) : self;\n});\n\ndef_optimize(AST_PrefixedTemplateString, function(self, compressor) {\n return self;\n});\n\n// [\"p\"]:1 ---> p:1\n// [42]:1 ---> 42:1\nfunction lift_key(self, compressor) {\n if (!compressor.option(\"computed_props\")) return self;\n // save a comparison in the typical case\n if (!(self.key instanceof AST_Constant)) return self;\n // whitelist acceptable props as not all AST_Constants are true constants\n if (self.key instanceof AST_String || self.key instanceof AST_Number) {\n if (self.key.value === \"__proto__\") return self;\n if (self.key.value == \"constructor\"\n && compressor.parent() instanceof AST_Class) return self;\n if (self instanceof AST_ObjectKeyVal) {\n self.key = self.key.value;\n } else {\n self.key = make_node(AST_SymbolMethod, self.key, {\n name: self.key.value\n });\n }\n }\n return self;\n}\n\ndef_optimize(AST_ObjectProperty, lift_key);\n\ndef_optimize(AST_ConciseMethod, function(self, compressor) {\n lift_key(self, compressor);\n // p(){return x;} ---> p:()=>x\n if (compressor.option(\"arrows\")\n && compressor.parent() instanceof AST_Object\n && !self.is_generator\n && !self.value.uses_arguments\n && !self.value.pinned()\n && self.value.body.length == 1\n && self.value.body[0] instanceof AST_Return\n && self.value.body[0].value\n && !self.value.contains_this()) {\n var arrow = make_node(AST_Arrow, self.value, self.value);\n arrow.async = self.async;\n arrow.is_generator = self.is_generator;\n return make_node(AST_ObjectKeyVal, self, {\n key: self.key instanceof AST_SymbolMethod ? self.key.name : self.key,\n value: arrow,\n quote: self.quote,\n });\n }\n return self;\n});\n\ndef_optimize(AST_ObjectKeyVal, function(self, compressor) {\n lift_key(self, compressor);\n // p:function(){} ---> p(){}\n // p:function*(){} ---> *p(){}\n // p:async function(){} ---> async p(){}\n // p:()=>{} ---> p(){}\n // p:async()=>{} ---> async p(){}\n var unsafe_methods = compressor.option(\"unsafe_methods\");\n if (unsafe_methods\n && compressor.option(\"ecma\") >= 2015\n && (!(unsafe_methods instanceof RegExp) || unsafe_methods.test(self.key + \"\"))) {\n var key = self.key;\n var value = self.value;\n var is_arrow_with_block = value instanceof AST_Arrow\n && Array.isArray(value.body)\n && !value.contains_this();\n if ((is_arrow_with_block || value instanceof AST_Function) && !value.name) {\n return make_node(AST_ConciseMethod, self, {\n async: value.async,\n is_generator: value.is_generator,\n key: key instanceof AST_Node ? key : make_node(AST_SymbolMethod, self, {\n name: key,\n }),\n value: make_node(AST_Accessor, value, value),\n quote: self.quote,\n });\n }\n }\n return self;\n});\n\ndef_optimize(AST_Destructuring, function(self, compressor) {\n if (compressor.option(\"pure_getters\") == true\n && compressor.option(\"unused\")\n && !self.is_array\n && Array.isArray(self.names)\n && !is_destructuring_export_decl(compressor)) {\n var keep = [];\n for (var i = 0; i < self.names.length; i++) {\n var elem = self.names[i];\n if (!(elem instanceof AST_ObjectKeyVal\n && typeof elem.key == \"string\"\n && elem.value instanceof AST_SymbolDeclaration\n && !should_retain(compressor, elem.value.definition()))) {\n keep.push(elem);\n }\n }\n if (keep.length != self.names.length) {\n self.names = keep;\n }\n }\n return self;\n\n function is_destructuring_export_decl(compressor) {\n var ancestors = [/^VarDef$/, /^(Const|Let|Var)$/, /^Export$/];\n for (var a = 0, p = 0, len = ancestors.length; a < len; p++) {\n var parent = compressor.parent(p);\n if (!parent) return false;\n if (a === 0 && parent.TYPE == \"Destructuring\") continue;\n if (!ancestors[a].test(parent.TYPE)) {\n return false;\n }\n a++;\n }\n return true;\n }\n\n function should_retain(compressor, def) {\n if (def.references.length) return true;\n if (!def.global) return false;\n if (compressor.toplevel.vars) {\n if (compressor.top_retain) {\n return compressor.top_retain(def);\n }\n return false;\n }\n return true;\n }\n});\n\nexport {\n Compressor,\n};\n","export var domprops = [\n \"$&\",\n \"$'\",\n \"$*\",\n \"$+\",\n \"$1\",\n \"$2\",\n \"$3\",\n \"$4\",\n \"$5\",\n \"$6\",\n \"$7\",\n \"$8\",\n \"$9\",\n \"$_\",\n \"$`\",\n \"$input\",\n \"@@iterator\",\n \"ABORT_ERR\",\n \"ACTIVE\",\n \"ACTIVE_ATTRIBUTES\",\n \"ACTIVE_TEXTURE\",\n \"ACTIVE_UNIFORMS\",\n \"ADDITION\",\n \"ALIASED_LINE_WIDTH_RANGE\",\n \"ALIASED_POINT_SIZE_RANGE\",\n \"ALLOW_KEYBOARD_INPUT\",\n \"ALLPASS\",\n \"ALPHA\",\n \"ALPHA_BITS\",\n \"ALT_MASK\",\n \"ALWAYS\",\n \"ANY_TYPE\",\n \"ANY_UNORDERED_NODE_TYPE\",\n \"ARRAY_BUFFER\",\n \"ARRAY_BUFFER_BINDING\",\n \"ATTACHED_SHADERS\",\n \"ATTRIBUTE_NODE\",\n \"AT_TARGET\",\n \"AddSearchProvider\",\n \"AnalyserNode\",\n \"AnimationEvent\",\n \"AnonXMLHttpRequest\",\n \"ApplicationCache\",\n \"ApplicationCacheErrorEvent\",\n \"Array\",\n \"ArrayBuffer\",\n \"Attr\",\n \"Audio\",\n \"AudioBuffer\",\n \"AudioBufferSourceNode\",\n \"AudioContext\",\n \"AudioDestinationNode\",\n \"AudioListener\",\n \"AudioNode\",\n \"AudioParam\",\n \"AudioProcessingEvent\",\n \"AudioStreamTrack\",\n \"AutocompleteErrorEvent\",\n \"BACK\",\n \"BAD_BOUNDARYPOINTS_ERR\",\n \"BANDPASS\",\n \"BLEND\",\n \"BLEND_COLOR\",\n \"BLEND_DST_ALPHA\",\n \"BLEND_DST_RGB\",\n \"BLEND_EQUATION\",\n \"BLEND_EQUATION_ALPHA\",\n \"BLEND_EQUATION_RGB\",\n \"BLEND_SRC_ALPHA\",\n \"BLEND_SRC_RGB\",\n \"BLUE_BITS\",\n \"BLUR\",\n \"BOOL\",\n \"BOOLEAN_TYPE\",\n \"BOOL_VEC2\",\n \"BOOL_VEC3\",\n \"BOOL_VEC4\",\n \"BOTH\",\n \"BROWSER_DEFAULT_WEBGL\",\n \"BUBBLING_PHASE\",\n \"BUFFER_SIZE\",\n \"BUFFER_USAGE\",\n \"BYTE\",\n \"BYTES_PER_ELEMENT\",\n \"BarProp\",\n \"BaseHref\",\n \"BatteryManager\",\n \"BeforeLoadEvent\",\n \"BeforeUnloadEvent\",\n \"BiquadFilterNode\",\n \"Blob\",\n \"BlobEvent\",\n \"Boolean\",\n \"CAPTURING_PHASE\",\n \"CCW\",\n \"CDATASection\",\n \"CDATA_SECTION_NODE\",\n \"CHANGE\",\n \"CHARSET_RULE\",\n \"CHECKING\",\n \"CLAMP_TO_EDGE\",\n \"CLICK\",\n \"CLOSED\",\n \"CLOSING\",\n \"COLOR_ATTACHMENT0\",\n \"COLOR_BUFFER_BIT\",\n \"COLOR_CLEAR_VALUE\",\n \"COLOR_WRITEMASK\",\n \"COMMENT_NODE\",\n \"COMPILE_STATUS\",\n \"COMPRESSED_RGBA_S3TC_DXT1_EXT\",\n \"COMPRESSED_RGBA_S3TC_DXT3_EXT\",\n \"COMPRESSED_RGBA_S3TC_DXT5_EXT\",\n \"COMPRESSED_RGB_S3TC_DXT1_EXT\",\n \"COMPRESSED_TEXTURE_FORMATS\",\n \"CONNECTING\",\n \"CONSTANT_ALPHA\",\n \"CONSTANT_COLOR\",\n \"CONSTRAINT_ERR\",\n \"CONTEXT_LOST_WEBGL\",\n \"CONTROL_MASK\",\n \"COUNTER_STYLE_RULE\",\n \"CSS\",\n \"CSS2Properties\",\n \"CSSCharsetRule\",\n \"CSSConditionRule\",\n \"CSSCounterStyleRule\",\n \"CSSFontFaceRule\",\n \"CSSFontFeatureValuesRule\",\n \"CSSGroupingRule\",\n \"CSSImportRule\",\n \"CSSKeyframeRule\",\n \"CSSKeyframesRule\",\n \"CSSMediaRule\",\n \"CSSMozDocumentRule\",\n \"CSSNameSpaceRule\",\n \"CSSPageRule\",\n \"CSSPrimitiveValue\",\n \"CSSRule\",\n \"CSSRuleList\",\n \"CSSStyleDeclaration\",\n \"CSSStyleRule\",\n \"CSSStyleSheet\",\n \"CSSSupportsRule\",\n \"CSSUnknownRule\",\n \"CSSValue\",\n \"CSSValueList\",\n \"CSSVariablesDeclaration\",\n \"CSSVariablesRule\",\n \"CSSViewportRule\",\n \"CSS_ATTR\",\n \"CSS_CM\",\n \"CSS_COUNTER\",\n \"CSS_CUSTOM\",\n \"CSS_DEG\",\n \"CSS_DIMENSION\",\n \"CSS_EMS\",\n \"CSS_EXS\",\n \"CSS_FILTER_BLUR\",\n \"CSS_FILTER_BRIGHTNESS\",\n \"CSS_FILTER_CONTRAST\",\n \"CSS_FILTER_CUSTOM\",\n \"CSS_FILTER_DROP_SHADOW\",\n \"CSS_FILTER_GRAYSCALE\",\n \"CSS_FILTER_HUE_ROTATE\",\n \"CSS_FILTER_INVERT\",\n \"CSS_FILTER_OPACITY\",\n \"CSS_FILTER_REFERENCE\",\n \"CSS_FILTER_SATURATE\",\n \"CSS_FILTER_SEPIA\",\n \"CSS_GRAD\",\n \"CSS_HZ\",\n \"CSS_IDENT\",\n \"CSS_IN\",\n \"CSS_INHERIT\",\n \"CSS_KHZ\",\n \"CSS_MATRIX\",\n \"CSS_MATRIX3D\",\n \"CSS_MM\",\n \"CSS_MS\",\n \"CSS_NUMBER\",\n \"CSS_PC\",\n \"CSS_PERCENTAGE\",\n \"CSS_PERSPECTIVE\",\n \"CSS_PRIMITIVE_VALUE\",\n \"CSS_PT\",\n \"CSS_PX\",\n \"CSS_RAD\",\n \"CSS_RECT\",\n \"CSS_RGBCOLOR\",\n \"CSS_ROTATE\",\n \"CSS_ROTATE3D\",\n \"CSS_ROTATEX\",\n \"CSS_ROTATEY\",\n \"CSS_ROTATEZ\",\n \"CSS_S\",\n \"CSS_SCALE\",\n \"CSS_SCALE3D\",\n \"CSS_SCALEX\",\n \"CSS_SCALEY\",\n \"CSS_SCALEZ\",\n \"CSS_SKEW\",\n \"CSS_SKEWX\",\n \"CSS_SKEWY\",\n \"CSS_STRING\",\n \"CSS_TRANSLATE\",\n \"CSS_TRANSLATE3D\",\n \"CSS_TRANSLATEX\",\n \"CSS_TRANSLATEY\",\n \"CSS_TRANSLATEZ\",\n \"CSS_UNKNOWN\",\n \"CSS_URI\",\n \"CSS_VALUE_LIST\",\n \"CSS_VH\",\n \"CSS_VMAX\",\n \"CSS_VMIN\",\n \"CSS_VW\",\n \"CULL_FACE\",\n \"CULL_FACE_MODE\",\n \"CURRENT_PROGRAM\",\n \"CURRENT_VERTEX_ATTRIB\",\n \"CUSTOM\",\n \"CW\",\n \"CanvasGradient\",\n \"CanvasPattern\",\n \"CanvasRenderingContext2D\",\n \"CaretPosition\",\n \"ChannelMergerNode\",\n \"ChannelSplitterNode\",\n \"CharacterData\",\n \"ClientRect\",\n \"ClientRectList\",\n \"Clipboard\",\n \"ClipboardEvent\",\n \"CloseEvent\",\n \"Collator\",\n \"CommandEvent\",\n \"Comment\",\n \"CompositionEvent\",\n \"Console\",\n \"Controllers\",\n \"ConvolverNode\",\n \"Counter\",\n \"Crypto\",\n \"CryptoKey\",\n \"CustomEvent\",\n \"DATABASE_ERR\",\n \"DATA_CLONE_ERR\",\n \"DATA_ERR\",\n \"DBLCLICK\",\n \"DECR\",\n \"DECR_WRAP\",\n \"DELETE_STATUS\",\n \"DEPTH_ATTACHMENT\",\n \"DEPTH_BITS\",\n \"DEPTH_BUFFER_BIT\",\n \"DEPTH_CLEAR_VALUE\",\n \"DEPTH_COMPONENT\",\n \"DEPTH_COMPONENT16\",\n \"DEPTH_FUNC\",\n \"DEPTH_RANGE\",\n \"DEPTH_STENCIL\",\n \"DEPTH_STENCIL_ATTACHMENT\",\n \"DEPTH_TEST\",\n \"DEPTH_WRITEMASK\",\n \"DIRECTION_DOWN\",\n \"DIRECTION_LEFT\",\n \"DIRECTION_RIGHT\",\n \"DIRECTION_UP\",\n \"DISABLED\",\n \"DISPATCH_REQUEST_ERR\",\n \"DITHER\",\n \"DOCUMENT_FRAGMENT_NODE\",\n \"DOCUMENT_NODE\",\n \"DOCUMENT_POSITION_CONTAINED_BY\",\n \"DOCUMENT_POSITION_CONTAINS\",\n \"DOCUMENT_POSITION_DISCONNECTED\",\n \"DOCUMENT_POSITION_FOLLOWING\",\n \"DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC\",\n \"DOCUMENT_POSITION_PRECEDING\",\n \"DOCUMENT_TYPE_NODE\",\n \"DOMCursor\",\n \"DOMError\",\n \"DOMException\",\n \"DOMImplementation\",\n \"DOMImplementationLS\",\n \"DOMMatrix\",\n \"DOMMatrixReadOnly\",\n \"DOMParser\",\n \"DOMPoint\",\n \"DOMPointReadOnly\",\n \"DOMQuad\",\n \"DOMRect\",\n \"DOMRectList\",\n \"DOMRectReadOnly\",\n \"DOMRequest\",\n \"DOMSTRING_SIZE_ERR\",\n \"DOMSettableTokenList\",\n \"DOMStringList\",\n \"DOMStringMap\",\n \"DOMTokenList\",\n \"DOMTransactionEvent\",\n \"DOM_DELTA_LINE\",\n \"DOM_DELTA_PAGE\",\n \"DOM_DELTA_PIXEL\",\n \"DOM_INPUT_METHOD_DROP\",\n \"DOM_INPUT_METHOD_HANDWRITING\",\n \"DOM_INPUT_METHOD_IME\",\n \"DOM_INPUT_METHOD_KEYBOARD\",\n \"DOM_INPUT_METHOD_MULTIMODAL\",\n \"DOM_INPUT_METHOD_OPTION\",\n \"DOM_INPUT_METHOD_PASTE\",\n \"DOM_INPUT_METHOD_SCRIPT\",\n \"DOM_INPUT_METHOD_UNKNOWN\",\n \"DOM_INPUT_METHOD_VOICE\",\n \"DOM_KEY_LOCATION_JOYSTICK\",\n \"DOM_KEY_LOCATION_LEFT\",\n \"DOM_KEY_LOCATION_MOBILE\",\n \"DOM_KEY_LOCATION_NUMPAD\",\n \"DOM_KEY_LOCATION_RIGHT\",\n \"DOM_KEY_LOCATION_STANDARD\",\n \"DOM_VK_0\",\n \"DOM_VK_1\",\n \"DOM_VK_2\",\n \"DOM_VK_3\",\n \"DOM_VK_4\",\n \"DOM_VK_5\",\n \"DOM_VK_6\",\n \"DOM_VK_7\",\n \"DOM_VK_8\",\n \"DOM_VK_9\",\n \"DOM_VK_A\",\n \"DOM_VK_ACCEPT\",\n \"DOM_VK_ADD\",\n \"DOM_VK_ALT\",\n \"DOM_VK_ALTGR\",\n \"DOM_VK_AMPERSAND\",\n \"DOM_VK_ASTERISK\",\n \"DOM_VK_AT\",\n \"DOM_VK_ATTN\",\n \"DOM_VK_B\",\n \"DOM_VK_BACKSPACE\",\n \"DOM_VK_BACK_QUOTE\",\n \"DOM_VK_BACK_SLASH\",\n \"DOM_VK_BACK_SPACE\",\n \"DOM_VK_C\",\n \"DOM_VK_CANCEL\",\n \"DOM_VK_CAPS_LOCK\",\n \"DOM_VK_CIRCUMFLEX\",\n \"DOM_VK_CLEAR\",\n \"DOM_VK_CLOSE_BRACKET\",\n \"DOM_VK_CLOSE_CURLY_BRACKET\",\n \"DOM_VK_CLOSE_PAREN\",\n \"DOM_VK_COLON\",\n \"DOM_VK_COMMA\",\n \"DOM_VK_CONTEXT_MENU\",\n \"DOM_VK_CONTROL\",\n \"DOM_VK_CONVERT\",\n \"DOM_VK_CRSEL\",\n \"DOM_VK_CTRL\",\n \"DOM_VK_D\",\n \"DOM_VK_DECIMAL\",\n \"DOM_VK_DELETE\",\n \"DOM_VK_DIVIDE\",\n \"DOM_VK_DOLLAR\",\n \"DOM_VK_DOUBLE_QUOTE\",\n \"DOM_VK_DOWN\",\n \"DOM_VK_E\",\n \"DOM_VK_EISU\",\n \"DOM_VK_END\",\n \"DOM_VK_ENTER\",\n \"DOM_VK_EQUALS\",\n \"DOM_VK_EREOF\",\n \"DOM_VK_ESCAPE\",\n \"DOM_VK_EXCLAMATION\",\n \"DOM_VK_EXECUTE\",\n \"DOM_VK_EXSEL\",\n \"DOM_VK_F\",\n \"DOM_VK_F1\",\n \"DOM_VK_F10\",\n \"DOM_VK_F11\",\n \"DOM_VK_F12\",\n \"DOM_VK_F13\",\n \"DOM_VK_F14\",\n \"DOM_VK_F15\",\n \"DOM_VK_F16\",\n \"DOM_VK_F17\",\n \"DOM_VK_F18\",\n \"DOM_VK_F19\",\n \"DOM_VK_F2\",\n \"DOM_VK_F20\",\n \"DOM_VK_F21\",\n \"DOM_VK_F22\",\n \"DOM_VK_F23\",\n \"DOM_VK_F24\",\n \"DOM_VK_F25\",\n \"DOM_VK_F26\",\n \"DOM_VK_F27\",\n \"DOM_VK_F28\",\n \"DOM_VK_F29\",\n \"DOM_VK_F3\",\n \"DOM_VK_F30\",\n \"DOM_VK_F31\",\n \"DOM_VK_F32\",\n \"DOM_VK_F33\",\n \"DOM_VK_F34\",\n \"DOM_VK_F35\",\n \"DOM_VK_F36\",\n \"DOM_VK_F4\",\n \"DOM_VK_F5\",\n \"DOM_VK_F6\",\n \"DOM_VK_F7\",\n \"DOM_VK_F8\",\n \"DOM_VK_F9\",\n \"DOM_VK_FINAL\",\n \"DOM_VK_FRONT\",\n \"DOM_VK_G\",\n \"DOM_VK_GREATER_THAN\",\n \"DOM_VK_H\",\n \"DOM_VK_HANGUL\",\n \"DOM_VK_HANJA\",\n \"DOM_VK_HASH\",\n \"DOM_VK_HELP\",\n \"DOM_VK_HK_TOGGLE\",\n \"DOM_VK_HOME\",\n \"DOM_VK_HYPHEN_MINUS\",\n \"DOM_VK_I\",\n \"DOM_VK_INSERT\",\n \"DOM_VK_J\",\n \"DOM_VK_JUNJA\",\n \"DOM_VK_K\",\n \"DOM_VK_KANA\",\n \"DOM_VK_KANJI\",\n \"DOM_VK_L\",\n \"DOM_VK_LEFT\",\n \"DOM_VK_LEFT_TAB\",\n \"DOM_VK_LESS_THAN\",\n \"DOM_VK_M\",\n \"DOM_VK_META\",\n \"DOM_VK_MODECHANGE\",\n \"DOM_VK_MULTIPLY\",\n \"DOM_VK_N\",\n \"DOM_VK_NONCONVERT\",\n \"DOM_VK_NUMPAD0\",\n \"DOM_VK_NUMPAD1\",\n \"DOM_VK_NUMPAD2\",\n \"DOM_VK_NUMPAD3\",\n \"DOM_VK_NUMPAD4\",\n \"DOM_VK_NUMPAD5\",\n \"DOM_VK_NUMPAD6\",\n \"DOM_VK_NUMPAD7\",\n \"DOM_VK_NUMPAD8\",\n \"DOM_VK_NUMPAD9\",\n \"DOM_VK_NUM_LOCK\",\n \"DOM_VK_O\",\n \"DOM_VK_OEM_1\",\n \"DOM_VK_OEM_102\",\n \"DOM_VK_OEM_2\",\n \"DOM_VK_OEM_3\",\n \"DOM_VK_OEM_4\",\n \"DOM_VK_OEM_5\",\n \"DOM_VK_OEM_6\",\n \"DOM_VK_OEM_7\",\n \"DOM_VK_OEM_8\",\n \"DOM_VK_OEM_COMMA\",\n \"DOM_VK_OEM_MINUS\",\n \"DOM_VK_OEM_PERIOD\",\n \"DOM_VK_OEM_PLUS\",\n \"DOM_VK_OPEN_BRACKET\",\n \"DOM_VK_OPEN_CURLY_BRACKET\",\n \"DOM_VK_OPEN_PAREN\",\n \"DOM_VK_P\",\n \"DOM_VK_PA1\",\n \"DOM_VK_PAGEDOWN\",\n \"DOM_VK_PAGEUP\",\n \"DOM_VK_PAGE_DOWN\",\n \"DOM_VK_PAGE_UP\",\n \"DOM_VK_PAUSE\",\n \"DOM_VK_PERCENT\",\n \"DOM_VK_PERIOD\",\n \"DOM_VK_PIPE\",\n \"DOM_VK_PLAY\",\n \"DOM_VK_PLUS\",\n \"DOM_VK_PRINT\",\n \"DOM_VK_PRINTSCREEN\",\n \"DOM_VK_PROCESSKEY\",\n \"DOM_VK_PROPERITES\",\n \"DOM_VK_Q\",\n \"DOM_VK_QUESTION_MARK\",\n \"DOM_VK_QUOTE\",\n \"DOM_VK_R\",\n \"DOM_VK_REDO\",\n \"DOM_VK_RETURN\",\n \"DOM_VK_RIGHT\",\n \"DOM_VK_S\",\n \"DOM_VK_SCROLL_LOCK\",\n \"DOM_VK_SELECT\",\n \"DOM_VK_SEMICOLON\",\n \"DOM_VK_SEPARATOR\",\n \"DOM_VK_SHIFT\",\n \"DOM_VK_SLASH\",\n \"DOM_VK_SLEEP\",\n \"DOM_VK_SPACE\",\n \"DOM_VK_SUBTRACT\",\n \"DOM_VK_T\",\n \"DOM_VK_TAB\",\n \"DOM_VK_TILDE\",\n \"DOM_VK_U\",\n \"DOM_VK_UNDERSCORE\",\n \"DOM_VK_UNDO\",\n \"DOM_VK_UNICODE\",\n \"DOM_VK_UP\",\n \"DOM_VK_V\",\n \"DOM_VK_VOLUME_DOWN\",\n \"DOM_VK_VOLUME_MUTE\",\n \"DOM_VK_VOLUME_UP\",\n \"DOM_VK_W\",\n \"DOM_VK_WIN\",\n \"DOM_VK_WINDOW\",\n \"DOM_VK_WIN_ICO_00\",\n \"DOM_VK_WIN_ICO_CLEAR\",\n \"DOM_VK_WIN_ICO_HELP\",\n \"DOM_VK_WIN_OEM_ATTN\",\n \"DOM_VK_WIN_OEM_AUTO\",\n \"DOM_VK_WIN_OEM_BACKTAB\",\n \"DOM_VK_WIN_OEM_CLEAR\",\n \"DOM_VK_WIN_OEM_COPY\",\n \"DOM_VK_WIN_OEM_CUSEL\",\n \"DOM_VK_WIN_OEM_ENLW\",\n \"DOM_VK_WIN_OEM_FINISH\",\n \"DOM_VK_WIN_OEM_FJ_JISHO\",\n \"DOM_VK_WIN_OEM_FJ_LOYA\",\n \"DOM_VK_WIN_OEM_FJ_MASSHOU\",\n \"DOM_VK_WIN_OEM_FJ_ROYA\",\n \"DOM_VK_WIN_OEM_FJ_TOUROKU\",\n \"DOM_VK_WIN_OEM_JUMP\",\n \"DOM_VK_WIN_OEM_PA1\",\n \"DOM_VK_WIN_OEM_PA2\",\n \"DOM_VK_WIN_OEM_PA3\",\n \"DOM_VK_WIN_OEM_RESET\",\n \"DOM_VK_WIN_OEM_WSCTRL\",\n \"DOM_VK_X\",\n \"DOM_VK_XF86XK_ADD_FAVORITE\",\n \"DOM_VK_XF86XK_APPLICATION_LEFT\",\n \"DOM_VK_XF86XK_APPLICATION_RIGHT\",\n \"DOM_VK_XF86XK_AUDIO_CYCLE_TRACK\",\n \"DOM_VK_XF86XK_AUDIO_FORWARD\",\n \"DOM_VK_XF86XK_AUDIO_LOWER_VOLUME\",\n \"DOM_VK_XF86XK_AUDIO_MEDIA\",\n \"DOM_VK_XF86XK_AUDIO_MUTE\",\n \"DOM_VK_XF86XK_AUDIO_NEXT\",\n \"DOM_VK_XF86XK_AUDIO_PAUSE\",\n \"DOM_VK_XF86XK_AUDIO_PLAY\",\n \"DOM_VK_XF86XK_AUDIO_PREV\",\n \"DOM_VK_XF86XK_AUDIO_RAISE_VOLUME\",\n \"DOM_VK_XF86XK_AUDIO_RANDOM_PLAY\",\n \"DOM_VK_XF86XK_AUDIO_RECORD\",\n \"DOM_VK_XF86XK_AUDIO_REPEAT\",\n \"DOM_VK_XF86XK_AUDIO_REWIND\",\n \"DOM_VK_XF86XK_AUDIO_STOP\",\n \"DOM_VK_XF86XK_AWAY\",\n \"DOM_VK_XF86XK_BACK\",\n \"DOM_VK_XF86XK_BACK_FORWARD\",\n \"DOM_VK_XF86XK_BATTERY\",\n \"DOM_VK_XF86XK_BLUE\",\n \"DOM_VK_XF86XK_BLUETOOTH\",\n \"DOM_VK_XF86XK_BOOK\",\n \"DOM_VK_XF86XK_BRIGHTNESS_ADJUST\",\n \"DOM_VK_XF86XK_CALCULATOR\",\n \"DOM_VK_XF86XK_CALENDAR\",\n \"DOM_VK_XF86XK_CD\",\n \"DOM_VK_XF86XK_CLOSE\",\n \"DOM_VK_XF86XK_COMMUNITY\",\n \"DOM_VK_XF86XK_CONTRAST_ADJUST\",\n \"DOM_VK_XF86XK_COPY\",\n \"DOM_VK_XF86XK_CUT\",\n \"DOM_VK_XF86XK_CYCLE_ANGLE\",\n \"DOM_VK_XF86XK_DISPLAY\",\n \"DOM_VK_XF86XK_DOCUMENTS\",\n \"DOM_VK_XF86XK_DOS\",\n \"DOM_VK_XF86XK_EJECT\",\n \"DOM_VK_XF86XK_EXCEL\",\n \"DOM_VK_XF86XK_EXPLORER\",\n \"DOM_VK_XF86XK_FAVORITES\",\n \"DOM_VK_XF86XK_FINANCE\",\n \"DOM_VK_XF86XK_FORWARD\",\n \"DOM_VK_XF86XK_FRAME_BACK\",\n \"DOM_VK_XF86XK_FRAME_FORWARD\",\n \"DOM_VK_XF86XK_GAME\",\n \"DOM_VK_XF86XK_GO\",\n \"DOM_VK_XF86XK_GREEN\",\n \"DOM_VK_XF86XK_HIBERNATE\",\n \"DOM_VK_XF86XK_HISTORY\",\n \"DOM_VK_XF86XK_HOME_PAGE\",\n \"DOM_VK_XF86XK_HOT_LINKS\",\n \"DOM_VK_XF86XK_I_TOUCH\",\n \"DOM_VK_XF86XK_KBD_BRIGHTNESS_DOWN\",\n \"DOM_VK_XF86XK_KBD_BRIGHTNESS_UP\",\n \"DOM_VK_XF86XK_KBD_LIGHT_ON_OFF\",\n \"DOM_VK_XF86XK_LAUNCH0\",\n \"DOM_VK_XF86XK_LAUNCH1\",\n \"DOM_VK_XF86XK_LAUNCH2\",\n \"DOM_VK_XF86XK_LAUNCH3\",\n \"DOM_VK_XF86XK_LAUNCH4\",\n \"DOM_VK_XF86XK_LAUNCH5\",\n \"DOM_VK_XF86XK_LAUNCH6\",\n \"DOM_VK_XF86XK_LAUNCH7\",\n \"DOM_VK_XF86XK_LAUNCH8\",\n \"DOM_VK_XF86XK_LAUNCH9\",\n \"DOM_VK_XF86XK_LAUNCH_A\",\n \"DOM_VK_XF86XK_LAUNCH_B\",\n \"DOM_VK_XF86XK_LAUNCH_C\",\n \"DOM_VK_XF86XK_LAUNCH_D\",\n \"DOM_VK_XF86XK_LAUNCH_E\",\n \"DOM_VK_XF86XK_LAUNCH_F\",\n \"DOM_VK_XF86XK_LIGHT_BULB\",\n \"DOM_VK_XF86XK_LOG_OFF\",\n \"DOM_VK_XF86XK_MAIL\",\n \"DOM_VK_XF86XK_MAIL_FORWARD\",\n \"DOM_VK_XF86XK_MARKET\",\n \"DOM_VK_XF86XK_MEETING\",\n \"DOM_VK_XF86XK_MEMO\",\n \"DOM_VK_XF86XK_MENU_KB\",\n \"DOM_VK_XF86XK_MENU_PB\",\n \"DOM_VK_XF86XK_MESSENGER\",\n \"DOM_VK_XF86XK_MON_BRIGHTNESS_DOWN\",\n \"DOM_VK_XF86XK_MON_BRIGHTNESS_UP\",\n \"DOM_VK_XF86XK_MUSIC\",\n \"DOM_VK_XF86XK_MY_COMPUTER\",\n \"DOM_VK_XF86XK_MY_SITES\",\n \"DOM_VK_XF86XK_NEW\",\n \"DOM_VK_XF86XK_NEWS\",\n \"DOM_VK_XF86XK_OFFICE_HOME\",\n \"DOM_VK_XF86XK_OPEN\",\n \"DOM_VK_XF86XK_OPEN_URL\",\n \"DOM_VK_XF86XK_OPTION\",\n \"DOM_VK_XF86XK_PASTE\",\n \"DOM_VK_XF86XK_PHONE\",\n \"DOM_VK_XF86XK_PICTURES\",\n \"DOM_VK_XF86XK_POWER_DOWN\",\n \"DOM_VK_XF86XK_POWER_OFF\",\n \"DOM_VK_XF86XK_RED\",\n \"DOM_VK_XF86XK_REFRESH\",\n \"DOM_VK_XF86XK_RELOAD\",\n \"DOM_VK_XF86XK_REPLY\",\n \"DOM_VK_XF86XK_ROCKER_DOWN\",\n \"DOM_VK_XF86XK_ROCKER_ENTER\",\n \"DOM_VK_XF86XK_ROCKER_UP\",\n \"DOM_VK_XF86XK_ROTATE_WINDOWS\",\n \"DOM_VK_XF86XK_ROTATION_KB\",\n \"DOM_VK_XF86XK_ROTATION_PB\",\n \"DOM_VK_XF86XK_SAVE\",\n \"DOM_VK_XF86XK_SCREEN_SAVER\",\n \"DOM_VK_XF86XK_SCROLL_CLICK\",\n \"DOM_VK_XF86XK_SCROLL_DOWN\",\n \"DOM_VK_XF86XK_SCROLL_UP\",\n \"DOM_VK_XF86XK_SEARCH\",\n \"DOM_VK_XF86XK_SEND\",\n \"DOM_VK_XF86XK_SHOP\",\n \"DOM_VK_XF86XK_SPELL\",\n \"DOM_VK_XF86XK_SPLIT_SCREEN\",\n \"DOM_VK_XF86XK_STANDBY\",\n \"DOM_VK_XF86XK_START\",\n \"DOM_VK_XF86XK_STOP\",\n \"DOM_VK_XF86XK_SUBTITLE\",\n \"DOM_VK_XF86XK_SUPPORT\",\n \"DOM_VK_XF86XK_SUSPEND\",\n \"DOM_VK_XF86XK_TASK_PANE\",\n \"DOM_VK_XF86XK_TERMINAL\",\n \"DOM_VK_XF86XK_TIME\",\n \"DOM_VK_XF86XK_TOOLS\",\n \"DOM_VK_XF86XK_TOP_MENU\",\n \"DOM_VK_XF86XK_TO_DO_LIST\",\n \"DOM_VK_XF86XK_TRAVEL\",\n \"DOM_VK_XF86XK_USER1KB\",\n \"DOM_VK_XF86XK_USER2KB\",\n \"DOM_VK_XF86XK_USER_PB\",\n \"DOM_VK_XF86XK_UWB\",\n \"DOM_VK_XF86XK_VENDOR_HOME\",\n \"DOM_VK_XF86XK_VIDEO\",\n \"DOM_VK_XF86XK_VIEW\",\n \"DOM_VK_XF86XK_WAKE_UP\",\n \"DOM_VK_XF86XK_WEB_CAM\",\n \"DOM_VK_XF86XK_WHEEL_BUTTON\",\n \"DOM_VK_XF86XK_WLAN\",\n \"DOM_VK_XF86XK_WORD\",\n \"DOM_VK_XF86XK_WWW\",\n \"DOM_VK_XF86XK_XFER\",\n \"DOM_VK_XF86XK_YELLOW\",\n \"DOM_VK_XF86XK_ZOOM_IN\",\n \"DOM_VK_XF86XK_ZOOM_OUT\",\n \"DOM_VK_Y\",\n \"DOM_VK_Z\",\n \"DOM_VK_ZOOM\",\n \"DONE\",\n \"DONT_CARE\",\n \"DOWNLOADING\",\n \"DRAGDROP\",\n \"DST_ALPHA\",\n \"DST_COLOR\",\n \"DYNAMIC_DRAW\",\n \"DataChannel\",\n \"DataTransfer\",\n \"DataTransferItem\",\n \"DataTransferItemList\",\n \"DataView\",\n \"Date\",\n \"DateTimeFormat\",\n \"DelayNode\",\n \"DesktopNotification\",\n \"DesktopNotificationCenter\",\n \"DeviceLightEvent\",\n \"DeviceMotionEvent\",\n \"DeviceOrientationEvent\",\n \"DeviceProximityEvent\",\n \"DeviceStorage\",\n \"DeviceStorageChangeEvent\",\n \"Document\",\n \"DocumentFragment\",\n \"DocumentType\",\n \"DragEvent\",\n \"DynamicsCompressorNode\",\n \"E\",\n \"ELEMENT_ARRAY_BUFFER\",\n \"ELEMENT_ARRAY_BUFFER_BINDING\",\n \"ELEMENT_NODE\",\n \"EMPTY\",\n \"ENCODING_ERR\",\n \"ENDED\",\n \"END_TO_END\",\n \"END_TO_START\",\n \"ENTITY_NODE\",\n \"ENTITY_REFERENCE_NODE\",\n \"EPSILON\",\n \"EQUAL\",\n \"EQUALPOWER\",\n \"ERROR\",\n \"EXPONENTIAL_DISTANCE\",\n \"Element\",\n \"ElementQuery\",\n \"Entity\",\n \"EntityReference\",\n \"Error\",\n \"ErrorEvent\",\n \"EvalError\",\n \"Event\",\n \"EventException\",\n \"EventSource\",\n \"EventTarget\",\n \"External\",\n \"FASTEST\",\n \"FIDOSDK\",\n \"FILTER_ACCEPT\",\n \"FILTER_INTERRUPT\",\n \"FILTER_REJECT\",\n \"FILTER_SKIP\",\n \"FINISHED_STATE\",\n \"FIRST_ORDERED_NODE_TYPE\",\n \"FLOAT\",\n \"FLOAT_MAT2\",\n \"FLOAT_MAT3\",\n \"FLOAT_MAT4\",\n \"FLOAT_VEC2\",\n \"FLOAT_VEC3\",\n \"FLOAT_VEC4\",\n \"FOCUS\",\n \"FONT_FACE_RULE\",\n \"FONT_FEATURE_VALUES_RULE\",\n \"FRAGMENT_SHADER\",\n \"FRAGMENT_SHADER_DERIVATIVE_HINT_OES\",\n \"FRAMEBUFFER\",\n \"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\",\n \"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\",\n \"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\",\n \"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\",\n \"FRAMEBUFFER_BINDING\",\n \"FRAMEBUFFER_COMPLETE\",\n \"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\",\n \"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\",\n \"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\",\n \"FRAMEBUFFER_UNSUPPORTED\",\n \"FRONT\",\n \"FRONT_AND_BACK\",\n \"FRONT_FACE\",\n \"FUNC_ADD\",\n \"FUNC_REVERSE_SUBTRACT\",\n \"FUNC_SUBTRACT\",\n \"Feed\",\n \"FeedEntry\",\n \"File\",\n \"FileError\",\n \"FileList\",\n \"FileReader\",\n \"FindInPage\",\n \"Float32Array\",\n \"Float64Array\",\n \"FocusEvent\",\n \"FontFace\",\n \"FormData\",\n \"Function\",\n \"GENERATE_MIPMAP_HINT\",\n \"GEQUAL\",\n \"GREATER\",\n \"GREEN_BITS\",\n \"GainNode\",\n \"Gamepad\",\n \"GamepadButton\",\n \"GamepadEvent\",\n \"GestureEvent\",\n \"HAVE_CURRENT_DATA\",\n \"HAVE_ENOUGH_DATA\",\n \"HAVE_FUTURE_DATA\",\n \"HAVE_METADATA\",\n \"HAVE_NOTHING\",\n \"HEADERS_RECEIVED\",\n \"HIDDEN\",\n \"HIERARCHY_REQUEST_ERR\",\n \"HIGHPASS\",\n \"HIGHSHELF\",\n \"HIGH_FLOAT\",\n \"HIGH_INT\",\n \"HORIZONTAL\",\n \"HORIZONTAL_AXIS\",\n \"HRTF\",\n \"HTMLAllCollection\",\n \"HTMLAnchorElement\",\n \"HTMLAppletElement\",\n \"HTMLAreaElement\",\n \"HTMLAudioElement\",\n \"HTMLBRElement\",\n \"HTMLBaseElement\",\n \"HTMLBaseFontElement\",\n \"HTMLBlockquoteElement\",\n \"HTMLBodyElement\",\n \"HTMLButtonElement\",\n \"HTMLCanvasElement\",\n \"HTMLCollection\",\n \"HTMLCommandElement\",\n \"HTMLContentElement\",\n \"HTMLDListElement\",\n \"HTMLDataElement\",\n \"HTMLDataListElement\",\n \"HTMLDetailsElement\",\n \"HTMLDialogElement\",\n \"HTMLDirectoryElement\",\n \"HTMLDivElement\",\n \"HTMLDocument\",\n \"HTMLElement\",\n \"HTMLEmbedElement\",\n \"HTMLFieldSetElement\",\n \"HTMLFontElement\",\n \"HTMLFormControlsCollection\",\n \"HTMLFormElement\",\n \"HTMLFrameElement\",\n \"HTMLFrameSetElement\",\n \"HTMLHRElement\",\n \"HTMLHeadElement\",\n \"HTMLHeadingElement\",\n \"HTMLHtmlElement\",\n \"HTMLIFrameElement\",\n \"HTMLImageElement\",\n \"HTMLInputElement\",\n \"HTMLIsIndexElement\",\n \"HTMLKeygenElement\",\n \"HTMLLIElement\",\n \"HTMLLabelElement\",\n \"HTMLLegendElement\",\n \"HTMLLinkElement\",\n \"HTMLMapElement\",\n \"HTMLMarqueeElement\",\n \"HTMLMediaElement\",\n \"HTMLMenuElement\",\n \"HTMLMenuItemElement\",\n \"HTMLMetaElement\",\n \"HTMLMeterElement\",\n \"HTMLModElement\",\n \"HTMLOListElement\",\n \"HTMLObjectElement\",\n \"HTMLOptGroupElement\",\n \"HTMLOptionElement\",\n \"HTMLOptionsCollection\",\n \"HTMLOutputElement\",\n \"HTMLParagraphElement\",\n \"HTMLParamElement\",\n \"HTMLPictureElement\",\n \"HTMLPreElement\",\n \"HTMLProgressElement\",\n \"HTMLPropertiesCollection\",\n \"HTMLQuoteElement\",\n \"HTMLScriptElement\",\n \"HTMLSelectElement\",\n \"HTMLShadowElement\",\n \"HTMLSourceElement\",\n \"HTMLSpanElement\",\n \"HTMLStyleElement\",\n \"HTMLTableCaptionElement\",\n \"HTMLTableCellElement\",\n \"HTMLTableColElement\",\n \"HTMLTableElement\",\n \"HTMLTableRowElement\",\n \"HTMLTableSectionElement\",\n \"HTMLTemplateElement\",\n \"HTMLTextAreaElement\",\n \"HTMLTimeElement\",\n \"HTMLTitleElement\",\n \"HTMLTrackElement\",\n \"HTMLUListElement\",\n \"HTMLUnknownElement\",\n \"HTMLVideoElement\",\n \"HashChangeEvent\",\n \"Headers\",\n \"History\",\n \"ICE_CHECKING\",\n \"ICE_CLOSED\",\n \"ICE_COMPLETED\",\n \"ICE_CONNECTED\",\n \"ICE_FAILED\",\n \"ICE_GATHERING\",\n \"ICE_WAITING\",\n \"IDBCursor\",\n \"IDBCursorWithValue\",\n \"IDBDatabase\",\n \"IDBDatabaseException\",\n \"IDBFactory\",\n \"IDBFileHandle\",\n \"IDBFileRequest\",\n \"IDBIndex\",\n \"IDBKeyRange\",\n \"IDBMutableFile\",\n \"IDBObjectStore\",\n \"IDBOpenDBRequest\",\n \"IDBRequest\",\n \"IDBTransaction\",\n \"IDBVersionChangeEvent\",\n \"IDLE\",\n \"IMPLEMENTATION_COLOR_READ_FORMAT\",\n \"IMPLEMENTATION_COLOR_READ_TYPE\",\n \"IMPORT_RULE\",\n \"INCR\",\n \"INCR_WRAP\",\n \"INDEX_SIZE_ERR\",\n \"INT\",\n \"INT_VEC2\",\n \"INT_VEC3\",\n \"INT_VEC4\",\n \"INUSE_ATTRIBUTE_ERR\",\n \"INVALID_ACCESS_ERR\",\n \"INVALID_CHARACTER_ERR\",\n \"INVALID_ENUM\",\n \"INVALID_EXPRESSION_ERR\",\n \"INVALID_FRAMEBUFFER_OPERATION\",\n \"INVALID_MODIFICATION_ERR\",\n \"INVALID_NODE_TYPE_ERR\",\n \"INVALID_OPERATION\",\n \"INVALID_STATE_ERR\",\n \"INVALID_VALUE\",\n \"INVERSE_DISTANCE\",\n \"INVERT\",\n \"IceCandidate\",\n \"Image\",\n \"ImageBitmap\",\n \"ImageData\",\n \"Infinity\",\n \"InputEvent\",\n \"InputMethodContext\",\n \"InstallTrigger\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"Intent\",\n \"InternalError\",\n \"Intl\",\n \"IsSearchProviderInstalled\",\n \"Iterator\",\n \"JSON\",\n \"KEEP\",\n \"KEYDOWN\",\n \"KEYFRAMES_RULE\",\n \"KEYFRAME_RULE\",\n \"KEYPRESS\",\n \"KEYUP\",\n \"KeyEvent\",\n \"KeyboardEvent\",\n \"LENGTHADJUST_SPACING\",\n \"LENGTHADJUST_SPACINGANDGLYPHS\",\n \"LENGTHADJUST_UNKNOWN\",\n \"LEQUAL\",\n \"LESS\",\n \"LINEAR\",\n \"LINEAR_DISTANCE\",\n \"LINEAR_MIPMAP_LINEAR\",\n \"LINEAR_MIPMAP_NEAREST\",\n \"LINES\",\n \"LINE_LOOP\",\n \"LINE_STRIP\",\n \"LINE_WIDTH\",\n \"LINK_STATUS\",\n \"LIVE\",\n \"LN10\",\n \"LN2\",\n \"LOADED\",\n \"LOADING\",\n \"LOG10E\",\n \"LOG2E\",\n \"LOWPASS\",\n \"LOWSHELF\",\n \"LOW_FLOAT\",\n \"LOW_INT\",\n \"LSException\",\n \"LSParserFilter\",\n \"LUMINANCE\",\n \"LUMINANCE_ALPHA\",\n \"LocalMediaStream\",\n \"Location\",\n \"MAX_COMBINED_TEXTURE_IMAGE_UNITS\",\n \"MAX_CUBE_MAP_TEXTURE_SIZE\",\n \"MAX_FRAGMENT_UNIFORM_VECTORS\",\n \"MAX_RENDERBUFFER_SIZE\",\n \"MAX_SAFE_INTEGER\",\n \"MAX_TEXTURE_IMAGE_UNITS\",\n \"MAX_TEXTURE_MAX_ANISOTROPY_EXT\",\n \"MAX_TEXTURE_SIZE\",\n \"MAX_VALUE\",\n \"MAX_VARYING_VECTORS\",\n \"MAX_VERTEX_ATTRIBS\",\n \"MAX_VERTEX_TEXTURE_IMAGE_UNITS\",\n \"MAX_VERTEX_UNIFORM_VECTORS\",\n \"MAX_VIEWPORT_DIMS\",\n \"MEDIA_ERR_ABORTED\",\n \"MEDIA_ERR_DECODE\",\n \"MEDIA_ERR_ENCRYPTED\",\n \"MEDIA_ERR_NETWORK\",\n \"MEDIA_ERR_SRC_NOT_SUPPORTED\",\n \"MEDIA_KEYERR_CLIENT\",\n \"MEDIA_KEYERR_DOMAIN\",\n \"MEDIA_KEYERR_HARDWARECHANGE\",\n \"MEDIA_KEYERR_OUTPUT\",\n \"MEDIA_KEYERR_SERVICE\",\n \"MEDIA_KEYERR_UNKNOWN\",\n \"MEDIA_RULE\",\n \"MEDIUM_FLOAT\",\n \"MEDIUM_INT\",\n \"META_MASK\",\n \"MIN_SAFE_INTEGER\",\n \"MIN_VALUE\",\n \"MIRRORED_REPEAT\",\n \"MODE_ASYNCHRONOUS\",\n \"MODE_SYNCHRONOUS\",\n \"MODIFICATION\",\n \"MOUSEDOWN\",\n \"MOUSEDRAG\",\n \"MOUSEMOVE\",\n \"MOUSEOUT\",\n \"MOUSEOVER\",\n \"MOUSEUP\",\n \"MOZ_KEYFRAMES_RULE\",\n \"MOZ_KEYFRAME_RULE\",\n \"MOZ_SOURCE_CURSOR\",\n \"MOZ_SOURCE_ERASER\",\n \"MOZ_SOURCE_KEYBOARD\",\n \"MOZ_SOURCE_MOUSE\",\n \"MOZ_SOURCE_PEN\",\n \"MOZ_SOURCE_TOUCH\",\n \"MOZ_SOURCE_UNKNOWN\",\n \"MSGESTURE_FLAG_BEGIN\",\n \"MSGESTURE_FLAG_CANCEL\",\n \"MSGESTURE_FLAG_END\",\n \"MSGESTURE_FLAG_INERTIA\",\n \"MSGESTURE_FLAG_NONE\",\n \"MSPOINTER_TYPE_MOUSE\",\n \"MSPOINTER_TYPE_PEN\",\n \"MSPOINTER_TYPE_TOUCH\",\n \"MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE\",\n \"MS_ASYNC_CALLBACK_STATUS_CANCEL\",\n \"MS_ASYNC_CALLBACK_STATUS_CHOOSEANY\",\n \"MS_ASYNC_CALLBACK_STATUS_ERROR\",\n \"MS_ASYNC_CALLBACK_STATUS_JOIN\",\n \"MS_ASYNC_OP_STATUS_CANCELED\",\n \"MS_ASYNC_OP_STATUS_ERROR\",\n \"MS_ASYNC_OP_STATUS_SUCCESS\",\n \"MS_MANIPULATION_STATE_ACTIVE\",\n \"MS_MANIPULATION_STATE_CANCELLED\",\n \"MS_MANIPULATION_STATE_COMMITTED\",\n \"MS_MANIPULATION_STATE_DRAGGING\",\n \"MS_MANIPULATION_STATE_INERTIA\",\n \"MS_MANIPULATION_STATE_PRESELECT\",\n \"MS_MANIPULATION_STATE_SELECTING\",\n \"MS_MANIPULATION_STATE_STOPPED\",\n \"MS_MEDIA_ERR_ENCRYPTED\",\n \"MS_MEDIA_KEYERR_CLIENT\",\n \"MS_MEDIA_KEYERR_DOMAIN\",\n \"MS_MEDIA_KEYERR_HARDWARECHANGE\",\n \"MS_MEDIA_KEYERR_OUTPUT\",\n \"MS_MEDIA_KEYERR_SERVICE\",\n \"MS_MEDIA_KEYERR_UNKNOWN\",\n \"Map\",\n \"Math\",\n \"MediaController\",\n \"MediaDevices\",\n \"MediaElementAudioSourceNode\",\n \"MediaEncryptedEvent\",\n \"MediaError\",\n \"MediaKeyError\",\n \"MediaKeyEvent\",\n \"MediaKeyMessageEvent\",\n \"MediaKeyNeededEvent\",\n \"MediaKeySession\",\n \"MediaKeyStatusMap\",\n \"MediaKeySystemAccess\",\n \"MediaKeys\",\n \"MediaList\",\n \"MediaQueryList\",\n \"MediaQueryListEvent\",\n \"MediaRecorder\",\n \"MediaSource\",\n \"MediaStream\",\n \"MediaStreamAudioDestinationNode\",\n \"MediaStreamAudioSourceNode\",\n \"MediaStreamEvent\",\n \"MediaStreamTrack\",\n \"MediaStreamTrackEvent\",\n \"MessageChannel\",\n \"MessageEvent\",\n \"MessagePort\",\n \"Methods\",\n \"MimeType\",\n \"MimeTypeArray\",\n \"MouseEvent\",\n \"MouseScrollEvent\",\n \"MozAnimation\",\n \"MozAnimationDelay\",\n \"MozAnimationDirection\",\n \"MozAnimationDuration\",\n \"MozAnimationFillMode\",\n \"MozAnimationIterationCount\",\n \"MozAnimationName\",\n \"MozAnimationPlayState\",\n \"MozAnimationTimingFunction\",\n \"MozAppearance\",\n \"MozBackfaceVisibility\",\n \"MozBinding\",\n \"MozBorderBottomColors\",\n \"MozBorderEnd\",\n \"MozBorderEndColor\",\n \"MozBorderEndStyle\",\n \"MozBorderEndWidth\",\n \"MozBorderImage\",\n \"MozBorderLeftColors\",\n \"MozBorderRightColors\",\n \"MozBorderStart\",\n \"MozBorderStartColor\",\n \"MozBorderStartStyle\",\n \"MozBorderStartWidth\",\n \"MozBorderTopColors\",\n \"MozBoxAlign\",\n \"MozBoxDirection\",\n \"MozBoxFlex\",\n \"MozBoxOrdinalGroup\",\n \"MozBoxOrient\",\n \"MozBoxPack\",\n \"MozBoxSizing\",\n \"MozCSSKeyframeRule\",\n \"MozCSSKeyframesRule\",\n \"MozColumnCount\",\n \"MozColumnFill\",\n \"MozColumnGap\",\n \"MozColumnRule\",\n \"MozColumnRuleColor\",\n \"MozColumnRuleStyle\",\n \"MozColumnRuleWidth\",\n \"MozColumnWidth\",\n \"MozColumns\",\n \"MozContactChangeEvent\",\n \"MozFloatEdge\",\n \"MozFontFeatureSettings\",\n \"MozFontLanguageOverride\",\n \"MozForceBrokenImageIcon\",\n \"MozHyphens\",\n \"MozImageRegion\",\n \"MozMarginEnd\",\n \"MozMarginStart\",\n \"MozMmsEvent\",\n \"MozMmsMessage\",\n \"MozMobileMessageThread\",\n \"MozOSXFontSmoothing\",\n \"MozOrient\",\n \"MozOutlineRadius\",\n \"MozOutlineRadiusBottomleft\",\n \"MozOutlineRadiusBottomright\",\n \"MozOutlineRadiusTopleft\",\n \"MozOutlineRadiusTopright\",\n \"MozPaddingEnd\",\n \"MozPaddingStart\",\n \"MozPerspective\",\n \"MozPerspectiveOrigin\",\n \"MozPowerManager\",\n \"MozSettingsEvent\",\n \"MozSmsEvent\",\n \"MozSmsMessage\",\n \"MozStackSizing\",\n \"MozTabSize\",\n \"MozTextAlignLast\",\n \"MozTextDecorationColor\",\n \"MozTextDecorationLine\",\n \"MozTextDecorationStyle\",\n \"MozTextSizeAdjust\",\n \"MozTransform\",\n \"MozTransformOrigin\",\n \"MozTransformStyle\",\n \"MozTransition\",\n \"MozTransitionDelay\",\n \"MozTransitionDuration\",\n \"MozTransitionProperty\",\n \"MozTransitionTimingFunction\",\n \"MozUserFocus\",\n \"MozUserInput\",\n \"MozUserModify\",\n \"MozUserSelect\",\n \"MozWindowDragging\",\n \"MozWindowShadow\",\n \"MutationEvent\",\n \"MutationObserver\",\n \"MutationRecord\",\n \"NAMESPACE_ERR\",\n \"NAMESPACE_RULE\",\n \"NEAREST\",\n \"NEAREST_MIPMAP_LINEAR\",\n \"NEAREST_MIPMAP_NEAREST\",\n \"NEGATIVE_INFINITY\",\n \"NETWORK_EMPTY\",\n \"NETWORK_ERR\",\n \"NETWORK_IDLE\",\n \"NETWORK_LOADED\",\n \"NETWORK_LOADING\",\n \"NETWORK_NO_SOURCE\",\n \"NEVER\",\n \"NEW\",\n \"NEXT\",\n \"NEXT_NO_DUPLICATE\",\n \"NICEST\",\n \"NODE_AFTER\",\n \"NODE_BEFORE\",\n \"NODE_BEFORE_AND_AFTER\",\n \"NODE_INSIDE\",\n \"NONE\",\n \"NON_TRANSIENT_ERR\",\n \"NOTATION_NODE\",\n \"NOTCH\",\n \"NOTEQUAL\",\n \"NOT_ALLOWED_ERR\",\n \"NOT_FOUND_ERR\",\n \"NOT_READABLE_ERR\",\n \"NOT_SUPPORTED_ERR\",\n \"NO_DATA_ALLOWED_ERR\",\n \"NO_ERR\",\n \"NO_ERROR\",\n \"NO_MODIFICATION_ALLOWED_ERR\",\n \"NUMBER_TYPE\",\n \"NUM_COMPRESSED_TEXTURE_FORMATS\",\n \"NaN\",\n \"NamedNodeMap\",\n \"Navigator\",\n \"NearbyLinks\",\n \"NetworkInformation\",\n \"Node\",\n \"NodeFilter\",\n \"NodeIterator\",\n \"NodeList\",\n \"Notation\",\n \"Notification\",\n \"NotifyPaintEvent\",\n \"Number\",\n \"NumberFormat\",\n \"OBSOLETE\",\n \"ONE\",\n \"ONE_MINUS_CONSTANT_ALPHA\",\n \"ONE_MINUS_CONSTANT_COLOR\",\n \"ONE_MINUS_DST_ALPHA\",\n \"ONE_MINUS_DST_COLOR\",\n \"ONE_MINUS_SRC_ALPHA\",\n \"ONE_MINUS_SRC_COLOR\",\n \"OPEN\",\n \"OPENED\",\n \"OPENING\",\n \"ORDERED_NODE_ITERATOR_TYPE\",\n \"ORDERED_NODE_SNAPSHOT_TYPE\",\n \"OUT_OF_MEMORY\",\n \"Object\",\n \"OfflineAudioCompletionEvent\",\n \"OfflineAudioContext\",\n \"OfflineResourceList\",\n \"Option\",\n \"OscillatorNode\",\n \"OverflowEvent\",\n \"PACK_ALIGNMENT\",\n \"PAGE_RULE\",\n \"PARSE_ERR\",\n \"PATHSEG_ARC_ABS\",\n \"PATHSEG_ARC_REL\",\n \"PATHSEG_CLOSEPATH\",\n \"PATHSEG_CURVETO_CUBIC_ABS\",\n \"PATHSEG_CURVETO_CUBIC_REL\",\n \"PATHSEG_CURVETO_CUBIC_SMOOTH_ABS\",\n \"PATHSEG_CURVETO_CUBIC_SMOOTH_REL\",\n \"PATHSEG_CURVETO_QUADRATIC_ABS\",\n \"PATHSEG_CURVETO_QUADRATIC_REL\",\n \"PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS\",\n \"PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL\",\n \"PATHSEG_LINETO_ABS\",\n \"PATHSEG_LINETO_HORIZONTAL_ABS\",\n \"PATHSEG_LINETO_HORIZONTAL_REL\",\n \"PATHSEG_LINETO_REL\",\n \"PATHSEG_LINETO_VERTICAL_ABS\",\n \"PATHSEG_LINETO_VERTICAL_REL\",\n \"PATHSEG_MOVETO_ABS\",\n \"PATHSEG_MOVETO_REL\",\n \"PATHSEG_UNKNOWN\",\n \"PATH_EXISTS_ERR\",\n \"PEAKING\",\n \"PERMISSION_DENIED\",\n \"PERSISTENT\",\n \"PI\",\n \"PLAYING_STATE\",\n \"POINTS\",\n \"POLYGON_OFFSET_FACTOR\",\n \"POLYGON_OFFSET_FILL\",\n \"POLYGON_OFFSET_UNITS\",\n \"POSITION_UNAVAILABLE\",\n \"POSITIVE_INFINITY\",\n \"PREV\",\n \"PREV_NO_DUPLICATE\",\n \"PROCESSING_INSTRUCTION_NODE\",\n \"PageChangeEvent\",\n \"PageTransitionEvent\",\n \"PaintRequest\",\n \"PaintRequestList\",\n \"PannerNode\",\n \"Path2D\",\n \"Performance\",\n \"PerformanceEntry\",\n \"PerformanceMark\",\n \"PerformanceMeasure\",\n \"PerformanceNavigation\",\n \"PerformanceResourceTiming\",\n \"PerformanceTiming\",\n \"PeriodicWave\",\n \"Plugin\",\n \"PluginArray\",\n \"PopStateEvent\",\n \"PopupBlockedEvent\",\n \"ProcessingInstruction\",\n \"ProgressEvent\",\n \"Promise\",\n \"PropertyNodeList\",\n \"Proxy\",\n \"PushManager\",\n \"PushSubscription\",\n \"Q\",\n \"QUOTA_ERR\",\n \"QUOTA_EXCEEDED_ERR\",\n \"QueryInterface\",\n \"READ_ONLY\",\n \"READ_ONLY_ERR\",\n \"READ_WRITE\",\n \"RED_BITS\",\n \"REMOVAL\",\n \"RENDERBUFFER\",\n \"RENDERBUFFER_ALPHA_SIZE\",\n \"RENDERBUFFER_BINDING\",\n \"RENDERBUFFER_BLUE_SIZE\",\n \"RENDERBUFFER_DEPTH_SIZE\",\n \"RENDERBUFFER_GREEN_SIZE\",\n \"RENDERBUFFER_HEIGHT\",\n \"RENDERBUFFER_INTERNAL_FORMAT\",\n \"RENDERBUFFER_RED_SIZE\",\n \"RENDERBUFFER_STENCIL_SIZE\",\n \"RENDERBUFFER_WIDTH\",\n \"RENDERER\",\n \"RENDERING_INTENT_ABSOLUTE_COLORIMETRIC\",\n \"RENDERING_INTENT_AUTO\",\n \"RENDERING_INTENT_PERCEPTUAL\",\n \"RENDERING_INTENT_RELATIVE_COLORIMETRIC\",\n \"RENDERING_INTENT_SATURATION\",\n \"RENDERING_INTENT_UNKNOWN\",\n \"REPEAT\",\n \"REPLACE\",\n \"RGB\",\n \"RGB565\",\n \"RGB5_A1\",\n \"RGBA\",\n \"RGBA4\",\n \"RGBColor\",\n \"ROTATION_CLOCKWISE\",\n \"ROTATION_COUNTERCLOCKWISE\",\n \"RTCDataChannelEvent\",\n \"RTCIceCandidate\",\n \"RTCPeerConnectionIceEvent\",\n \"RTCRtpReceiver\",\n \"RTCRtpSender\",\n \"RTCSessionDescription\",\n \"RTCStatsReport\",\n \"RadioNodeList\",\n \"Range\",\n \"RangeError\",\n \"RangeException\",\n \"RecordErrorEvent\",\n \"Rect\",\n \"ReferenceError\",\n \"RegExp\",\n \"Request\",\n \"Response\",\n \"SAMPLER_2D\",\n \"SAMPLER_CUBE\",\n \"SAMPLES\",\n \"SAMPLE_ALPHA_TO_COVERAGE\",\n \"SAMPLE_BUFFERS\",\n \"SAMPLE_COVERAGE\",\n \"SAMPLE_COVERAGE_INVERT\",\n \"SAMPLE_COVERAGE_VALUE\",\n \"SAWTOOTH\",\n \"SCHEDULED_STATE\",\n \"SCISSOR_BOX\",\n \"SCISSOR_TEST\",\n \"SCROLL_PAGE_DOWN\",\n \"SCROLL_PAGE_UP\",\n \"SDP_ANSWER\",\n \"SDP_OFFER\",\n \"SDP_PRANSWER\",\n \"SECURITY_ERR\",\n \"SELECT\",\n \"SERIALIZE_ERR\",\n \"SEVERITY_ERROR\",\n \"SEVERITY_FATAL_ERROR\",\n \"SEVERITY_WARNING\",\n \"SHADER_COMPILER\",\n \"SHADER_TYPE\",\n \"SHADING_LANGUAGE_VERSION\",\n \"SHIFT_MASK\",\n \"SHORT\",\n \"SHOWING\",\n \"SHOW_ALL\",\n \"SHOW_ATTRIBUTE\",\n \"SHOW_CDATA_SECTION\",\n \"SHOW_COMMENT\",\n \"SHOW_DOCUMENT\",\n \"SHOW_DOCUMENT_FRAGMENT\",\n \"SHOW_DOCUMENT_TYPE\",\n \"SHOW_ELEMENT\",\n \"SHOW_ENTITY\",\n \"SHOW_ENTITY_REFERENCE\",\n \"SHOW_NOTATION\",\n \"SHOW_PROCESSING_INSTRUCTION\",\n \"SHOW_TEXT\",\n \"SINE\",\n \"SOUNDFIELD\",\n \"SQLException\",\n \"SQRT1_2\",\n \"SQRT2\",\n \"SQUARE\",\n \"SRC_ALPHA\",\n \"SRC_ALPHA_SATURATE\",\n \"SRC_COLOR\",\n \"START_TO_END\",\n \"START_TO_START\",\n \"STATIC_DRAW\",\n \"STENCIL_ATTACHMENT\",\n \"STENCIL_BACK_FAIL\",\n \"STENCIL_BACK_FUNC\",\n \"STENCIL_BACK_PASS_DEPTH_FAIL\",\n \"STENCIL_BACK_PASS_DEPTH_PASS\",\n \"STENCIL_BACK_REF\",\n \"STENCIL_BACK_VALUE_MASK\",\n \"STENCIL_BACK_WRITEMASK\",\n \"STENCIL_BITS\",\n \"STENCIL_BUFFER_BIT\",\n \"STENCIL_CLEAR_VALUE\",\n \"STENCIL_FAIL\",\n \"STENCIL_FUNC\",\n \"STENCIL_INDEX\",\n \"STENCIL_INDEX8\",\n \"STENCIL_PASS_DEPTH_FAIL\",\n \"STENCIL_PASS_DEPTH_PASS\",\n \"STENCIL_REF\",\n \"STENCIL_TEST\",\n \"STENCIL_VALUE_MASK\",\n \"STENCIL_WRITEMASK\",\n \"STREAM_DRAW\",\n \"STRING_TYPE\",\n \"STYLE_RULE\",\n \"SUBPIXEL_BITS\",\n \"SUPPORTS_RULE\",\n \"SVGAElement\",\n \"SVGAltGlyphDefElement\",\n \"SVGAltGlyphElement\",\n \"SVGAltGlyphItemElement\",\n \"SVGAngle\",\n \"SVGAnimateColorElement\",\n \"SVGAnimateElement\",\n \"SVGAnimateMotionElement\",\n \"SVGAnimateTransformElement\",\n \"SVGAnimatedAngle\",\n \"SVGAnimatedBoolean\",\n \"SVGAnimatedEnumeration\",\n \"SVGAnimatedInteger\",\n \"SVGAnimatedLength\",\n \"SVGAnimatedLengthList\",\n \"SVGAnimatedNumber\",\n \"SVGAnimatedNumberList\",\n \"SVGAnimatedPreserveAspectRatio\",\n \"SVGAnimatedRect\",\n \"SVGAnimatedString\",\n \"SVGAnimatedTransformList\",\n \"SVGAnimationElement\",\n \"SVGCircleElement\",\n \"SVGClipPathElement\",\n \"SVGColor\",\n \"SVGComponentTransferFunctionElement\",\n \"SVGCursorElement\",\n \"SVGDefsElement\",\n \"SVGDescElement\",\n \"SVGDiscardElement\",\n \"SVGDocument\",\n \"SVGElement\",\n \"SVGElementInstance\",\n \"SVGElementInstanceList\",\n \"SVGEllipseElement\",\n \"SVGException\",\n \"SVGFEBlendElement\",\n \"SVGFEColorMatrixElement\",\n \"SVGFEComponentTransferElement\",\n \"SVGFECompositeElement\",\n \"SVGFEConvolveMatrixElement\",\n \"SVGFEDiffuseLightingElement\",\n \"SVGFEDisplacementMapElement\",\n \"SVGFEDistantLightElement\",\n \"SVGFEDropShadowElement\",\n \"SVGFEFloodElement\",\n \"SVGFEFuncAElement\",\n \"SVGFEFuncBElement\",\n \"SVGFEFuncGElement\",\n \"SVGFEFuncRElement\",\n \"SVGFEGaussianBlurElement\",\n \"SVGFEImageElement\",\n \"SVGFEMergeElement\",\n \"SVGFEMergeNodeElement\",\n \"SVGFEMorphologyElement\",\n \"SVGFEOffsetElement\",\n \"SVGFEPointLightElement\",\n \"SVGFESpecularLightingElement\",\n \"SVGFESpotLightElement\",\n \"SVGFETileElement\",\n \"SVGFETurbulenceElement\",\n \"SVGFilterElement\",\n \"SVGFontElement\",\n \"SVGFontFaceElement\",\n \"SVGFontFaceFormatElement\",\n \"SVGFontFaceNameElement\",\n \"SVGFontFaceSrcElement\",\n \"SVGFontFaceUriElement\",\n \"SVGForeignObjectElement\",\n \"SVGGElement\",\n \"SVGGeometryElement\",\n \"SVGGlyphElement\",\n \"SVGGlyphRefElement\",\n \"SVGGradientElement\",\n \"SVGGraphicsElement\",\n \"SVGHKernElement\",\n \"SVGImageElement\",\n \"SVGLength\",\n \"SVGLengthList\",\n \"SVGLineElement\",\n \"SVGLinearGradientElement\",\n \"SVGMPathElement\",\n \"SVGMarkerElement\",\n \"SVGMaskElement\",\n \"SVGMatrix\",\n \"SVGMetadataElement\",\n \"SVGMissingGlyphElement\",\n \"SVGNumber\",\n \"SVGNumberList\",\n \"SVGPaint\",\n \"SVGPathElement\",\n \"SVGPathSeg\",\n \"SVGPathSegArcAbs\",\n \"SVGPathSegArcRel\",\n \"SVGPathSegClosePath\",\n \"SVGPathSegCurvetoCubicAbs\",\n \"SVGPathSegCurvetoCubicRel\",\n \"SVGPathSegCurvetoCubicSmoothAbs\",\n \"SVGPathSegCurvetoCubicSmoothRel\",\n \"SVGPathSegCurvetoQuadraticAbs\",\n \"SVGPathSegCurvetoQuadraticRel\",\n \"SVGPathSegCurvetoQuadraticSmoothAbs\",\n \"SVGPathSegCurvetoQuadraticSmoothRel\",\n \"SVGPathSegLinetoAbs\",\n \"SVGPathSegLinetoHorizontalAbs\",\n \"SVGPathSegLinetoHorizontalRel\",\n \"SVGPathSegLinetoRel\",\n \"SVGPathSegLinetoVerticalAbs\",\n \"SVGPathSegLinetoVerticalRel\",\n \"SVGPathSegList\",\n \"SVGPathSegMovetoAbs\",\n \"SVGPathSegMovetoRel\",\n \"SVGPatternElement\",\n \"SVGPoint\",\n \"SVGPointList\",\n \"SVGPolygonElement\",\n \"SVGPolylineElement\",\n \"SVGPreserveAspectRatio\",\n \"SVGRadialGradientElement\",\n \"SVGRect\",\n \"SVGRectElement\",\n \"SVGRenderingIntent\",\n \"SVGSVGElement\",\n \"SVGScriptElement\",\n \"SVGSetElement\",\n \"SVGStopElement\",\n \"SVGStringList\",\n \"SVGStyleElement\",\n \"SVGSwitchElement\",\n \"SVGSymbolElement\",\n \"SVGTRefElement\",\n \"SVGTSpanElement\",\n \"SVGTextContentElement\",\n \"SVGTextElement\",\n \"SVGTextPathElement\",\n \"SVGTextPositioningElement\",\n \"SVGTitleElement\",\n \"SVGTransform\",\n \"SVGTransformList\",\n \"SVGUnitTypes\",\n \"SVGUseElement\",\n \"SVGVKernElement\",\n \"SVGViewElement\",\n \"SVGViewSpec\",\n \"SVGZoomAndPan\",\n \"SVGZoomEvent\",\n \"SVG_ANGLETYPE_DEG\",\n \"SVG_ANGLETYPE_GRAD\",\n \"SVG_ANGLETYPE_RAD\",\n \"SVG_ANGLETYPE_UNKNOWN\",\n \"SVG_ANGLETYPE_UNSPECIFIED\",\n \"SVG_CHANNEL_A\",\n \"SVG_CHANNEL_B\",\n \"SVG_CHANNEL_G\",\n \"SVG_CHANNEL_R\",\n \"SVG_CHANNEL_UNKNOWN\",\n \"SVG_COLORTYPE_CURRENTCOLOR\",\n \"SVG_COLORTYPE_RGBCOLOR\",\n \"SVG_COLORTYPE_RGBCOLOR_ICCCOLOR\",\n \"SVG_COLORTYPE_UNKNOWN\",\n \"SVG_EDGEMODE_DUPLICATE\",\n \"SVG_EDGEMODE_NONE\",\n \"SVG_EDGEMODE_UNKNOWN\",\n \"SVG_EDGEMODE_WRAP\",\n \"SVG_FEBLEND_MODE_COLOR\",\n \"SVG_FEBLEND_MODE_COLOR_BURN\",\n \"SVG_FEBLEND_MODE_COLOR_DODGE\",\n \"SVG_FEBLEND_MODE_DARKEN\",\n \"SVG_FEBLEND_MODE_DIFFERENCE\",\n \"SVG_FEBLEND_MODE_EXCLUSION\",\n \"SVG_FEBLEND_MODE_HARD_LIGHT\",\n \"SVG_FEBLEND_MODE_HUE\",\n \"SVG_FEBLEND_MODE_LIGHTEN\",\n \"SVG_FEBLEND_MODE_LUMINOSITY\",\n \"SVG_FEBLEND_MODE_MULTIPLY\",\n \"SVG_FEBLEND_MODE_NORMAL\",\n \"SVG_FEBLEND_MODE_OVERLAY\",\n \"SVG_FEBLEND_MODE_SATURATION\",\n \"SVG_FEBLEND_MODE_SCREEN\",\n \"SVG_FEBLEND_MODE_SOFT_LIGHT\",\n \"SVG_FEBLEND_MODE_UNKNOWN\",\n \"SVG_FECOLORMATRIX_TYPE_HUEROTATE\",\n \"SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA\",\n \"SVG_FECOLORMATRIX_TYPE_MATRIX\",\n \"SVG_FECOLORMATRIX_TYPE_SATURATE\",\n \"SVG_FECOLORMATRIX_TYPE_UNKNOWN\",\n \"SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE\",\n \"SVG_FECOMPONENTTRANSFER_TYPE_GAMMA\",\n \"SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY\",\n \"SVG_FECOMPONENTTRANSFER_TYPE_LINEAR\",\n \"SVG_FECOMPONENTTRANSFER_TYPE_TABLE\",\n \"SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN\",\n \"SVG_FECOMPOSITE_OPERATOR_ARITHMETIC\",\n \"SVG_FECOMPOSITE_OPERATOR_ATOP\",\n \"SVG_FECOMPOSITE_OPERATOR_IN\",\n \"SVG_FECOMPOSITE_OPERATOR_OUT\",\n \"SVG_FECOMPOSITE_OPERATOR_OVER\",\n \"SVG_FECOMPOSITE_OPERATOR_UNKNOWN\",\n \"SVG_FECOMPOSITE_OPERATOR_XOR\",\n \"SVG_INVALID_VALUE_ERR\",\n \"SVG_LENGTHTYPE_CM\",\n \"SVG_LENGTHTYPE_EMS\",\n \"SVG_LENGTHTYPE_EXS\",\n \"SVG_LENGTHTYPE_IN\",\n \"SVG_LENGTHTYPE_MM\",\n \"SVG_LENGTHTYPE_NUMBER\",\n \"SVG_LENGTHTYPE_PC\",\n \"SVG_LENGTHTYPE_PERCENTAGE\",\n \"SVG_LENGTHTYPE_PT\",\n \"SVG_LENGTHTYPE_PX\",\n \"SVG_LENGTHTYPE_UNKNOWN\",\n \"SVG_MARKERUNITS_STROKEWIDTH\",\n \"SVG_MARKERUNITS_UNKNOWN\",\n \"SVG_MARKERUNITS_USERSPACEONUSE\",\n \"SVG_MARKER_ORIENT_ANGLE\",\n \"SVG_MARKER_ORIENT_AUTO\",\n \"SVG_MARKER_ORIENT_UNKNOWN\",\n \"SVG_MASKTYPE_ALPHA\",\n \"SVG_MASKTYPE_LUMINANCE\",\n \"SVG_MATRIX_NOT_INVERTABLE\",\n \"SVG_MEETORSLICE_MEET\",\n \"SVG_MEETORSLICE_SLICE\",\n \"SVG_MEETORSLICE_UNKNOWN\",\n \"SVG_MORPHOLOGY_OPERATOR_DILATE\",\n \"SVG_MORPHOLOGY_OPERATOR_ERODE\",\n \"SVG_MORPHOLOGY_OPERATOR_UNKNOWN\",\n \"SVG_PAINTTYPE_CURRENTCOLOR\",\n \"SVG_PAINTTYPE_NONE\",\n \"SVG_PAINTTYPE_RGBCOLOR\",\n \"SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR\",\n \"SVG_PAINTTYPE_UNKNOWN\",\n \"SVG_PAINTTYPE_URI\",\n \"SVG_PAINTTYPE_URI_CURRENTCOLOR\",\n \"SVG_PAINTTYPE_URI_NONE\",\n \"SVG_PAINTTYPE_URI_RGBCOLOR\",\n \"SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR\",\n \"SVG_PRESERVEASPECTRATIO_NONE\",\n \"SVG_PRESERVEASPECTRATIO_UNKNOWN\",\n \"SVG_PRESERVEASPECTRATIO_XMAXYMAX\",\n \"SVG_PRESERVEASPECTRATIO_XMAXYMID\",\n \"SVG_PRESERVEASPECTRATIO_XMAXYMIN\",\n \"SVG_PRESERVEASPECTRATIO_XMIDYMAX\",\n \"SVG_PRESERVEASPECTRATIO_XMIDYMID\",\n \"SVG_PRESERVEASPECTRATIO_XMIDYMIN\",\n \"SVG_PRESERVEASPECTRATIO_XMINYMAX\",\n \"SVG_PRESERVEASPECTRATIO_XMINYMID\",\n \"SVG_PRESERVEASPECTRATIO_XMINYMIN\",\n \"SVG_SPREADMETHOD_PAD\",\n \"SVG_SPREADMETHOD_REFLECT\",\n \"SVG_SPREADMETHOD_REPEAT\",\n \"SVG_SPREADMETHOD_UNKNOWN\",\n \"SVG_STITCHTYPE_NOSTITCH\",\n \"SVG_STITCHTYPE_STITCH\",\n \"SVG_STITCHTYPE_UNKNOWN\",\n \"SVG_TRANSFORM_MATRIX\",\n \"SVG_TRANSFORM_ROTATE\",\n \"SVG_TRANSFORM_SCALE\",\n \"SVG_TRANSFORM_SKEWX\",\n \"SVG_TRANSFORM_SKEWY\",\n \"SVG_TRANSFORM_TRANSLATE\",\n \"SVG_TRANSFORM_UNKNOWN\",\n \"SVG_TURBULENCE_TYPE_FRACTALNOISE\",\n \"SVG_TURBULENCE_TYPE_TURBULENCE\",\n \"SVG_TURBULENCE_TYPE_UNKNOWN\",\n \"SVG_UNIT_TYPE_OBJECTBOUNDINGBOX\",\n \"SVG_UNIT_TYPE_UNKNOWN\",\n \"SVG_UNIT_TYPE_USERSPACEONUSE\",\n \"SVG_WRONG_TYPE_ERR\",\n \"SVG_ZOOMANDPAN_DISABLE\",\n \"SVG_ZOOMANDPAN_MAGNIFY\",\n \"SVG_ZOOMANDPAN_UNKNOWN\",\n \"SYNTAX_ERR\",\n \"SavedPages\",\n \"Screen\",\n \"ScreenOrientation\",\n \"Script\",\n \"ScriptProcessorNode\",\n \"ScrollAreaEvent\",\n \"SecurityPolicyViolationEvent\",\n \"Selection\",\n \"ServiceWorker\",\n \"ServiceWorkerContainer\",\n \"ServiceWorkerRegistration\",\n \"SessionDescription\",\n \"Set\",\n \"ShadowRoot\",\n \"SharedWorker\",\n \"SimpleGestureEvent\",\n \"SpeechSynthesisEvent\",\n \"SpeechSynthesisUtterance\",\n \"StopIteration\",\n \"Storage\",\n \"StorageEvent\",\n \"String\",\n \"StyleSheet\",\n \"StyleSheetList\",\n \"SubtleCrypto\",\n \"Symbol\",\n \"SyntaxError\",\n \"TEMPORARY\",\n \"TEXTPATH_METHODTYPE_ALIGN\",\n \"TEXTPATH_METHODTYPE_STRETCH\",\n \"TEXTPATH_METHODTYPE_UNKNOWN\",\n \"TEXTPATH_SPACINGTYPE_AUTO\",\n \"TEXTPATH_SPACINGTYPE_EXACT\",\n \"TEXTPATH_SPACINGTYPE_UNKNOWN\",\n \"TEXTURE\",\n \"TEXTURE0\",\n \"TEXTURE1\",\n \"TEXTURE10\",\n \"TEXTURE11\",\n \"TEXTURE12\",\n \"TEXTURE13\",\n \"TEXTURE14\",\n \"TEXTURE15\",\n \"TEXTURE16\",\n \"TEXTURE17\",\n \"TEXTURE18\",\n \"TEXTURE19\",\n \"TEXTURE2\",\n \"TEXTURE20\",\n \"TEXTURE21\",\n \"TEXTURE22\",\n \"TEXTURE23\",\n \"TEXTURE24\",\n \"TEXTURE25\",\n \"TEXTURE26\",\n \"TEXTURE27\",\n \"TEXTURE28\",\n \"TEXTURE29\",\n \"TEXTURE3\",\n \"TEXTURE30\",\n \"TEXTURE31\",\n \"TEXTURE4\",\n \"TEXTURE5\",\n \"TEXTURE6\",\n \"TEXTURE7\",\n \"TEXTURE8\",\n \"TEXTURE9\",\n \"TEXTURE_2D\",\n \"TEXTURE_BINDING_2D\",\n \"TEXTURE_BINDING_CUBE_MAP\",\n \"TEXTURE_CUBE_MAP\",\n \"TEXTURE_CUBE_MAP_NEGATIVE_X\",\n \"TEXTURE_CUBE_MAP_NEGATIVE_Y\",\n \"TEXTURE_CUBE_MAP_NEGATIVE_Z\",\n \"TEXTURE_CUBE_MAP_POSITIVE_X\",\n \"TEXTURE_CUBE_MAP_POSITIVE_Y\",\n \"TEXTURE_CUBE_MAP_POSITIVE_Z\",\n \"TEXTURE_MAG_FILTER\",\n \"TEXTURE_MAX_ANISOTROPY_EXT\",\n \"TEXTURE_MIN_FILTER\",\n \"TEXTURE_WRAP_S\",\n \"TEXTURE_WRAP_T\",\n \"TEXT_NODE\",\n \"TIMEOUT\",\n \"TIMEOUT_ERR\",\n \"TOO_LARGE_ERR\",\n \"TRANSACTION_INACTIVE_ERR\",\n \"TRIANGLE\",\n \"TRIANGLES\",\n \"TRIANGLE_FAN\",\n \"TRIANGLE_STRIP\",\n \"TYPE_BACK_FORWARD\",\n \"TYPE_ERR\",\n \"TYPE_MISMATCH_ERR\",\n \"TYPE_NAVIGATE\",\n \"TYPE_RELOAD\",\n \"TYPE_RESERVED\",\n \"Text\",\n \"TextDecoder\",\n \"TextEncoder\",\n \"TextEvent\",\n \"TextMetrics\",\n \"TextTrack\",\n \"TextTrackCue\",\n \"TextTrackCueList\",\n \"TextTrackList\",\n \"TimeEvent\",\n \"TimeRanges\",\n \"Touch\",\n \"TouchEvent\",\n \"TouchList\",\n \"TrackEvent\",\n \"TransitionEvent\",\n \"TreeWalker\",\n \"TypeError\",\n \"UIEvent\",\n \"UNCACHED\",\n \"UNKNOWN_ERR\",\n \"UNKNOWN_RULE\",\n \"UNMASKED_RENDERER_WEBGL\",\n \"UNMASKED_VENDOR_WEBGL\",\n \"UNORDERED_NODE_ITERATOR_TYPE\",\n \"UNORDERED_NODE_SNAPSHOT_TYPE\",\n \"UNPACK_ALIGNMENT\",\n \"UNPACK_COLORSPACE_CONVERSION_WEBGL\",\n \"UNPACK_FLIP_Y_WEBGL\",\n \"UNPACK_PREMULTIPLY_ALPHA_WEBGL\",\n \"UNSCHEDULED_STATE\",\n \"UNSENT\",\n \"UNSIGNED_BYTE\",\n \"UNSIGNED_INT\",\n \"UNSIGNED_SHORT\",\n \"UNSIGNED_SHORT_4_4_4_4\",\n \"UNSIGNED_SHORT_5_5_5_1\",\n \"UNSIGNED_SHORT_5_6_5\",\n \"UNSPECIFIED_EVENT_TYPE_ERR\",\n \"UPDATEREADY\",\n \"URIError\",\n \"URL\",\n \"URLSearchParams\",\n \"URLUnencoded\",\n \"URL_MISMATCH_ERR\",\n \"UTC\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"UserMessageHandler\",\n \"UserMessageHandlersNamespace\",\n \"UserProximityEvent\",\n \"VALIDATE_STATUS\",\n \"VALIDATION_ERR\",\n \"VARIABLES_RULE\",\n \"VENDOR\",\n \"VERSION\",\n \"VERSION_CHANGE\",\n \"VERSION_ERR\",\n \"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\",\n \"VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE\",\n \"VERTEX_ATTRIB_ARRAY_ENABLED\",\n \"VERTEX_ATTRIB_ARRAY_NORMALIZED\",\n \"VERTEX_ATTRIB_ARRAY_POINTER\",\n \"VERTEX_ATTRIB_ARRAY_SIZE\",\n \"VERTEX_ATTRIB_ARRAY_STRIDE\",\n \"VERTEX_ATTRIB_ARRAY_TYPE\",\n \"VERTEX_SHADER\",\n \"VERTICAL\",\n \"VERTICAL_AXIS\",\n \"VER_ERR\",\n \"VIEWPORT\",\n \"VIEWPORT_RULE\",\n \"VTTCue\",\n \"VTTRegion\",\n \"ValidityState\",\n \"VideoStreamTrack\",\n \"WEBKIT_FILTER_RULE\",\n \"WEBKIT_KEYFRAMES_RULE\",\n \"WEBKIT_KEYFRAME_RULE\",\n \"WEBKIT_REGION_RULE\",\n \"WRONG_DOCUMENT_ERR\",\n \"WaveShaperNode\",\n \"WeakMap\",\n \"WeakSet\",\n \"WebGLActiveInfo\",\n \"WebGLBuffer\",\n \"WebGLContextEvent\",\n \"WebGLFramebuffer\",\n \"WebGLProgram\",\n \"WebGLRenderbuffer\",\n \"WebGLRenderingContext\",\n \"WebGLShader\",\n \"WebGLShaderPrecisionFormat\",\n \"WebGLTexture\",\n \"WebGLUniformLocation\",\n \"WebGLVertexArray\",\n \"WebKitAnimationEvent\",\n \"WebKitBlobBuilder\",\n \"WebKitCSSFilterRule\",\n \"WebKitCSSFilterValue\",\n \"WebKitCSSKeyframeRule\",\n \"WebKitCSSKeyframesRule\",\n \"WebKitCSSMatrix\",\n \"WebKitCSSRegionRule\",\n \"WebKitCSSTransformValue\",\n \"WebKitDataCue\",\n \"WebKitGamepad\",\n \"WebKitMediaKeyError\",\n \"WebKitMediaKeyMessageEvent\",\n \"WebKitMediaKeySession\",\n \"WebKitMediaKeys\",\n \"WebKitMediaSource\",\n \"WebKitMutationObserver\",\n \"WebKitNamespace\",\n \"WebKitPlaybackTargetAvailabilityEvent\",\n \"WebKitPoint\",\n \"WebKitShadowRoot\",\n \"WebKitSourceBuffer\",\n \"WebKitSourceBufferList\",\n \"WebKitTransitionEvent\",\n \"WebSocket\",\n \"WheelEvent\",\n \"Window\",\n \"Worker\",\n \"XMLDocument\",\n \"XMLHttpRequest\",\n \"XMLHttpRequestEventTarget\",\n \"XMLHttpRequestException\",\n \"XMLHttpRequestProgressEvent\",\n \"XMLHttpRequestUpload\",\n \"XMLSerializer\",\n \"XMLStylesheetProcessingInstruction\",\n \"XPathEvaluator\",\n \"XPathException\",\n \"XPathExpression\",\n \"XPathNSResolver\",\n \"XPathResult\",\n \"XSLTProcessor\",\n \"ZERO\",\n \"_XD0M_\",\n \"_YD0M_\",\n \"__defineGetter__\",\n \"__defineSetter__\",\n \"__lookupGetter__\",\n \"__lookupSetter__\",\n \"__opera\",\n \"__proto__\",\n \"_browserjsran\",\n \"a\",\n \"aLink\",\n \"abbr\",\n \"abort\",\n \"abs\",\n \"absolute\",\n \"acceleration\",\n \"accelerationIncludingGravity\",\n \"accelerator\",\n \"accept\",\n \"acceptCharset\",\n \"acceptNode\",\n \"accessKey\",\n \"accessKeyLabel\",\n \"accuracy\",\n \"acos\",\n \"acosh\",\n \"action\",\n \"actionURL\",\n \"active\",\n \"activeCues\",\n \"activeElement\",\n \"activeSourceBuffers\",\n \"activeSourceCount\",\n \"activeTexture\",\n \"add\",\n \"addBehavior\",\n \"addCandidate\",\n \"addColorStop\",\n \"addCue\",\n \"addElement\",\n \"addEventListener\",\n \"addFilter\",\n \"addFromString\",\n \"addFromUri\",\n \"addIceCandidate\",\n \"addImport\",\n \"addListener\",\n \"addNamed\",\n \"addPageRule\",\n \"addPath\",\n \"addPointer\",\n \"addRange\",\n \"addRegion\",\n \"addRule\",\n \"addSearchEngine\",\n \"addSourceBuffer\",\n \"addStream\",\n \"addTextTrack\",\n \"addTrack\",\n \"addWakeLockListener\",\n \"addedNodes\",\n \"additionalName\",\n \"additiveSymbols\",\n \"addons\",\n \"adoptNode\",\n \"adr\",\n \"advance\",\n \"alert\",\n \"algorithm\",\n \"align\",\n \"align-content\",\n \"align-items\",\n \"align-self\",\n \"alignContent\",\n \"alignItems\",\n \"alignSelf\",\n \"alignmentBaseline\",\n \"alinkColor\",\n \"all\",\n \"allSettled\",\n \"allowFullscreen\",\n \"allowedDirections\",\n \"alpha\",\n \"alt\",\n \"altGraphKey\",\n \"altHtml\",\n \"altKey\",\n \"altLeft\",\n \"altitude\",\n \"altitudeAccuracy\",\n \"amplitude\",\n \"ancestorOrigins\",\n \"anchor\",\n \"anchorNode\",\n \"anchorOffset\",\n \"anchors\",\n \"angle\",\n \"animVal\",\n \"animate\",\n \"animatedInstanceRoot\",\n \"animatedNormalizedPathSegList\",\n \"animatedPathSegList\",\n \"animatedPoints\",\n \"animation\",\n \"animation-delay\",\n \"animation-direction\",\n \"animation-duration\",\n \"animation-fill-mode\",\n \"animation-iteration-count\",\n \"animation-name\",\n \"animation-play-state\",\n \"animation-timing-function\",\n \"animationDelay\",\n \"animationDirection\",\n \"animationDuration\",\n \"animationFillMode\",\n \"animationIterationCount\",\n \"animationName\",\n \"animationPlayState\",\n \"animationStartTime\",\n \"animationTimingFunction\",\n \"animationsPaused\",\n \"anniversary\",\n \"any\",\n \"app\",\n \"appCodeName\",\n \"appMinorVersion\",\n \"appName\",\n \"appNotifications\",\n \"appVersion\",\n \"append\",\n \"appendBuffer\",\n \"appendChild\",\n \"appendData\",\n \"appendItem\",\n \"appendMedium\",\n \"appendNamed\",\n \"appendRule\",\n \"appendStream\",\n \"appendWindowEnd\",\n \"appendWindowStart\",\n \"applets\",\n \"applicationCache\",\n \"apply\",\n \"applyElement\",\n \"arc\",\n \"arcTo\",\n \"archive\",\n \"areas\",\n \"arguments\",\n \"arrayBuffer\",\n \"asin\",\n \"asinh\",\n \"assert\",\n \"assign\",\n \"async\",\n \"atEnd\",\n \"atan\",\n \"atan2\",\n \"atanh\",\n \"atob\",\n \"attachEvent\",\n \"attachShader\",\n \"attachShadow\",\n \"attachments\",\n \"attack\",\n \"attrChange\",\n \"attrName\",\n \"attributeFilter\",\n \"attributeName\",\n \"attributeNamespace\",\n \"attributeOldValue\",\n \"attributes\",\n \"audioTracks\",\n \"autoIncrement\",\n \"autobuffer\",\n \"autocapitalize\",\n \"autocomplete\",\n \"autocorrect\",\n \"autofocus\",\n \"autoplay\",\n \"availHeight\",\n \"availLeft\",\n \"availTop\",\n \"availWidth\",\n \"availability\",\n \"available\",\n \"aversion\",\n \"axes\",\n \"axis\",\n \"azimuth\",\n \"b\",\n \"back\",\n \"backface-visibility\",\n \"backfaceVisibility\",\n \"background\",\n \"background-attachment\",\n \"background-blend-mode\",\n \"background-clip\",\n \"background-color\",\n \"background-image\",\n \"background-origin\",\n \"background-position\",\n \"background-repeat\",\n \"background-size\",\n \"backgroundAttachment\",\n \"backgroundBlendMode\",\n \"backgroundClip\",\n \"backgroundColor\",\n \"backgroundImage\",\n \"backgroundOrigin\",\n \"backgroundPosition\",\n \"backgroundPositionX\",\n \"backgroundPositionY\",\n \"backgroundRepeat\",\n \"backgroundSize\",\n \"badInput\",\n \"balance\",\n \"baseFrequencyX\",\n \"baseFrequencyY\",\n \"baseNode\",\n \"baseOffset\",\n \"baseURI\",\n \"baseVal\",\n \"baselineShift\",\n \"battery\",\n \"bday\",\n \"beginElement\",\n \"beginElementAt\",\n \"beginPath\",\n \"behavior\",\n \"behaviorCookie\",\n \"behaviorPart\",\n \"behaviorUrns\",\n \"beta\",\n \"bezierCurveTo\",\n \"bgColor\",\n \"bgProperties\",\n \"bias\",\n \"big\",\n \"binaryType\",\n \"bind\",\n \"bindAttribLocation\",\n \"bindBuffer\",\n \"bindFramebuffer\",\n \"bindRenderbuffer\",\n \"bindTexture\",\n \"blendColor\",\n \"blendEquation\",\n \"blendEquationSeparate\",\n \"blendFunc\",\n \"blendFuncSeparate\",\n \"blink\",\n \"blob\",\n \"blockDirection\",\n \"blue\",\n \"blur\",\n \"body\",\n \"bodyUsed\",\n \"bold\",\n \"bookmarks\",\n \"booleanValue\",\n \"border\",\n \"border-bottom\",\n \"border-bottom-color\",\n \"border-bottom-left-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-style\",\n \"border-bottom-width\",\n \"border-collapse\",\n \"border-color\",\n \"border-image\",\n \"border-image-outset\",\n \"border-image-repeat\",\n \"border-image-slice\",\n \"border-image-source\",\n \"border-image-width\",\n \"border-left\",\n \"border-left-color\",\n \"border-left-style\",\n \"border-left-width\",\n \"border-radius\",\n \"border-right\",\n \"border-right-color\",\n \"border-right-style\",\n \"border-right-width\",\n \"border-spacing\",\n \"border-style\",\n \"border-top\",\n \"border-top-color\",\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-top-style\",\n \"border-top-width\",\n \"border-width\",\n \"borderBottom\",\n \"borderBottomColor\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomStyle\",\n \"borderBottomWidth\",\n \"borderCollapse\",\n \"borderColor\",\n \"borderColorDark\",\n \"borderColorLight\",\n \"borderImage\",\n \"borderImageOutset\",\n \"borderImageRepeat\",\n \"borderImageSlice\",\n \"borderImageSource\",\n \"borderImageWidth\",\n \"borderLeft\",\n \"borderLeftColor\",\n \"borderLeftStyle\",\n \"borderLeftWidth\",\n \"borderRadius\",\n \"borderRight\",\n \"borderRightColor\",\n \"borderRightStyle\",\n \"borderRightWidth\",\n \"borderSpacing\",\n \"borderStyle\",\n \"borderTop\",\n \"borderTopColor\",\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderTopStyle\",\n \"borderTopWidth\",\n \"borderWidth\",\n \"bottom\",\n \"bottomMargin\",\n \"bound\",\n \"boundElements\",\n \"boundingClientRect\",\n \"boundingHeight\",\n \"boundingLeft\",\n \"boundingTop\",\n \"boundingWidth\",\n \"bounds\",\n \"box-decoration-break\",\n \"box-shadow\",\n \"box-sizing\",\n \"boxDecorationBreak\",\n \"boxShadow\",\n \"boxSizing\",\n \"breakAfter\",\n \"breakBefore\",\n \"breakInside\",\n \"browserLanguage\",\n \"btoa\",\n \"bubbles\",\n \"buffer\",\n \"bufferData\",\n \"bufferDepth\",\n \"bufferSize\",\n \"bufferSubData\",\n \"buffered\",\n \"bufferedAmount\",\n \"buildID\",\n \"buildNumber\",\n \"button\",\n \"buttonID\",\n \"buttons\",\n \"byteLength\",\n \"byteOffset\",\n \"c\",\n \"call\",\n \"caller\",\n \"canBeFormatted\",\n \"canBeMounted\",\n \"canBeShared\",\n \"canHaveChildren\",\n \"canHaveHTML\",\n \"canPlayType\",\n \"cancel\",\n \"cancelAnimationFrame\",\n \"cancelBubble\",\n \"cancelScheduledValues\",\n \"cancelable\",\n \"candidate\",\n \"canvas\",\n \"caption\",\n \"caption-side\",\n \"captionSide\",\n \"capture\",\n \"captureEvents\",\n \"captureStackTrace\",\n \"caretPositionFromPoint\",\n \"caretRangeFromPoint\",\n \"cast\",\n \"catch\",\n \"category\",\n \"cbrt\",\n \"cd\",\n \"ceil\",\n \"cellIndex\",\n \"cellPadding\",\n \"cellSpacing\",\n \"cells\",\n \"ch\",\n \"chOff\",\n \"chain\",\n \"challenge\",\n \"changedTouches\",\n \"channel\",\n \"channelCount\",\n \"channelCountMode\",\n \"channelInterpretation\",\n \"char\",\n \"charAt\",\n \"charCode\",\n \"charCodeAt\",\n \"charIndex\",\n \"characterSet\",\n \"characterData\",\n \"characterDataOldValue\",\n \"charging\",\n \"chargingTime\",\n \"charset\",\n \"checkEnclosure\",\n \"checkFramebufferStatus\",\n \"checkIntersection\",\n \"checkValidity\",\n \"checked\",\n \"childElementCount\",\n \"childList\",\n \"childNodes\",\n \"children\",\n \"chrome\",\n \"ciphertext\",\n \"cite\",\n \"classList\",\n \"className\",\n \"classid\",\n \"clear\",\n \"clearAttributes\",\n \"clearColor\",\n \"clearData\",\n \"clearDepth\",\n \"clearImmediate\",\n \"clearInterval\",\n \"clearMarks\",\n \"clearMeasures\",\n \"clearParameters\",\n \"clearRect\",\n \"clearResourceTimings\",\n \"clearShadow\",\n \"clearStencil\",\n \"clearTimeout\",\n \"clearWatch\",\n \"click\",\n \"clickCount\",\n \"clientHeight\",\n \"clientInformation\",\n \"clientLeft\",\n \"clientRect\",\n \"clientRects\",\n \"clientTop\",\n \"clientWidth\",\n \"clientX\",\n \"clientY\",\n \"clip\",\n \"clip-path\",\n \"clip-rule\",\n \"clipBottom\",\n \"clipLeft\",\n \"clipPath\",\n \"clipPathUnits\",\n \"clipRight\",\n \"clipRule\",\n \"clipTop\",\n \"clipboardData\",\n \"clone\",\n \"cloneContents\",\n \"cloneNode\",\n \"cloneRange\",\n \"close\",\n \"closePath\",\n \"closed\",\n \"closest\",\n \"clz\",\n \"clz32\",\n \"cmp\",\n \"code\",\n \"codeBase\",\n \"codePointAt\",\n \"codeType\",\n \"colSpan\",\n \"collapse\",\n \"collapseToEnd\",\n \"collapseToStart\",\n \"collapsed\",\n \"collect\",\n \"colno\",\n \"color\",\n \"color-interpolation\",\n \"color-interpolation-filters\",\n \"colorDepth\",\n \"colorInterpolation\",\n \"colorInterpolationFilters\",\n \"colorMask\",\n \"colorType\",\n \"cols\",\n \"columnCount\",\n \"columnFill\",\n \"columnGap\",\n \"columnNumber\",\n \"columnRule\",\n \"columnRuleColor\",\n \"columnRuleStyle\",\n \"columnRuleWidth\",\n \"columnSpan\",\n \"columnWidth\",\n \"columns\",\n \"command\",\n \"commitPreferences\",\n \"commonAncestorContainer\",\n \"compact\",\n \"compareBoundaryPoints\",\n \"compareDocumentPosition\",\n \"compareEndPoints\",\n \"compareNode\",\n \"comparePoint\",\n \"compatMode\",\n \"compatible\",\n \"compile\",\n \"compileShader\",\n \"complete\",\n \"componentFromPoint\",\n \"compositionEndOffset\",\n \"compositionStartOffset\",\n \"compressedTexImage2D\",\n \"compressedTexSubImage2D\",\n \"concat\",\n \"conditionText\",\n \"coneInnerAngle\",\n \"coneOuterAngle\",\n \"coneOuterGain\",\n \"confirm\",\n \"confirmComposition\",\n \"confirmSiteSpecificTrackingException\",\n \"confirmWebWideTrackingException\",\n \"connect\",\n \"connectEnd\",\n \"connectStart\",\n \"connected\",\n \"connection\",\n \"connectionSpeed\",\n \"console\",\n \"consolidate\",\n \"constrictionActive\",\n \"constructor\",\n \"contactID\",\n \"contains\",\n \"containsNode\",\n \"content\",\n \"contentDocument\",\n \"contentEditable\",\n \"contentOverflow\",\n \"contentScriptType\",\n \"contentStyleType\",\n \"contentType\",\n \"contentWindow\",\n \"context\",\n \"contextMenu\",\n \"contextmenu\",\n \"continue\",\n \"continuous\",\n \"control\",\n \"controller\",\n \"controls\",\n \"convertToSpecifiedUnits\",\n \"cookie\",\n \"cookieEnabled\",\n \"coords\",\n \"copyFromChannel\",\n \"copyTexImage2D\",\n \"copyTexSubImage2D\",\n \"copyToChannel\",\n \"copyWithin\",\n \"correspondingElement\",\n \"correspondingUseElement\",\n \"cos\",\n \"cosh\",\n \"count\",\n \"counter-increment\",\n \"counter-reset\",\n \"counterIncrement\",\n \"counterReset\",\n \"cpuClass\",\n \"cpuSleepAllowed\",\n \"create\",\n \"createAnalyser\",\n \"createAnswer\",\n \"createAttribute\",\n \"createAttributeNS\",\n \"createBiquadFilter\",\n \"createBuffer\",\n \"createBufferSource\",\n \"createCDATASection\",\n \"createCSSStyleSheet\",\n \"createCaption\",\n \"createChannelMerger\",\n \"createChannelSplitter\",\n \"createComment\",\n \"createContextualFragment\",\n \"createControlRange\",\n \"createConvolver\",\n \"createDTMFSender\",\n \"createDataChannel\",\n \"createDelay\",\n \"createDelayNode\",\n \"createDocument\",\n \"createDocumentFragment\",\n \"createDocumentType\",\n \"createDynamicsCompressor\",\n \"createElement\",\n \"createElementNS\",\n \"createEntityReference\",\n \"createEvent\",\n \"createEventObject\",\n \"createExpression\",\n \"createFramebuffer\",\n \"createFunction\",\n \"createGain\",\n \"createGainNode\",\n \"createHTMLDocument\",\n \"createImageBitmap\",\n \"createImageData\",\n \"createIndex\",\n \"createJavaScriptNode\",\n \"createLinearGradient\",\n \"createMediaElementSource\",\n \"createMediaKeys\",\n \"createMediaStreamDestination\",\n \"createMediaStreamSource\",\n \"createMutableFile\",\n \"createNSResolver\",\n \"createNodeIterator\",\n \"createNotification\",\n \"createObjectStore\",\n \"createObjectURL\",\n \"createOffer\",\n \"createOscillator\",\n \"createPanner\",\n \"createPattern\",\n \"createPeriodicWave\",\n \"createPopup\",\n \"createProcessingInstruction\",\n \"createProgram\",\n \"createRadialGradient\",\n \"createRange\",\n \"createRangeCollection\",\n \"createRenderbuffer\",\n \"createSVGAngle\",\n \"createSVGLength\",\n \"createSVGMatrix\",\n \"createSVGNumber\",\n \"createSVGPathSegArcAbs\",\n \"createSVGPathSegArcRel\",\n \"createSVGPathSegClosePath\",\n \"createSVGPathSegCurvetoCubicAbs\",\n \"createSVGPathSegCurvetoCubicRel\",\n \"createSVGPathSegCurvetoCubicSmoothAbs\",\n \"createSVGPathSegCurvetoCubicSmoothRel\",\n \"createSVGPathSegCurvetoQuadraticAbs\",\n \"createSVGPathSegCurvetoQuadraticRel\",\n \"createSVGPathSegCurvetoQuadraticSmoothAbs\",\n \"createSVGPathSegCurvetoQuadraticSmoothRel\",\n \"createSVGPathSegLinetoAbs\",\n \"createSVGPathSegLinetoHorizontalAbs\",\n \"createSVGPathSegLinetoHorizontalRel\",\n \"createSVGPathSegLinetoRel\",\n \"createSVGPathSegLinetoVerticalAbs\",\n \"createSVGPathSegLinetoVerticalRel\",\n \"createSVGPathSegMovetoAbs\",\n \"createSVGPathSegMovetoRel\",\n \"createSVGPoint\",\n \"createSVGRect\",\n \"createSVGTransform\",\n \"createSVGTransformFromMatrix\",\n \"createScriptProcessor\",\n \"createSession\",\n \"createShader\",\n \"createShadowRoot\",\n \"createStereoPanner\",\n \"createStyleSheet\",\n \"createTBody\",\n \"createTFoot\",\n \"createTHead\",\n \"createTextNode\",\n \"createTextRange\",\n \"createTexture\",\n \"createTouch\",\n \"createTouchList\",\n \"createTreeWalker\",\n \"createWaveShaper\",\n \"creationTime\",\n \"crossOrigin\",\n \"crypto\",\n \"csi\",\n \"cssFloat\",\n \"cssRules\",\n \"cssText\",\n \"cssValueType\",\n \"ctrlKey\",\n \"ctrlLeft\",\n \"cues\",\n \"cullFace\",\n \"currentNode\",\n \"currentPage\",\n \"currentScale\",\n \"currentScript\",\n \"currentSrc\",\n \"currentState\",\n \"currentStyle\",\n \"currentTarget\",\n \"currentTime\",\n \"currentTranslate\",\n \"currentView\",\n \"cursor\",\n \"curve\",\n \"customError\",\n \"cx\",\n \"cy\",\n \"d\",\n \"data\",\n \"dataFld\",\n \"dataFormatAs\",\n \"dataPageSize\",\n \"dataSrc\",\n \"dataTransfer\",\n \"database\",\n \"dataset\",\n \"dateTime\",\n \"db\",\n \"debug\",\n \"debuggerEnabled\",\n \"declare\",\n \"decode\",\n \"decodeAudioData\",\n \"decodingInfo\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"decrypt\",\n \"default\",\n \"defaultCharset\",\n \"defaultChecked\",\n \"defaultMuted\",\n \"defaultPlaybackRate\",\n \"defaultPrevented\",\n \"defaultSelected\",\n \"defaultStatus\",\n \"defaultURL\",\n \"defaultValue\",\n \"defaultView\",\n \"defaultstatus\",\n \"defer\",\n \"defineMagicFunction\",\n \"defineMagicVariable\",\n \"defineProperties\",\n \"defineProperty\",\n \"delayTime\",\n \"delete\",\n \"deleteBuffer\",\n \"deleteCaption\",\n \"deleteCell\",\n \"deleteContents\",\n \"deleteData\",\n \"deleteDatabase\",\n \"deleteFramebuffer\",\n \"deleteFromDocument\",\n \"deleteIndex\",\n \"deleteMedium\",\n \"deleteObjectStore\",\n \"deleteProgram\",\n \"deleteRenderbuffer\",\n \"deleteRow\",\n \"deleteRule\",\n \"deleteShader\",\n \"deleteTFoot\",\n \"deleteTHead\",\n \"deleteTexture\",\n \"deliverChangeRecords\",\n \"delivery\",\n \"deliveryInfo\",\n \"deliveryStatus\",\n \"deliveryTimestamp\",\n \"delta\",\n \"deltaMode\",\n \"deltaX\",\n \"deltaY\",\n \"deltaZ\",\n \"depthFunc\",\n \"depthMask\",\n \"depthRange\",\n \"deriveBits\",\n \"deriveKey\",\n \"description\",\n \"deselectAll\",\n \"designMode\",\n \"destination\",\n \"destinationURL\",\n \"detach\",\n \"detachEvent\",\n \"detachShader\",\n \"detail\",\n \"detune\",\n \"devicePixelRatio\",\n \"deviceXDPI\",\n \"deviceYDPI\",\n \"diffuseConstant\",\n \"digest\",\n \"dimensions\",\n \"dir\",\n \"dirName\",\n \"direction\",\n \"dirxml\",\n \"disable\",\n \"disableVertexAttribArray\",\n \"disabled\",\n \"dischargingTime\",\n \"disconnect\",\n \"dispatchEvent\",\n \"display\",\n \"distanceModel\",\n \"divisor\",\n \"djsapi\",\n \"djsproxy\",\n \"doImport\",\n \"doNotTrack\",\n \"doScroll\",\n \"doctype\",\n \"document\",\n \"documentElement\",\n \"documentMode\",\n \"documentURI\",\n \"dolphin\",\n \"dolphinGameCenter\",\n \"dolphininfo\",\n \"dolphinmeta\",\n \"domComplete\",\n \"domContentLoadedEventEnd\",\n \"domContentLoadedEventStart\",\n \"domInteractive\",\n \"domLoading\",\n \"domain\",\n \"domainLookupEnd\",\n \"domainLookupStart\",\n \"dominant-baseline\",\n \"dominantBaseline\",\n \"done\",\n \"dopplerFactor\",\n \"download\",\n \"dragDrop\",\n \"draggable\",\n \"drawArrays\",\n \"drawArraysInstancedANGLE\",\n \"drawCustomFocusRing\",\n \"drawElements\",\n \"drawElementsInstancedANGLE\",\n \"drawFocusIfNeeded\",\n \"drawImage\",\n \"drawImageFromRect\",\n \"drawSystemFocusRing\",\n \"drawingBufferHeight\",\n \"drawingBufferWidth\",\n \"dropEffect\",\n \"droppedVideoFrames\",\n \"dropzone\",\n \"dump\",\n \"duplicate\",\n \"duration\",\n \"dvname\",\n \"dvnum\",\n \"dx\",\n \"dy\",\n \"dynsrc\",\n \"e\",\n \"edgeMode\",\n \"effectAllowed\",\n \"elapsedTime\",\n \"elementFromPoint\",\n \"elements\",\n \"elevation\",\n \"ellipse\",\n \"email\",\n \"embeds\",\n \"empty\",\n \"empty-cells\",\n \"emptyCells\",\n \"enable\",\n \"enableBackground\",\n \"enableStyleSheetsForSet\",\n \"enableVertexAttribArray\",\n \"enabled\",\n \"enabledPlugin\",\n \"encode\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"encoding\",\n \"encrypt\",\n \"enctype\",\n \"end\",\n \"endContainer\",\n \"endElement\",\n \"endElementAt\",\n \"endOfStream\",\n \"endOffset\",\n \"endTime\",\n \"ended\",\n \"endsWith\",\n \"entities\",\n \"entries\",\n \"entryType\",\n \"enumerate\",\n \"enumerateEditable\",\n \"error\",\n \"errorCode\",\n \"escape\",\n \"eval\",\n \"evaluate\",\n \"event\",\n \"eventPhase\",\n \"every\",\n \"exception\",\n \"exec\",\n \"execCommand\",\n \"execCommandShowHelp\",\n \"execScript\",\n \"exitFullscreen\",\n \"exitPointerLock\",\n \"exp\",\n \"expand\",\n \"expandEntityReferences\",\n \"expando\",\n \"expansion\",\n \"expiryDate\",\n \"explicitOriginalTarget\",\n \"expm1\",\n \"exponent\",\n \"exponentialRampToValueAtTime\",\n \"exportKey\",\n \"extend\",\n \"extensions\",\n \"extentNode\",\n \"extentOffset\",\n \"external\",\n \"externalResourcesRequired\",\n \"extractContents\",\n \"extractable\",\n \"f\",\n \"face\",\n \"factoryReset\",\n \"fallback\",\n \"familyName\",\n \"farthestViewportElement\",\n \"fastSeek\",\n \"fatal\",\n \"fetch\",\n \"fetchStart\",\n \"fftSize\",\n \"fgColor\",\n \"fileCreatedDate\",\n \"fileHandle\",\n \"fileModifiedDate\",\n \"fileName\",\n \"fileSize\",\n \"fileUpdatedDate\",\n \"filename\",\n \"files\",\n \"fill\",\n \"fill-opacity\",\n \"fill-rule\",\n \"fillOpacity\",\n \"fillRect\",\n \"fillRule\",\n \"fillStyle\",\n \"fillText\",\n \"filter\",\n \"filterResX\",\n \"filterResY\",\n \"filterUnits\",\n \"filters\",\n \"finally\",\n \"find\",\n \"findIndex\",\n \"findRule\",\n \"findText\",\n \"finish\",\n \"fireEvent\",\n \"firstChild\",\n \"firstElementChild\",\n \"firstPage\",\n \"fixed\",\n \"flex\",\n \"flex-basis\",\n \"flex-direction\",\n \"flex-flow\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"flexBasis\",\n \"flexDirection\",\n \"flexFlow\",\n \"flexGrow\",\n \"flexShrink\",\n \"flexWrap\",\n \"flipX\",\n \"flipY\",\n \"float\",\n \"flood-color\",\n \"flood-opacity\",\n \"floodColor\",\n \"floodOpacity\",\n \"floor\",\n \"flush\",\n \"focus\",\n \"focusNode\",\n \"focusOffset\",\n \"font\",\n \"font-family\",\n \"font-feature-settings\",\n \"font-kerning\",\n \"font-language-override\",\n \"font-size\",\n \"font-size-adjust\",\n \"font-stretch\",\n \"font-style\",\n \"font-synthesis\",\n \"font-variant\",\n \"font-variant-alternates\",\n \"font-variant-caps\",\n \"font-variant-east-asian\",\n \"font-variant-ligatures\",\n \"font-variant-numeric\",\n \"font-variant-position\",\n \"font-weight\",\n \"fontFamily\",\n \"fontFeatureSettings\",\n \"fontKerning\",\n \"fontLanguageOverride\",\n \"fontSize\",\n \"fontSizeAdjust\",\n \"fontSmoothingEnabled\",\n \"fontStretch\",\n \"fontStyle\",\n \"fontSynthesis\",\n \"fontVariant\",\n \"fontVariantAlternates\",\n \"fontVariantCaps\",\n \"fontVariantEastAsian\",\n \"fontVariantLigatures\",\n \"fontVariantNumeric\",\n \"fontVariantPosition\",\n \"fontWeight\",\n \"fontcolor\",\n \"fonts\",\n \"fontsize\",\n \"for\",\n \"forEach\",\n \"forceRedraw\",\n \"form\",\n \"formAction\",\n \"formEnctype\",\n \"formMethod\",\n \"formNoValidate\",\n \"formTarget\",\n \"format\",\n \"formatToParts\",\n \"forms\",\n \"forward\",\n \"fr\",\n \"frame\",\n \"frameBorder\",\n \"frameElement\",\n \"frameSpacing\",\n \"framebufferRenderbuffer\",\n \"framebufferTexture2D\",\n \"frames\",\n \"freeSpace\",\n \"freeze\",\n \"frequency\",\n \"frequencyBinCount\",\n \"from\",\n \"fromCharCode\",\n \"fromCodePoint\",\n \"fromElement\",\n \"frontFace\",\n \"fround\",\n \"fullScreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fx\",\n \"fy\",\n \"gain\",\n \"gamepad\",\n \"gamma\",\n \"genderIdentity\",\n \"generateKey\",\n \"generateMipmap\",\n \"generateRequest\",\n \"geolocation\",\n \"gestureObject\",\n \"get\",\n \"getActiveAttrib\",\n \"getActiveUniform\",\n \"getAdjacentText\",\n \"getAll\",\n \"getAllResponseHeaders\",\n \"getAsFile\",\n \"getAsString\",\n \"getAttachedShaders\",\n \"getAttribLocation\",\n \"getAttribute\",\n \"getAttributeNS\",\n \"getAttributeNode\",\n \"getAttributeNodeNS\",\n \"getAudioTracks\",\n \"getBBox\",\n \"getBattery\",\n \"getBlob\",\n \"getBookmark\",\n \"getBoundingClientRect\",\n \"getBufferParameter\",\n \"getByteFrequencyData\",\n \"getByteTimeDomainData\",\n \"getCSSCanvasContext\",\n \"getCTM\",\n \"getCandidateWindowClientRect\",\n \"getChannelData\",\n \"getCharNumAtPosition\",\n \"getClientRect\",\n \"getClientRects\",\n \"getCompositionAlternatives\",\n \"getComputedStyle\",\n \"getComputedTextLength\",\n \"getConfiguration\",\n \"getContext\",\n \"getContextAttributes\",\n \"getCounterValue\",\n \"getCueAsHTML\",\n \"getCueById\",\n \"getCurrentPosition\",\n \"getCurrentTime\",\n \"getData\",\n \"getDatabaseNames\",\n \"getDate\",\n \"getDay\",\n \"getDefaultComputedStyle\",\n \"getDestinationInsertionPoints\",\n \"getDistributedNodes\",\n \"getEditable\",\n \"getElementById\",\n \"getElementsByClassName\",\n \"getElementsByName\",\n \"getElementsByTagName\",\n \"getElementsByTagNameNS\",\n \"getEnclosureList\",\n \"getEndPositionOfChar\",\n \"getEntries\",\n \"getEntriesByName\",\n \"getEntriesByType\",\n \"getError\",\n \"getExtension\",\n \"getExtentOfChar\",\n \"getFeature\",\n \"getFile\",\n \"getFloat32\",\n \"getFloat64\",\n \"getFloatFrequencyData\",\n \"getFloatTimeDomainData\",\n \"getFloatValue\",\n \"getFramebufferAttachmentParameter\",\n \"getFrequencyResponse\",\n \"getFullYear\",\n \"getGamepads\",\n \"getHours\",\n \"getImageData\",\n \"getInt16\",\n \"getInt32\",\n \"getInt8\",\n \"getIntersectionList\",\n \"getItem\",\n \"getItems\",\n \"getKey\",\n \"getLineDash\",\n \"getLocalStreams\",\n \"getMarks\",\n \"getMatchedCSSRules\",\n \"getMeasures\",\n \"getMetadata\",\n \"getMilliseconds\",\n \"getMinutes\",\n \"getModifierState\",\n \"getMonth\",\n \"getNamedItem\",\n \"getNamedItemNS\",\n \"getNotifier\",\n \"getNumberOfChars\",\n \"getOverrideHistoryNavigationMode\",\n \"getOverrideStyle\",\n \"getOwnPropertyDescriptor\",\n \"getOwnPropertyNames\",\n \"getOwnPropertySymbols\",\n \"getParameter\",\n \"getPathSegAtLength\",\n \"getPointAtLength\",\n \"getPreference\",\n \"getPreferenceDefault\",\n \"getPresentationAttribute\",\n \"getPreventDefault\",\n \"getProgramInfoLog\",\n \"getProgramParameter\",\n \"getPropertyCSSValue\",\n \"getPropertyPriority\",\n \"getPropertyShorthand\",\n \"getPropertyValue\",\n \"getPrototypeOf\",\n \"getRGBColorValue\",\n \"getRandomValues\",\n \"getRangeAt\",\n \"getReceivers\",\n \"getRectValue\",\n \"getRegistration\",\n \"getRemoteStreams\",\n \"getRenderbufferParameter\",\n \"getResponseHeader\",\n \"getRoot\",\n \"getRotationOfChar\",\n \"getSVGDocument\",\n \"getScreenCTM\",\n \"getSeconds\",\n \"getSelection\",\n \"getSenders\",\n \"getShaderInfoLog\",\n \"getShaderParameter\",\n \"getShaderPrecisionFormat\",\n \"getShaderSource\",\n \"getSimpleDuration\",\n \"getSiteIcons\",\n \"getSources\",\n \"getSpeculativeParserUrls\",\n \"getStartPositionOfChar\",\n \"getStartTime\",\n \"getStats\",\n \"getStorageUpdates\",\n \"getStreamById\",\n \"getStringValue\",\n \"getSubStringLength\",\n \"getSubscription\",\n \"getSupportedExtensions\",\n \"getTexParameter\",\n \"getTime\",\n \"getTimezoneOffset\",\n \"getTotalLength\",\n \"getTrackById\",\n \"getTracks\",\n \"getTransformToElement\",\n \"getUTCDate\",\n \"getUTCDay\",\n \"getUTCFullYear\",\n \"getUTCHours\",\n \"getUTCMilliseconds\",\n \"getUTCMinutes\",\n \"getUTCMonth\",\n \"getUTCSeconds\",\n \"getUint16\",\n \"getUint32\",\n \"getUint8\",\n \"getUniform\",\n \"getUniformLocation\",\n \"getUserMedia\",\n \"getValues\",\n \"getVarDate\",\n \"getVariableValue\",\n \"getVertexAttrib\",\n \"getVertexAttribOffset\",\n \"getVideoPlaybackQuality\",\n \"getVideoTracks\",\n \"getWakeLockState\",\n \"getYear\",\n \"givenName\",\n \"global\",\n \"globalAlpha\",\n \"globalCompositeOperation\",\n \"glyphOrientationHorizontal\",\n \"glyphOrientationVertical\",\n \"glyphRef\",\n \"go\",\n \"gradientTransform\",\n \"gradientUnits\",\n \"grammars\",\n \"green\",\n \"group\",\n \"groupCollapsed\",\n \"groupEnd\",\n \"hardwareConcurrency\",\n \"has\",\n \"hasAttribute\",\n \"hasAttributeNS\",\n \"hasAttributes\",\n \"hasChildNodes\",\n \"hasComposition\",\n \"hasExtension\",\n \"hasFeature\",\n \"hasFocus\",\n \"hasLayout\",\n \"hasOwnProperty\",\n \"hash\",\n \"head\",\n \"headers\",\n \"heading\",\n \"height\",\n \"hidden\",\n \"hide\",\n \"hideFocus\",\n \"high\",\n \"hint\",\n \"history\",\n \"honorificPrefix\",\n \"honorificSuffix\",\n \"horizontalOverflow\",\n \"host\",\n \"hostname\",\n \"href\",\n \"hreflang\",\n \"hspace\",\n \"html5TagCheckInerface\",\n \"htmlFor\",\n \"htmlText\",\n \"httpEquiv\",\n \"hwTimestamp\",\n \"hypot\",\n \"iccId\",\n \"iceConnectionState\",\n \"iceGatheringState\",\n \"icon\",\n \"id\",\n \"identifier\",\n \"identity\",\n \"ignoreBOM\",\n \"ignoreCase\",\n \"image-orientation\",\n \"image-rendering\",\n \"imageOrientation\",\n \"imageRendering\",\n \"images\",\n \"ime-mode\",\n \"imeMode\",\n \"implementation\",\n \"importKey\",\n \"importNode\",\n \"importStylesheet\",\n \"imports\",\n \"impp\",\n \"imul\",\n \"in1\",\n \"in2\",\n \"inBandMetadataTrackDispatchType\",\n \"inRange\",\n \"includes\",\n \"incremental\",\n \"indeterminate\",\n \"index\",\n \"indexNames\",\n \"indexOf\",\n \"indexedDB\",\n \"inertiaDestinationX\",\n \"inertiaDestinationY\",\n \"info\",\n \"init\",\n \"initAnimationEvent\",\n \"initBeforeLoadEvent\",\n \"initClipboardEvent\",\n \"initCloseEvent\",\n \"initCommandEvent\",\n \"initCompositionEvent\",\n \"initCustomEvent\",\n \"initData\",\n \"initDeviceMotionEvent\",\n \"initDeviceOrientationEvent\",\n \"initDragEvent\",\n \"initErrorEvent\",\n \"initEvent\",\n \"initFocusEvent\",\n \"initGestureEvent\",\n \"initHashChangeEvent\",\n \"initKeyEvent\",\n \"initKeyboardEvent\",\n \"initMSManipulationEvent\",\n \"initMessageEvent\",\n \"initMouseEvent\",\n \"initMouseScrollEvent\",\n \"initMouseWheelEvent\",\n \"initMutationEvent\",\n \"initNSMouseEvent\",\n \"initOverflowEvent\",\n \"initPageEvent\",\n \"initPageTransitionEvent\",\n \"initPointerEvent\",\n \"initPopStateEvent\",\n \"initProgressEvent\",\n \"initScrollAreaEvent\",\n \"initSimpleGestureEvent\",\n \"initStorageEvent\",\n \"initTextEvent\",\n \"initTimeEvent\",\n \"initTouchEvent\",\n \"initTransitionEvent\",\n \"initUIEvent\",\n \"initWebKitAnimationEvent\",\n \"initWebKitTransitionEvent\",\n \"initWebKitWheelEvent\",\n \"initWheelEvent\",\n \"initialTime\",\n \"initialize\",\n \"initiatorType\",\n \"inner\",\n \"innerHTML\",\n \"innerHeight\",\n \"innerText\",\n \"innerWidth\",\n \"input\",\n \"inputBuffer\",\n \"inputEncoding\",\n \"inputMethod\",\n \"insertAdjacentElement\",\n \"insertAdjacentHTML\",\n \"insertAdjacentText\",\n \"insertBefore\",\n \"insertCell\",\n \"insertData\",\n \"insertItemBefore\",\n \"insertNode\",\n \"insertRow\",\n \"insertRule\",\n \"instanceRoot\",\n \"intercept\",\n \"interimResults\",\n \"internalSubset\",\n \"intersectsNode\",\n \"interval\",\n \"invalidIteratorState\",\n \"inverse\",\n \"invertSelf\",\n \"is\",\n \"is2D\",\n \"isAlternate\",\n \"isArray\",\n \"isBingCurrentSearchDefault\",\n \"isBuffer\",\n \"isCandidateWindowVisible\",\n \"isChar\",\n \"isCollapsed\",\n \"isComposing\",\n \"isContentEditable\",\n \"isContentHandlerRegistered\",\n \"isContextLost\",\n \"isDefaultNamespace\",\n \"isDisabled\",\n \"isEnabled\",\n \"isEqual\",\n \"isEqualNode\",\n \"isExtensible\",\n \"isFinite\",\n \"isFramebuffer\",\n \"isFrozen\",\n \"isGenerator\",\n \"isId\",\n \"isInjected\",\n \"isInteger\",\n \"isMap\",\n \"isMultiLine\",\n \"isNaN\",\n \"isOpen\",\n \"isPointInFill\",\n \"isPointInPath\",\n \"isPointInRange\",\n \"isPointInStroke\",\n \"isPrefAlternate\",\n \"isPrimary\",\n \"isProgram\",\n \"isPropertyImplicit\",\n \"isProtocolHandlerRegistered\",\n \"isPrototypeOf\",\n \"isRenderbuffer\",\n \"isSafeInteger\",\n \"isSameNode\",\n \"isSealed\",\n \"isShader\",\n \"isSupported\",\n \"isTextEdit\",\n \"isTexture\",\n \"isTrusted\",\n \"isTypeSupported\",\n \"isView\",\n \"isolation\",\n \"italics\",\n \"item\",\n \"itemId\",\n \"itemProp\",\n \"itemRef\",\n \"itemScope\",\n \"itemType\",\n \"itemValue\",\n \"iterateNext\",\n \"iterator\",\n \"javaEnabled\",\n \"jobTitle\",\n \"join\",\n \"json\",\n \"justify-content\",\n \"justifyContent\",\n \"k1\",\n \"k2\",\n \"k3\",\n \"k4\",\n \"kernelMatrix\",\n \"kernelUnitLengthX\",\n \"kernelUnitLengthY\",\n \"kerning\",\n \"key\",\n \"keyCode\",\n \"keyFor\",\n \"keyIdentifier\",\n \"keyLightEnabled\",\n \"keyLocation\",\n \"keyPath\",\n \"keySystem\",\n \"keyText\",\n \"keyUsage\",\n \"keys\",\n \"keytype\",\n \"kind\",\n \"knee\",\n \"label\",\n \"labels\",\n \"lang\",\n \"language\",\n \"languages\",\n \"largeArcFlag\",\n \"lastChild\",\n \"lastElementChild\",\n \"lastEventId\",\n \"lastIndex\",\n \"lastIndexOf\",\n \"lastMatch\",\n \"lastMessageSubject\",\n \"lastMessageType\",\n \"lastModified\",\n \"lastModifiedDate\",\n \"lastPage\",\n \"lastParen\",\n \"lastState\",\n \"lastStyleSheetSet\",\n \"latitude\",\n \"layerX\",\n \"layerY\",\n \"layoutFlow\",\n \"layoutGrid\",\n \"layoutGridChar\",\n \"layoutGridLine\",\n \"layoutGridMode\",\n \"layoutGridType\",\n \"lbound\",\n \"left\",\n \"leftContext\",\n \"leftMargin\",\n \"length\",\n \"lengthAdjust\",\n \"lengthComputable\",\n \"letter-spacing\",\n \"letterSpacing\",\n \"level\",\n \"lighting-color\",\n \"lightingColor\",\n \"limitingConeAngle\",\n \"line\",\n \"line-height\",\n \"lineAlign\",\n \"lineBreak\",\n \"lineCap\",\n \"lineDashOffset\",\n \"lineHeight\",\n \"lineJoin\",\n \"lineNumber\",\n \"lineTo\",\n \"lineWidth\",\n \"linearRampToValueAtTime\",\n \"lineno\",\n \"link\",\n \"linkColor\",\n \"linkProgram\",\n \"links\",\n \"list\",\n \"list-style\",\n \"list-style-image\",\n \"list-style-position\",\n \"list-style-type\",\n \"listStyle\",\n \"listStyleImage\",\n \"listStylePosition\",\n \"listStyleType\",\n \"listener\",\n \"load\",\n \"loadEventEnd\",\n \"loadEventStart\",\n \"loadTimes\",\n \"loaded\",\n \"localDescription\",\n \"localName\",\n \"localStorage\",\n \"locale\",\n \"localeCompare\",\n \"location\",\n \"locationbar\",\n \"lock\",\n \"lockedFile\",\n \"log\",\n \"log10\",\n \"log1p\",\n \"log2\",\n \"logicalXDPI\",\n \"logicalYDPI\",\n \"longDesc\",\n \"longitude\",\n \"lookupNamespaceURI\",\n \"lookupPrefix\",\n \"loop\",\n \"loopEnd\",\n \"loopStart\",\n \"looping\",\n \"low\",\n \"lower\",\n \"lowerBound\",\n \"lowerOpen\",\n \"lowsrc\",\n \"m11\",\n \"m12\",\n \"m13\",\n \"m14\",\n \"m21\",\n \"m22\",\n \"m23\",\n \"m24\",\n \"m31\",\n \"m32\",\n \"m33\",\n \"m34\",\n \"m41\",\n \"m42\",\n \"m43\",\n \"m44\",\n \"manifest\",\n \"map\",\n \"mapping\",\n \"margin\",\n \"margin-bottom\",\n \"margin-left\",\n \"margin-right\",\n \"margin-top\",\n \"marginBottom\",\n \"marginHeight\",\n \"marginLeft\",\n \"marginRight\",\n \"marginTop\",\n \"marginWidth\",\n \"mark\",\n \"marker\",\n \"marker-end\",\n \"marker-mid\",\n \"marker-offset\",\n \"marker-start\",\n \"markerEnd\",\n \"markerHeight\",\n \"markerMid\",\n \"markerOffset\",\n \"markerStart\",\n \"markerUnits\",\n \"markerWidth\",\n \"marks\",\n \"mask\",\n \"mask-type\",\n \"maskContentUnits\",\n \"maskType\",\n \"maskUnits\",\n \"match\",\n \"matchMedia\",\n \"matchMedium\",\n \"matches\",\n \"matrix\",\n \"matrixTransform\",\n \"max\",\n \"max-height\",\n \"max-width\",\n \"maxAlternatives\",\n \"maxChannelCount\",\n \"maxConnectionsPerServer\",\n \"maxDecibels\",\n \"maxDistance\",\n \"maxHeight\",\n \"maxLength\",\n \"maxTouchPoints\",\n \"maxValue\",\n \"maxWidth\",\n \"measure\",\n \"measureText\",\n \"media\",\n \"mediaCapabilities\",\n \"mediaDevices\",\n \"mediaElement\",\n \"mediaGroup\",\n \"mediaKeys\",\n \"mediaText\",\n \"meetOrSlice\",\n \"memory\",\n \"menubar\",\n \"mergeAttributes\",\n \"message\",\n \"messageClass\",\n \"messageHandlers\",\n \"metaKey\",\n \"method\",\n \"mimeType\",\n \"mimeTypes\",\n \"min\",\n \"min-height\",\n \"min-width\",\n \"minDecibels\",\n \"minHeight\",\n \"minValue\",\n \"minWidth\",\n \"miterLimit\",\n \"mix-blend-mode\",\n \"mixBlendMode\",\n \"mode\",\n \"modify\",\n \"mount\",\n \"move\",\n \"moveBy\",\n \"moveEnd\",\n \"moveFirst\",\n \"moveFocusDown\",\n \"moveFocusLeft\",\n \"moveFocusRight\",\n \"moveFocusUp\",\n \"moveNext\",\n \"moveRow\",\n \"moveStart\",\n \"moveTo\",\n \"moveToBookmark\",\n \"moveToElementText\",\n \"moveToPoint\",\n \"mozAdd\",\n \"mozAnimationStartTime\",\n \"mozAnon\",\n \"mozApps\",\n \"mozAudioCaptured\",\n \"mozAudioChannelType\",\n \"mozAutoplayEnabled\",\n \"mozCancelAnimationFrame\",\n \"mozCancelFullScreen\",\n \"mozCancelRequestAnimationFrame\",\n \"mozCaptureStream\",\n \"mozCaptureStreamUntilEnded\",\n \"mozClearDataAt\",\n \"mozContact\",\n \"mozContacts\",\n \"mozCreateFileHandle\",\n \"mozCurrentTransform\",\n \"mozCurrentTransformInverse\",\n \"mozCursor\",\n \"mozDash\",\n \"mozDashOffset\",\n \"mozDecodedFrames\",\n \"mozExitPointerLock\",\n \"mozFillRule\",\n \"mozFragmentEnd\",\n \"mozFrameDelay\",\n \"mozFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozGetAll\",\n \"mozGetAllKeys\",\n \"mozGetAsFile\",\n \"mozGetDataAt\",\n \"mozGetMetadata\",\n \"mozGetUserMedia\",\n \"mozHasAudio\",\n \"mozHasItem\",\n \"mozHidden\",\n \"mozImageSmoothingEnabled\",\n \"mozIndexedDB\",\n \"mozInnerScreenX\",\n \"mozInnerScreenY\",\n \"mozInputSource\",\n \"mozIsTextField\",\n \"mozItem\",\n \"mozItemCount\",\n \"mozItems\",\n \"mozLength\",\n \"mozLockOrientation\",\n \"mozMatchesSelector\",\n \"mozMovementX\",\n \"mozMovementY\",\n \"mozOpaque\",\n \"mozOrientation\",\n \"mozPaintCount\",\n \"mozPaintedFrames\",\n \"mozParsedFrames\",\n \"mozPay\",\n \"mozPointerLockElement\",\n \"mozPresentedFrames\",\n \"mozPreservesPitch\",\n \"mozPressure\",\n \"mozPrintCallback\",\n \"mozRTCIceCandidate\",\n \"mozRTCPeerConnection\",\n \"mozRTCSessionDescription\",\n \"mozRemove\",\n \"mozRequestAnimationFrame\",\n \"mozRequestFullScreen\",\n \"mozRequestPointerLock\",\n \"mozSetDataAt\",\n \"mozSetImageElement\",\n \"mozSourceNode\",\n \"mozSrcObject\",\n \"mozSystem\",\n \"mozTCPSocket\",\n \"mozTextStyle\",\n \"mozTypesAt\",\n \"mozUnlockOrientation\",\n \"mozUserCancelled\",\n \"mozVisibilityState\",\n \"msAnimation\",\n \"msAnimationDelay\",\n \"msAnimationDirection\",\n \"msAnimationDuration\",\n \"msAnimationFillMode\",\n \"msAnimationIterationCount\",\n \"msAnimationName\",\n \"msAnimationPlayState\",\n \"msAnimationStartTime\",\n \"msAnimationTimingFunction\",\n \"msBackfaceVisibility\",\n \"msBlockProgression\",\n \"msCSSOMElementFloatMetrics\",\n \"msCaching\",\n \"msCachingEnabled\",\n \"msCancelRequestAnimationFrame\",\n \"msCapsLockWarningOff\",\n \"msClearImmediate\",\n \"msClose\",\n \"msContentZoomChaining\",\n \"msContentZoomFactor\",\n \"msContentZoomLimit\",\n \"msContentZoomLimitMax\",\n \"msContentZoomLimitMin\",\n \"msContentZoomSnap\",\n \"msContentZoomSnapPoints\",\n \"msContentZoomSnapType\",\n \"msContentZooming\",\n \"msConvertURL\",\n \"msCrypto\",\n \"msDoNotTrack\",\n \"msElementsFromPoint\",\n \"msElementsFromRect\",\n \"msExitFullscreen\",\n \"msExtendedCode\",\n \"msFillRule\",\n \"msFirstPaint\",\n \"msFlex\",\n \"msFlexAlign\",\n \"msFlexDirection\",\n \"msFlexFlow\",\n \"msFlexItemAlign\",\n \"msFlexLinePack\",\n \"msFlexNegative\",\n \"msFlexOrder\",\n \"msFlexPack\",\n \"msFlexPositive\",\n \"msFlexPreferredSize\",\n \"msFlexWrap\",\n \"msFlowFrom\",\n \"msFlowInto\",\n \"msFontFeatureSettings\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"msGetInputContext\",\n \"msGetRegionContent\",\n \"msGetUntransformedBounds\",\n \"msGraphicsTrustStatus\",\n \"msGridColumn\",\n \"msGridColumnAlign\",\n \"msGridColumnSpan\",\n \"msGridColumns\",\n \"msGridRow\",\n \"msGridRowAlign\",\n \"msGridRowSpan\",\n \"msGridRows\",\n \"msHidden\",\n \"msHighContrastAdjust\",\n \"msHyphenateLimitChars\",\n \"msHyphenateLimitLines\",\n \"msHyphenateLimitZone\",\n \"msHyphens\",\n \"msImageSmoothingEnabled\",\n \"msImeAlign\",\n \"msIndexedDB\",\n \"msInterpolationMode\",\n \"msIsStaticHTML\",\n \"msKeySystem\",\n \"msKeys\",\n \"msLaunchUri\",\n \"msLockOrientation\",\n \"msManipulationViewsEnabled\",\n \"msMatchMedia\",\n \"msMatchesSelector\",\n \"msMaxTouchPoints\",\n \"msOrientation\",\n \"msOverflowStyle\",\n \"msPerspective\",\n \"msPerspectiveOrigin\",\n \"msPlayToDisabled\",\n \"msPlayToPreferredSourceUri\",\n \"msPlayToPrimary\",\n \"msPointerEnabled\",\n \"msRegionOverflow\",\n \"msReleasePointerCapture\",\n \"msRequestAnimationFrame\",\n \"msRequestFullscreen\",\n \"msSaveBlob\",\n \"msSaveOrOpenBlob\",\n \"msScrollChaining\",\n \"msScrollLimit\",\n \"msScrollLimitXMax\",\n \"msScrollLimitXMin\",\n \"msScrollLimitYMax\",\n \"msScrollLimitYMin\",\n \"msScrollRails\",\n \"msScrollSnapPointsX\",\n \"msScrollSnapPointsY\",\n \"msScrollSnapType\",\n \"msScrollSnapX\",\n \"msScrollSnapY\",\n \"msScrollTranslation\",\n \"msSetImmediate\",\n \"msSetMediaKeys\",\n \"msSetPointerCapture\",\n \"msTextCombineHorizontal\",\n \"msTextSizeAdjust\",\n \"msToBlob\",\n \"msTouchAction\",\n \"msTouchSelect\",\n \"msTraceAsyncCallbackCompleted\",\n \"msTraceAsyncCallbackStarting\",\n \"msTraceAsyncOperationCompleted\",\n \"msTraceAsyncOperationStarting\",\n \"msTransform\",\n \"msTransformOrigin\",\n \"msTransformStyle\",\n \"msTransition\",\n \"msTransitionDelay\",\n \"msTransitionDuration\",\n \"msTransitionProperty\",\n \"msTransitionTimingFunction\",\n \"msUnlockOrientation\",\n \"msUpdateAsyncCallbackRelation\",\n \"msUserSelect\",\n \"msVisibilityState\",\n \"msWrapFlow\",\n \"msWrapMargin\",\n \"msWrapThrough\",\n \"msWriteProfilerMark\",\n \"msZoom\",\n \"msZoomTo\",\n \"mt\",\n \"multiEntry\",\n \"multiSelectionObj\",\n \"multiline\",\n \"multiple\",\n \"multiply\",\n \"multiplySelf\",\n \"mutableFile\",\n \"muted\",\n \"n\",\n \"name\",\n \"nameProp\",\n \"namedItem\",\n \"namedRecordset\",\n \"names\",\n \"namespaceURI\",\n \"namespaces\",\n \"naturalHeight\",\n \"naturalWidth\",\n \"navigate\",\n \"navigation\",\n \"navigationMode\",\n \"navigationStart\",\n \"navigator\",\n \"near\",\n \"nearestViewportElement\",\n \"negative\",\n \"netscape\",\n \"networkState\",\n \"newScale\",\n \"newTranslate\",\n \"newURL\",\n \"newValue\",\n \"newValueSpecifiedUnits\",\n \"newVersion\",\n \"newhome\",\n \"next\",\n \"nextElementSibling\",\n \"nextNode\",\n \"nextPage\",\n \"nextSibling\",\n \"nickname\",\n \"noHref\",\n \"noResize\",\n \"noShade\",\n \"noValidate\",\n \"noWrap\",\n \"nodeName\",\n \"nodeType\",\n \"nodeValue\",\n \"normalize\",\n \"normalizedPathSegList\",\n \"notationName\",\n \"notations\",\n \"note\",\n \"noteGrainOn\",\n \"noteOff\",\n \"noteOn\",\n \"now\",\n \"numOctaves\",\n \"number\",\n \"numberOfChannels\",\n \"numberOfInputs\",\n \"numberOfItems\",\n \"numberOfOutputs\",\n \"numberValue\",\n \"oMatchesSelector\",\n \"object\",\n \"object-fit\",\n \"object-position\",\n \"objectFit\",\n \"objectPosition\",\n \"objectStore\",\n \"objectStoreNames\",\n \"observe\",\n \"of\",\n \"offscreenBuffering\",\n \"offset\",\n \"offsetHeight\",\n \"offsetLeft\",\n \"offsetNode\",\n \"offsetParent\",\n \"offsetTop\",\n \"offsetWidth\",\n \"offsetX\",\n \"offsetY\",\n \"ok\",\n \"oldURL\",\n \"oldValue\",\n \"oldVersion\",\n \"olderShadowRoot\",\n \"onLine\",\n \"onabort\",\n \"onactivate\",\n \"onactive\",\n \"onaddstream\",\n \"onaddtrack\",\n \"onafterprint\",\n \"onafterscriptexecute\",\n \"onafterupdate\",\n \"onaudioend\",\n \"onaudioprocess\",\n \"onaudiostart\",\n \"onautocomplete\",\n \"onautocompleteerror\",\n \"onbeforeactivate\",\n \"onbeforecopy\",\n \"onbeforecut\",\n \"onbeforedeactivate\",\n \"onbeforeeditfocus\",\n \"onbeforepaste\",\n \"onbeforeprint\",\n \"onbeforescriptexecute\",\n \"onbeforeunload\",\n \"onbeforeupdate\",\n \"onblocked\",\n \"onblur\",\n \"onbounce\",\n \"onboundary\",\n \"oncached\",\n \"oncancel\",\n \"oncandidatewindowhide\",\n \"oncandidatewindowshow\",\n \"oncandidatewindowupdate\",\n \"oncanplay\",\n \"oncanplaythrough\",\n \"once\",\n \"oncellchange\",\n \"onchange\",\n \"onchargingchange\",\n \"onchargingtimechange\",\n \"onchecking\",\n \"onclick\",\n \"onclose\",\n \"oncompassneedscalibration\",\n \"oncomplete\",\n \"oncontextmenu\",\n \"oncontrolselect\",\n \"oncopy\",\n \"oncuechange\",\n \"oncut\",\n \"ondataavailable\",\n \"ondatachannel\",\n \"ondatasetchanged\",\n \"ondatasetcomplete\",\n \"ondblclick\",\n \"ondeactivate\",\n \"ondevicelight\",\n \"ondevicemotion\",\n \"ondeviceorientation\",\n \"ondeviceproximity\",\n \"ondischargingtimechange\",\n \"ondisplay\",\n \"ondownloading\",\n \"ondrag\",\n \"ondragend\",\n \"ondragenter\",\n \"ondragleave\",\n \"ondragover\",\n \"ondragstart\",\n \"ondrop\",\n \"ondurationchange\",\n \"onemptied\",\n \"onencrypted\",\n \"onend\",\n \"onended\",\n \"onenter\",\n \"onerror\",\n \"onerrorupdate\",\n \"onexit\",\n \"onfilterchange\",\n \"onfinish\",\n \"onfocus\",\n \"onfocusin\",\n \"onfocusout\",\n \"onfullscreenchange\",\n \"onfullscreenerror\",\n \"ongesturechange\",\n \"ongestureend\",\n \"ongesturestart\",\n \"ongotpointercapture\",\n \"onhashchange\",\n \"onhelp\",\n \"onicecandidate\",\n \"oniceconnectionstatechange\",\n \"oninactive\",\n \"oninput\",\n \"oninvalid\",\n \"onkeydown\",\n \"onkeypress\",\n \"onkeyup\",\n \"onlanguagechange\",\n \"onlayoutcomplete\",\n \"onlevelchange\",\n \"onload\",\n \"onloadeddata\",\n \"onloadedmetadata\",\n \"onloadend\",\n \"onloadstart\",\n \"onlosecapture\",\n \"onlostpointercapture\",\n \"only\",\n \"onmark\",\n \"onmessage\",\n \"onmousedown\",\n \"onmouseenter\",\n \"onmouseleave\",\n \"onmousemove\",\n \"onmouseout\",\n \"onmouseover\",\n \"onmouseup\",\n \"onmousewheel\",\n \"onmove\",\n \"onmoveend\",\n \"onmovestart\",\n \"onmozfullscreenchange\",\n \"onmozfullscreenerror\",\n \"onmozorientationchange\",\n \"onmozpointerlockchange\",\n \"onmozpointerlockerror\",\n \"onmscontentzoom\",\n \"onmsfullscreenchange\",\n \"onmsfullscreenerror\",\n \"onmsgesturechange\",\n \"onmsgesturedoubletap\",\n \"onmsgestureend\",\n \"onmsgesturehold\",\n \"onmsgesturestart\",\n \"onmsgesturetap\",\n \"onmsgotpointercapture\",\n \"onmsinertiastart\",\n \"onmslostpointercapture\",\n \"onmsmanipulationstatechanged\",\n \"onmsneedkey\",\n \"onmsorientationchange\",\n \"onmspointercancel\",\n \"onmspointerdown\",\n \"onmspointerenter\",\n \"onmspointerhover\",\n \"onmspointerleave\",\n \"onmspointermove\",\n \"onmspointerout\",\n \"onmspointerover\",\n \"onmspointerup\",\n \"onmssitemodejumplistitemremoved\",\n \"onmsthumbnailclick\",\n \"onnegotiationneeded\",\n \"onnomatch\",\n \"onnoupdate\",\n \"onobsolete\",\n \"onoffline\",\n \"ononline\",\n \"onopen\",\n \"onorientationchange\",\n \"onpagechange\",\n \"onpagehide\",\n \"onpageshow\",\n \"onpaste\",\n \"onpause\",\n \"onplay\",\n \"onplaying\",\n \"onpluginstreamstart\",\n \"onpointercancel\",\n \"onpointerdown\",\n \"onpointerenter\",\n \"onpointerleave\",\n \"onpointerlockchange\",\n \"onpointerlockerror\",\n \"onpointermove\",\n \"onpointerout\",\n \"onpointerover\",\n \"onpointerup\",\n \"onpopstate\",\n \"onprogress\",\n \"onpropertychange\",\n \"onratechange\",\n \"onreadystatechange\",\n \"onremovestream\",\n \"onremovetrack\",\n \"onreset\",\n \"onresize\",\n \"onresizeend\",\n \"onresizestart\",\n \"onresourcetimingbufferfull\",\n \"onresult\",\n \"onresume\",\n \"onrowenter\",\n \"onrowexit\",\n \"onrowsdelete\",\n \"onrowsinserted\",\n \"onscroll\",\n \"onsearch\",\n \"onseeked\",\n \"onseeking\",\n \"onselect\",\n \"onselectionchange\",\n \"onselectstart\",\n \"onshow\",\n \"onsignalingstatechange\",\n \"onsoundend\",\n \"onsoundstart\",\n \"onspeechend\",\n \"onspeechstart\",\n \"onstalled\",\n \"onstart\",\n \"onstatechange\",\n \"onstop\",\n \"onstorage\",\n \"onstoragecommit\",\n \"onsubmit\",\n \"onsuccess\",\n \"onsuspend\",\n \"ontextinput\",\n \"ontimeout\",\n \"ontimeupdate\",\n \"ontoggle\",\n \"ontouchcancel\",\n \"ontouchend\",\n \"ontouchmove\",\n \"ontouchstart\",\n \"ontransitionend\",\n \"onunload\",\n \"onupdateready\",\n \"onupgradeneeded\",\n \"onuserproximity\",\n \"onversionchange\",\n \"onvoiceschanged\",\n \"onvolumechange\",\n \"onwaiting\",\n \"onwarning\",\n \"onwebkitanimationend\",\n \"onwebkitanimationiteration\",\n \"onwebkitanimationstart\",\n \"onwebkitcurrentplaybacktargetiswirelesschanged\",\n \"onwebkitfullscreenchange\",\n \"onwebkitfullscreenerror\",\n \"onwebkitkeyadded\",\n \"onwebkitkeyerror\",\n \"onwebkitkeymessage\",\n \"onwebkitneedkey\",\n \"onwebkitorientationchange\",\n \"onwebkitplaybacktargetavailabilitychanged\",\n \"onwebkitpointerlockchange\",\n \"onwebkitpointerlockerror\",\n \"onwebkitresourcetimingbufferfull\",\n \"onwebkittransitionend\",\n \"onwheel\",\n \"onzoom\",\n \"opacity\",\n \"open\",\n \"openCursor\",\n \"openDatabase\",\n \"openKeyCursor\",\n \"opener\",\n \"opera\",\n \"operationType\",\n \"operator\",\n \"opr\",\n \"optimum\",\n \"options\",\n \"order\",\n \"orderX\",\n \"orderY\",\n \"ordered\",\n \"org\",\n \"orient\",\n \"orientAngle\",\n \"orientType\",\n \"orientation\",\n \"origin\",\n \"originalTarget\",\n \"orphans\",\n \"oscpu\",\n \"outerHTML\",\n \"outerHeight\",\n \"outerText\",\n \"outerWidth\",\n \"outline\",\n \"outline-color\",\n \"outline-offset\",\n \"outline-style\",\n \"outline-width\",\n \"outlineColor\",\n \"outlineOffset\",\n \"outlineStyle\",\n \"outlineWidth\",\n \"outputBuffer\",\n \"overflow\",\n \"overflow-x\",\n \"overflow-y\",\n \"overflowX\",\n \"overflowY\",\n \"overrideMimeType\",\n \"oversample\",\n \"ownerDocument\",\n \"ownerElement\",\n \"ownerNode\",\n \"ownerRule\",\n \"ownerSVGElement\",\n \"owningElement\",\n \"p1\",\n \"p2\",\n \"p3\",\n \"p4\",\n \"pad\",\n \"padding\",\n \"padding-bottom\",\n \"padding-left\",\n \"padding-right\",\n \"padding-top\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingRight\",\n \"paddingTop\",\n \"page\",\n \"page-break-after\",\n \"page-break-before\",\n \"page-break-inside\",\n \"pageBreakAfter\",\n \"pageBreakBefore\",\n \"pageBreakInside\",\n \"pageCount\",\n \"pageX\",\n \"pageXOffset\",\n \"pageY\",\n \"pageYOffset\",\n \"pages\",\n \"paint-order\",\n \"paintOrder\",\n \"paintRequests\",\n \"paintType\",\n \"palette\",\n \"panningModel\",\n \"parent\",\n \"parentElement\",\n \"parentNode\",\n \"parentRule\",\n \"parentStyleSheet\",\n \"parentTextEdit\",\n \"parentWindow\",\n \"parse\",\n \"parseFloat\",\n \"parseFromString\",\n \"parseInt\",\n \"participants\",\n \"passive\",\n \"password\",\n \"pasteHTML\",\n \"path\",\n \"pathLength\",\n \"pathSegList\",\n \"pathSegType\",\n \"pathSegTypeAsLetter\",\n \"pathname\",\n \"pattern\",\n \"patternContentUnits\",\n \"patternMismatch\",\n \"patternTransform\",\n \"patternUnits\",\n \"pause\",\n \"pauseAnimations\",\n \"pauseOnExit\",\n \"paused\",\n \"pending\",\n \"performance\",\n \"permission\",\n \"persisted\",\n \"personalbar\",\n \"perspective\",\n \"perspective-origin\",\n \"perspectiveOrigin\",\n \"phoneticFamilyName\",\n \"phoneticGivenName\",\n \"photo\",\n \"ping\",\n \"pitch\",\n \"pixelBottom\",\n \"pixelDepth\",\n \"pixelHeight\",\n \"pixelLeft\",\n \"pixelRight\",\n \"pixelStorei\",\n \"pixelTop\",\n \"pixelUnitToMillimeterX\",\n \"pixelUnitToMillimeterY\",\n \"pixelWidth\",\n \"placeholder\",\n \"platform\",\n \"play\",\n \"playbackRate\",\n \"playbackState\",\n \"playbackTime\",\n \"played\",\n \"plugins\",\n \"pluginspage\",\n \"pname\",\n \"pointer-events\",\n \"pointerBeforeReferenceNode\",\n \"pointerEnabled\",\n \"pointerEvents\",\n \"pointerId\",\n \"pointerLockElement\",\n \"pointerType\",\n \"points\",\n \"pointsAtX\",\n \"pointsAtY\",\n \"pointsAtZ\",\n \"polygonOffset\",\n \"pop\",\n \"popupWindowFeatures\",\n \"popupWindowName\",\n \"popupWindowURI\",\n \"port\",\n \"port1\",\n \"port2\",\n \"ports\",\n \"posBottom\",\n \"posHeight\",\n \"posLeft\",\n \"posRight\",\n \"posTop\",\n \"posWidth\",\n \"position\",\n \"positionAlign\",\n \"postError\",\n \"postMessage\",\n \"poster\",\n \"pow\",\n \"powerOff\",\n \"preMultiplySelf\",\n \"precision\",\n \"preferredStyleSheetSet\",\n \"preferredStylesheetSet\",\n \"prefix\",\n \"preload\",\n \"prepend\",\n \"preserveAlpha\",\n \"preserveAspectRatio\",\n \"preserveAspectRatioString\",\n \"pressed\",\n \"pressure\",\n \"prevValue\",\n \"preventDefault\",\n \"preventExtensions\",\n \"previousElementSibling\",\n \"previousNode\",\n \"previousPage\",\n \"previousScale\",\n \"previousSibling\",\n \"previousTranslate\",\n \"primaryKey\",\n \"primitiveType\",\n \"primitiveUnits\",\n \"principals\",\n \"print\",\n \"privateKey\",\n \"probablySupportsContext\",\n \"process\",\n \"processIceMessage\",\n \"product\",\n \"productSub\",\n \"profile\",\n \"profileEnd\",\n \"profiles\",\n \"prompt\",\n \"properties\",\n \"propertyIsEnumerable\",\n \"propertyName\",\n \"protocol\",\n \"protocolLong\",\n \"prototype\",\n \"pseudoClass\",\n \"pseudoElement\",\n \"publicId\",\n \"publicKey\",\n \"published\",\n \"push\",\n \"pushNotification\",\n \"pushState\",\n \"put\",\n \"putImageData\",\n \"quadraticCurveTo\",\n \"qualifier\",\n \"queryCommandEnabled\",\n \"queryCommandIndeterm\",\n \"queryCommandState\",\n \"queryCommandSupported\",\n \"queryCommandText\",\n \"queryCommandValue\",\n \"querySelector\",\n \"querySelectorAll\",\n \"quote\",\n \"quotes\",\n \"r\",\n \"r1\",\n \"r2\",\n \"race\",\n \"radiogroup\",\n \"radiusX\",\n \"radiusY\",\n \"random\",\n \"range\",\n \"rangeCount\",\n \"rangeMax\",\n \"rangeMin\",\n \"rangeOffset\",\n \"rangeOverflow\",\n \"rangeParent\",\n \"rangeUnderflow\",\n \"rate\",\n \"ratio\",\n \"raw\",\n \"read\",\n \"readAsArrayBuffer\",\n \"readAsBinaryString\",\n \"readAsBlob\",\n \"readAsDataURL\",\n \"readAsText\",\n \"readOnly\",\n \"readPixels\",\n \"readReportRequested\",\n \"readyState\",\n \"reason\",\n \"reboot\",\n \"receiver\",\n \"receivers\",\n \"recordNumber\",\n \"recordset\",\n \"rect\",\n \"red\",\n \"redirectCount\",\n \"redirectEnd\",\n \"redirectStart\",\n \"reduce\",\n \"reduceRight\",\n \"reduction\",\n \"refDistance\",\n \"refX\",\n \"refY\",\n \"referenceNode\",\n \"referrer\",\n \"refresh\",\n \"region\",\n \"regionAnchorX\",\n \"regionAnchorY\",\n \"regionId\",\n \"regions\",\n \"register\",\n \"registerContentHandler\",\n \"registerElement\",\n \"registerProtocolHandler\",\n \"reject\",\n \"rel\",\n \"relList\",\n \"relatedNode\",\n \"relatedTarget\",\n \"release\",\n \"releaseCapture\",\n \"releaseEvents\",\n \"releasePointerCapture\",\n \"releaseShaderCompiler\",\n \"reliable\",\n \"reload\",\n \"remainingSpace\",\n \"remoteDescription\",\n \"remove\",\n \"removeAllRanges\",\n \"removeAttribute\",\n \"removeAttributeNS\",\n \"removeAttributeNode\",\n \"removeBehavior\",\n \"removeChild\",\n \"removeCue\",\n \"removeEventListener\",\n \"removeFilter\",\n \"removeImport\",\n \"removeItem\",\n \"removeListener\",\n \"removeNamedItem\",\n \"removeNamedItemNS\",\n \"removeNode\",\n \"removeParameter\",\n \"removeProperty\",\n \"removeRange\",\n \"removeRegion\",\n \"removeRule\",\n \"removeSiteSpecificTrackingException\",\n \"removeSourceBuffer\",\n \"removeStream\",\n \"removeTrack\",\n \"removeVariable\",\n \"removeWakeLockListener\",\n \"removeWebWideTrackingException\",\n \"removedNodes\",\n \"renderbufferStorage\",\n \"renderedBuffer\",\n \"renderingMode\",\n \"repeat\",\n \"replace\",\n \"replaceAdjacentText\",\n \"replaceChild\",\n \"replaceData\",\n \"replaceId\",\n \"replaceItem\",\n \"replaceNode\",\n \"replaceState\",\n \"replaceTrack\",\n \"replaceWholeText\",\n \"reportValidity\",\n \"requestAnimationFrame\",\n \"requestAutocomplete\",\n \"requestData\",\n \"requestFullscreen\",\n \"requestMediaKeySystemAccess\",\n \"requestPermission\",\n \"requestPointerLock\",\n \"requestStart\",\n \"requestingWindow\",\n \"required\",\n \"requiredExtensions\",\n \"requiredFeatures\",\n \"reset\",\n \"resetTransform\",\n \"resize\",\n \"resizeBy\",\n \"resizeTo\",\n \"resolve\",\n \"response\",\n \"responseBody\",\n \"responseEnd\",\n \"responseStart\",\n \"responseText\",\n \"responseType\",\n \"responseURL\",\n \"responseXML\",\n \"restore\",\n \"result\",\n \"resultType\",\n \"resume\",\n \"returnValue\",\n \"rev\",\n \"reverse\",\n \"reversed\",\n \"revocable\",\n \"revokeObjectURL\",\n \"rgbColor\",\n \"right\",\n \"rightContext\",\n \"rightMargin\",\n \"rolloffFactor\",\n \"root\",\n \"rootElement\",\n \"rotate\",\n \"rotateAxisAngle\",\n \"rotateAxisAngleSelf\",\n \"rotateFromVector\",\n \"rotateFromVectorSelf\",\n \"rotateSelf\",\n \"rotation\",\n \"rotationRate\",\n \"round\",\n \"rowIndex\",\n \"rowSpan\",\n \"rows\",\n \"rubyAlign\",\n \"rubyOverhang\",\n \"rubyPosition\",\n \"rules\",\n \"runtime\",\n \"runtimeStyle\",\n \"rx\",\n \"ry\",\n \"safari\",\n \"sampleCoverage\",\n \"sampleRate\",\n \"sandbox\",\n \"save\",\n \"scale\",\n \"scale3d\",\n \"scale3dSelf\",\n \"scaleNonUniform\",\n \"scaleNonUniformSelf\",\n \"scaleSelf\",\n \"scheme\",\n \"scissor\",\n \"scope\",\n \"scopeName\",\n \"scoped\",\n \"screen\",\n \"screenBrightness\",\n \"screenEnabled\",\n \"screenLeft\",\n \"screenPixelToMillimeterX\",\n \"screenPixelToMillimeterY\",\n \"screenTop\",\n \"screenX\",\n \"screenY\",\n \"scripts\",\n \"scroll\",\n \"scroll-behavior\",\n \"scrollAmount\",\n \"scrollBehavior\",\n \"scrollBy\",\n \"scrollByLines\",\n \"scrollByPages\",\n \"scrollDelay\",\n \"scrollHeight\",\n \"scrollIntoView\",\n \"scrollIntoViewIfNeeded\",\n \"scrollLeft\",\n \"scrollLeftMax\",\n \"scrollMaxX\",\n \"scrollMaxY\",\n \"scrollTo\",\n \"scrollTop\",\n \"scrollTopMax\",\n \"scrollWidth\",\n \"scrollX\",\n \"scrollY\",\n \"scrollbar3dLightColor\",\n \"scrollbarArrowColor\",\n \"scrollbarBaseColor\",\n \"scrollbarDarkShadowColor\",\n \"scrollbarFaceColor\",\n \"scrollbarHighlightColor\",\n \"scrollbarShadowColor\",\n \"scrollbarTrackColor\",\n \"scrollbars\",\n \"scrolling\",\n \"sdp\",\n \"sdpMLineIndex\",\n \"sdpMid\",\n \"seal\",\n \"search\",\n \"searchBox\",\n \"searchBoxJavaBridge_\",\n \"searchParams\",\n \"sectionRowIndex\",\n \"secureConnectionStart\",\n \"security\",\n \"seed\",\n \"seekable\",\n \"seeking\",\n \"select\",\n \"selectAllChildren\",\n \"selectNode\",\n \"selectNodeContents\",\n \"selectNodes\",\n \"selectSingleNode\",\n \"selectSubString\",\n \"selected\",\n \"selectedIndex\",\n \"selectedOptions\",\n \"selectedStyleSheetSet\",\n \"selectedStylesheetSet\",\n \"selection\",\n \"selectionDirection\",\n \"selectionEnd\",\n \"selectionStart\",\n \"selector\",\n \"selectorText\",\n \"self\",\n \"send\",\n \"sendAsBinary\",\n \"sendBeacon\",\n \"sender\",\n \"sentTimestamp\",\n \"separator\",\n \"serializeToString\",\n \"serviceWorker\",\n \"sessionId\",\n \"sessionStorage\",\n \"set\",\n \"setActive\",\n \"setAlpha\",\n \"setAttribute\",\n \"setAttributeNS\",\n \"setAttributeNode\",\n \"setAttributeNodeNS\",\n \"setBaseAndExtent\",\n \"setBingCurrentSearchDefault\",\n \"setCapture\",\n \"setColor\",\n \"setCompositeOperation\",\n \"setCurrentTime\",\n \"setCustomValidity\",\n \"setData\",\n \"setDate\",\n \"setDragImage\",\n \"setEnd\",\n \"setEndAfter\",\n \"setEndBefore\",\n \"setEndPoint\",\n \"setFillColor\",\n \"setFilterRes\",\n \"setFloat32\",\n \"setFloat64\",\n \"setFloatValue\",\n \"setFullYear\",\n \"setHours\",\n \"setImmediate\",\n \"setInt16\",\n \"setInt32\",\n \"setInt8\",\n \"setInterval\",\n \"setItem\",\n \"setLineCap\",\n \"setLineDash\",\n \"setLineJoin\",\n \"setLineWidth\",\n \"setLocalDescription\",\n \"setMatrix\",\n \"setMatrixValue\",\n \"setMediaKeys\",\n \"setMilliseconds\",\n \"setMinutes\",\n \"setMiterLimit\",\n \"setMonth\",\n \"setNamedItem\",\n \"setNamedItemNS\",\n \"setNonUserCodeExceptions\",\n \"setOrientToAngle\",\n \"setOrientToAuto\",\n \"setOrientation\",\n \"setOverrideHistoryNavigationMode\",\n \"setPaint\",\n \"setParameter\",\n \"setPeriodicWave\",\n \"setPointerCapture\",\n \"setPosition\",\n \"setPreference\",\n \"setProperty\",\n \"setPrototypeOf\",\n \"setRGBColor\",\n \"setRGBColorICCColor\",\n \"setRadius\",\n \"setRangeText\",\n \"setRemoteDescription\",\n \"setRequestHeader\",\n \"setResizable\",\n \"setResourceTimingBufferSize\",\n \"setRotate\",\n \"setScale\",\n \"setSeconds\",\n \"setSelectionRange\",\n \"setServerCertificate\",\n \"setShadow\",\n \"setSkewX\",\n \"setSkewY\",\n \"setStart\",\n \"setStartAfter\",\n \"setStartBefore\",\n \"setStdDeviation\",\n \"setStringValue\",\n \"setStrokeColor\",\n \"setSuggestResult\",\n \"setTargetAtTime\",\n \"setTargetValueAtTime\",\n \"setTime\",\n \"setTimeout\",\n \"setTransform\",\n \"setTranslate\",\n \"setUTCDate\",\n \"setUTCFullYear\",\n \"setUTCHours\",\n \"setUTCMilliseconds\",\n \"setUTCMinutes\",\n \"setUTCMonth\",\n \"setUTCSeconds\",\n \"setUint16\",\n \"setUint32\",\n \"setUint8\",\n \"setUri\",\n \"setValueAtTime\",\n \"setValueCurveAtTime\",\n \"setVariable\",\n \"setVelocity\",\n \"setVersion\",\n \"setYear\",\n \"settingName\",\n \"settingValue\",\n \"sex\",\n \"shaderSource\",\n \"shadowBlur\",\n \"shadowColor\",\n \"shadowOffsetX\",\n \"shadowOffsetY\",\n \"shadowRoot\",\n \"shape\",\n \"shape-rendering\",\n \"shapeRendering\",\n \"sheet\",\n \"shift\",\n \"shiftKey\",\n \"shiftLeft\",\n \"show\",\n \"showHelp\",\n \"showModal\",\n \"showModalDialog\",\n \"showModelessDialog\",\n \"showNotification\",\n \"sidebar\",\n \"sign\",\n \"signalingState\",\n \"sin\",\n \"singleNodeValue\",\n \"sinh\",\n \"size\",\n \"sizeToContent\",\n \"sizes\",\n \"skewX\",\n \"skewXSelf\",\n \"skewY\",\n \"skewYSelf\",\n \"slice\",\n \"slope\",\n \"small\",\n \"smooth\",\n \"smil\",\n \"smoothingTimeConstant\",\n \"snapToLines\",\n \"snapshotItem\",\n \"snapshotLength\",\n \"some\",\n \"sort\",\n \"source\",\n \"sourceBuffer\",\n \"sourceBuffers\",\n \"sourceIndex\",\n \"spacing\",\n \"span\",\n \"speakAs\",\n \"speaking\",\n \"specified\",\n \"specularConstant\",\n \"specularExponent\",\n \"speechSynthesis\",\n \"speed\",\n \"speedOfSound\",\n \"spellcheck\",\n \"splice\",\n \"split\",\n \"splitText\",\n \"spreadMethod\",\n \"sqrt\",\n \"src\",\n \"srcElement\",\n \"srcFilter\",\n \"srcUrn\",\n \"srcdoc\",\n \"srclang\",\n \"srcset\",\n \"stack\",\n \"stackTraceLimit\",\n \"stacktrace\",\n \"standalone\",\n \"standby\",\n \"start\",\n \"startContainer\",\n \"startIce\",\n \"startOffset\",\n \"startRendering\",\n \"startTime\",\n \"startsWith\",\n \"state\",\n \"status\",\n \"statusMessage\",\n \"statusText\",\n \"statusbar\",\n \"stdDeviationX\",\n \"stdDeviationY\",\n \"stencilFunc\",\n \"stencilFuncSeparate\",\n \"stencilMask\",\n \"stencilMaskSeparate\",\n \"stencilOp\",\n \"stencilOpSeparate\",\n \"step\",\n \"stepDown\",\n \"stepMismatch\",\n \"stepUp\",\n \"sticky\",\n \"stitchTiles\",\n \"stop\",\n \"stop-color\",\n \"stop-opacity\",\n \"stopColor\",\n \"stopImmediatePropagation\",\n \"stopOpacity\",\n \"stopPropagation\",\n \"storageArea\",\n \"storageName\",\n \"storageStatus\",\n \"storeSiteSpecificTrackingException\",\n \"storeWebWideTrackingException\",\n \"stpVersion\",\n \"stream\",\n \"strike\",\n \"stringValue\",\n \"stringify\",\n \"stroke\",\n \"stroke-dasharray\",\n \"stroke-dashoffset\",\n \"stroke-linecap\",\n \"stroke-linejoin\",\n \"stroke-miterlimit\",\n \"stroke-opacity\",\n \"stroke-width\",\n \"strokeDasharray\",\n \"strokeDashoffset\",\n \"strokeLinecap\",\n \"strokeLinejoin\",\n \"strokeMiterlimit\",\n \"strokeOpacity\",\n \"strokeRect\",\n \"strokeStyle\",\n \"strokeText\",\n \"strokeWidth\",\n \"style\",\n \"styleFloat\",\n \"styleMedia\",\n \"styleSheet\",\n \"styleSheetSets\",\n \"styleSheets\",\n \"sub\",\n \"subarray\",\n \"subject\",\n \"submit\",\n \"subscribe\",\n \"substr\",\n \"substring\",\n \"substringData\",\n \"subtle\",\n \"subtree\",\n \"suffix\",\n \"suffixes\",\n \"summary\",\n \"sup\",\n \"supports\",\n \"surfaceScale\",\n \"surroundContents\",\n \"suspend\",\n \"suspendRedraw\",\n \"swapCache\",\n \"swapNode\",\n \"sweepFlag\",\n \"symbols\",\n \"system\",\n \"systemCode\",\n \"systemId\",\n \"systemLanguage\",\n \"systemXDPI\",\n \"systemYDPI\",\n \"tBodies\",\n \"tFoot\",\n \"tHead\",\n \"tabIndex\",\n \"table\",\n \"table-layout\",\n \"tableLayout\",\n \"tableValues\",\n \"tag\",\n \"tagName\",\n \"tagUrn\",\n \"tags\",\n \"taintEnabled\",\n \"takeRecords\",\n \"tan\",\n \"tanh\",\n \"target\",\n \"targetElement\",\n \"targetTouches\",\n \"targetX\",\n \"targetY\",\n \"tel\",\n \"terminate\",\n \"test\",\n \"texImage2D\",\n \"texParameterf\",\n \"texParameteri\",\n \"texSubImage2D\",\n \"text\",\n \"text-align\",\n \"text-anchor\",\n \"text-decoration\",\n \"text-decoration-color\",\n \"text-decoration-line\",\n \"text-decoration-style\",\n \"text-indent\",\n \"text-overflow\",\n \"text-rendering\",\n \"text-shadow\",\n \"text-transform\",\n \"textAlign\",\n \"textAlignLast\",\n \"textAnchor\",\n \"textAutospace\",\n \"textBaseline\",\n \"textContent\",\n \"textDecoration\",\n \"textDecorationBlink\",\n \"textDecorationColor\",\n \"textDecorationLine\",\n \"textDecorationLineThrough\",\n \"textDecorationNone\",\n \"textDecorationOverline\",\n \"textDecorationStyle\",\n \"textDecorationUnderline\",\n \"textIndent\",\n \"textJustify\",\n \"textJustifyTrim\",\n \"textKashida\",\n \"textKashidaSpace\",\n \"textLength\",\n \"textOverflow\",\n \"textRendering\",\n \"textShadow\",\n \"textTracks\",\n \"textTransform\",\n \"textUnderlinePosition\",\n \"then\",\n \"threadId\",\n \"threshold\",\n \"tiltX\",\n \"tiltY\",\n \"time\",\n \"timeEnd\",\n \"timeStamp\",\n \"timeout\",\n \"timestamp\",\n \"timestampOffset\",\n \"timing\",\n \"title\",\n \"toArray\",\n \"toBlob\",\n \"toDataURL\",\n \"toDateString\",\n \"toElement\",\n \"toExponential\",\n \"toFixed\",\n \"toFloat32Array\",\n \"toFloat64Array\",\n \"toGMTString\",\n \"toISOString\",\n \"toJSON\",\n \"toLocaleDateString\",\n \"toLocaleFormat\",\n \"toLocaleLowerCase\",\n \"toLocaleString\",\n \"toLocaleTimeString\",\n \"toLocaleUpperCase\",\n \"toLowerCase\",\n \"toMethod\",\n \"toPrecision\",\n \"toSdp\",\n \"toSource\",\n \"toStaticHTML\",\n \"toString\",\n \"toStringTag\",\n \"toTimeString\",\n \"toUTCString\",\n \"toUpperCase\",\n \"toggle\",\n \"toggleLongPressEnabled\",\n \"tooLong\",\n \"toolbar\",\n \"top\",\n \"topMargin\",\n \"total\",\n \"totalFrameDelay\",\n \"totalVideoFrames\",\n \"touchAction\",\n \"touches\",\n \"trace\",\n \"track\",\n \"transaction\",\n \"transactions\",\n \"transform\",\n \"transform-origin\",\n \"transform-style\",\n \"transformOrigin\",\n \"transformPoint\",\n \"transformString\",\n \"transformStyle\",\n \"transformToDocument\",\n \"transformToFragment\",\n \"transition\",\n \"transition-delay\",\n \"transition-duration\",\n \"transition-property\",\n \"transition-timing-function\",\n \"transitionDelay\",\n \"transitionDuration\",\n \"transitionProperty\",\n \"transitionTimingFunction\",\n \"translate\",\n \"translateSelf\",\n \"translationX\",\n \"translationY\",\n \"trim\",\n \"trimLeft\",\n \"trimRight\",\n \"trueSpeed\",\n \"trunc\",\n \"truncate\",\n \"type\",\n \"typeDetail\",\n \"typeMismatch\",\n \"typeMustMatch\",\n \"types\",\n \"ubound\",\n \"undefined\",\n \"unescape\",\n \"uneval\",\n \"unicode-bidi\",\n \"unicodeBidi\",\n \"uniform1f\",\n \"uniform1fv\",\n \"uniform1i\",\n \"uniform1iv\",\n \"uniform2f\",\n \"uniform2fv\",\n \"uniform2i\",\n \"uniform2iv\",\n \"uniform3f\",\n \"uniform3fv\",\n \"uniform3i\",\n \"uniform3iv\",\n \"uniform4f\",\n \"uniform4fv\",\n \"uniform4i\",\n \"uniform4iv\",\n \"uniformMatrix2fv\",\n \"uniformMatrix3fv\",\n \"uniformMatrix4fv\",\n \"unique\",\n \"uniqueID\",\n \"uniqueNumber\",\n \"unitType\",\n \"units\",\n \"unloadEventEnd\",\n \"unloadEventStart\",\n \"unlock\",\n \"unmount\",\n \"unobserve\",\n \"unpause\",\n \"unpauseAnimations\",\n \"unreadCount\",\n \"unregister\",\n \"unregisterContentHandler\",\n \"unregisterProtocolHandler\",\n \"unscopables\",\n \"unselectable\",\n \"unshift\",\n \"unsubscribe\",\n \"unsuspendRedraw\",\n \"unsuspendRedrawAll\",\n \"unwatch\",\n \"unwrapKey\",\n \"update\",\n \"updateCommands\",\n \"updateIce\",\n \"updateInterval\",\n \"updateSettings\",\n \"updated\",\n \"updating\",\n \"upload\",\n \"upper\",\n \"upperBound\",\n \"upperOpen\",\n \"uri\",\n \"url\",\n \"urn\",\n \"urns\",\n \"usages\",\n \"useCurrentView\",\n \"useMap\",\n \"useProgram\",\n \"usedSpace\",\n \"userAgent\",\n \"userLanguage\",\n \"username\",\n \"v8BreakIterator\",\n \"vAlign\",\n \"vLink\",\n \"valid\",\n \"validateProgram\",\n \"validationMessage\",\n \"validity\",\n \"value\",\n \"valueAsDate\",\n \"valueAsNumber\",\n \"valueAsString\",\n \"valueInSpecifiedUnits\",\n \"valueMissing\",\n \"valueOf\",\n \"valueText\",\n \"valueType\",\n \"values\",\n \"vector-effect\",\n \"vectorEffect\",\n \"velocityAngular\",\n \"velocityExpansion\",\n \"velocityX\",\n \"velocityY\",\n \"vendor\",\n \"vendorSub\",\n \"verify\",\n \"version\",\n \"vertexAttrib1f\",\n \"vertexAttrib1fv\",\n \"vertexAttrib2f\",\n \"vertexAttrib2fv\",\n \"vertexAttrib3f\",\n \"vertexAttrib3fv\",\n \"vertexAttrib4f\",\n \"vertexAttrib4fv\",\n \"vertexAttribDivisorANGLE\",\n \"vertexAttribPointer\",\n \"vertical\",\n \"vertical-align\",\n \"verticalAlign\",\n \"verticalOverflow\",\n \"vibrate\",\n \"videoHeight\",\n \"videoTracks\",\n \"videoWidth\",\n \"view\",\n \"viewBox\",\n \"viewBoxString\",\n \"viewTarget\",\n \"viewTargetString\",\n \"viewport\",\n \"viewportAnchorX\",\n \"viewportAnchorY\",\n \"viewportElement\",\n \"visibility\",\n \"visibilityState\",\n \"visible\",\n \"vlinkColor\",\n \"voice\",\n \"volume\",\n \"vrml\",\n \"vspace\",\n \"w\",\n \"wand\",\n \"warn\",\n \"wasClean\",\n \"watch\",\n \"watchPosition\",\n \"webdriver\",\n \"webkitAddKey\",\n \"webkitAnimation\",\n \"webkitAnimationDelay\",\n \"webkitAnimationDirection\",\n \"webkitAnimationDuration\",\n \"webkitAnimationFillMode\",\n \"webkitAnimationIterationCount\",\n \"webkitAnimationName\",\n \"webkitAnimationPlayState\",\n \"webkitAnimationTimingFunction\",\n \"webkitAppearance\",\n \"webkitAudioContext\",\n \"webkitAudioDecodedByteCount\",\n \"webkitAudioPannerNode\",\n \"webkitBackfaceVisibility\",\n \"webkitBackground\",\n \"webkitBackgroundAttachment\",\n \"webkitBackgroundClip\",\n \"webkitBackgroundColor\",\n \"webkitBackgroundImage\",\n \"webkitBackgroundOrigin\",\n \"webkitBackgroundPosition\",\n \"webkitBackgroundPositionX\",\n \"webkitBackgroundPositionY\",\n \"webkitBackgroundRepeat\",\n \"webkitBackgroundSize\",\n \"webkitBackingStorePixelRatio\",\n \"webkitBorderImage\",\n \"webkitBorderImageOutset\",\n \"webkitBorderImageRepeat\",\n \"webkitBorderImageSlice\",\n \"webkitBorderImageSource\",\n \"webkitBorderImageWidth\",\n \"webkitBoxAlign\",\n \"webkitBoxDirection\",\n \"webkitBoxFlex\",\n \"webkitBoxOrdinalGroup\",\n \"webkitBoxOrient\",\n \"webkitBoxPack\",\n \"webkitBoxSizing\",\n \"webkitCancelAnimationFrame\",\n \"webkitCancelFullScreen\",\n \"webkitCancelKeyRequest\",\n \"webkitCancelRequestAnimationFrame\",\n \"webkitClearResourceTimings\",\n \"webkitClosedCaptionsVisible\",\n \"webkitConvertPointFromNodeToPage\",\n \"webkitConvertPointFromPageToNode\",\n \"webkitCreateShadowRoot\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCurrentPlaybackTargetIsWireless\",\n \"webkitDirectionInvertedFromDevice\",\n \"webkitDisplayingFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitEnterFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitExitFullscreen\",\n \"webkitExitPointerLock\",\n \"webkitFullScreenKeyboardInputAllowed\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitGenerateKeyRequest\",\n \"webkitGetAsEntry\",\n \"webkitGetDatabaseNames\",\n \"webkitGetEntries\",\n \"webkitGetEntriesByName\",\n \"webkitGetEntriesByType\",\n \"webkitGetFlowByName\",\n \"webkitGetGamepads\",\n \"webkitGetImageDataHD\",\n \"webkitGetNamedFlows\",\n \"webkitGetRegionFlowRanges\",\n \"webkitGetUserMedia\",\n \"webkitHasClosedCaptions\",\n \"webkitHidden\",\n \"webkitIDBCursor\",\n \"webkitIDBDatabase\",\n \"webkitIDBDatabaseError\",\n \"webkitIDBDatabaseException\",\n \"webkitIDBFactory\",\n \"webkitIDBIndex\",\n \"webkitIDBKeyRange\",\n \"webkitIDBObjectStore\",\n \"webkitIDBRequest\",\n \"webkitIDBTransaction\",\n \"webkitImageSmoothingEnabled\",\n \"webkitIndexedDB\",\n \"webkitInitMessageEvent\",\n \"webkitIsFullScreen\",\n \"webkitKeys\",\n \"webkitLineDashOffset\",\n \"webkitLockOrientation\",\n \"webkitMatchesSelector\",\n \"webkitMediaStream\",\n \"webkitNotifications\",\n \"webkitOfflineAudioContext\",\n \"webkitOrientation\",\n \"webkitPeerConnection00\",\n \"webkitPersistentStorage\",\n \"webkitPointerLockElement\",\n \"webkitPostMessage\",\n \"webkitPreservesPitch\",\n \"webkitPutImageDataHD\",\n \"webkitRTCPeerConnection\",\n \"webkitRegionOverset\",\n \"webkitRequestAnimationFrame\",\n \"webkitRequestFileSystem\",\n \"webkitRequestFullScreen\",\n \"webkitRequestFullscreen\",\n \"webkitRequestPointerLock\",\n \"webkitResolveLocalFileSystemURL\",\n \"webkitSetMediaKeys\",\n \"webkitSetResourceTimingBufferSize\",\n \"webkitShadowRoot\",\n \"webkitShowPlaybackTargetPicker\",\n \"webkitSlice\",\n \"webkitSpeechGrammar\",\n \"webkitSpeechGrammarList\",\n \"webkitSpeechRecognition\",\n \"webkitSpeechRecognitionError\",\n \"webkitSpeechRecognitionEvent\",\n \"webkitStorageInfo\",\n \"webkitSupportsFullscreen\",\n \"webkitTemporaryStorage\",\n \"webkitTextSizeAdjust\",\n \"webkitTransform\",\n \"webkitTransformOrigin\",\n \"webkitTransition\",\n \"webkitTransitionDelay\",\n \"webkitTransitionDuration\",\n \"webkitTransitionProperty\",\n \"webkitTransitionTimingFunction\",\n \"webkitURL\",\n \"webkitUnlockOrientation\",\n \"webkitUserSelect\",\n \"webkitVideoDecodedByteCount\",\n \"webkitVisibilityState\",\n \"webkitWirelessVideoPlaybackDisabled\",\n \"webkitdropzone\",\n \"webstore\",\n \"weight\",\n \"whatToShow\",\n \"wheelDelta\",\n \"wheelDeltaX\",\n \"wheelDeltaY\",\n \"which\",\n \"white-space\",\n \"whiteSpace\",\n \"wholeText\",\n \"widows\",\n \"width\",\n \"will-change\",\n \"willChange\",\n \"willValidate\",\n \"window\",\n \"withCredentials\",\n \"word-break\",\n \"word-spacing\",\n \"word-wrap\",\n \"wordBreak\",\n \"wordSpacing\",\n \"wordWrap\",\n \"wrap\",\n \"wrapKey\",\n \"write\",\n \"writeln\",\n \"writingMode\",\n \"x\",\n \"x1\",\n \"x2\",\n \"xChannelSelector\",\n \"xmlEncoding\",\n \"xmlStandalone\",\n \"xmlVersion\",\n \"xmlbase\",\n \"xmllang\",\n \"xmlspace\",\n \"y\",\n \"y1\",\n \"y2\",\n \"yChannelSelector\",\n \"yandex\",\n \"z\",\n \"z-index\",\n \"zIndex\",\n \"zoom\",\n \"zoomAndPan\",\n \"zoomRectScreen\"\n];\n","/***********************************************************************\n\n A JavaScript tokenizer / parser / beautifier / compressor.\n https://github.com/mishoo/UglifyJS2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Mihai Bazon\n \n http://mihai.bazon.net/blog\n\n Distributed under the BSD license:\n\n Copyright 2012 (c) Mihai Bazon \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n ***********************************************************************/\n\n\"use strict\";\n/* global global, self */\n\nimport {\n defaults,\n push_uniq,\n} from \"./utils/index.js\";\nimport { base54 } from \"./scope\";\nimport {\n AST_Call,\n AST_Conditional,\n AST_Dot,\n AST_ObjectKeyVal,\n AST_ObjectProperty,\n AST_Sequence,\n AST_String,\n AST_Sub,\n TreeTransformer,\n TreeWalker,\n} from \"./ast.js\";\nimport { domprops } from \"../tools/domprops.js\";\n\nfunction find_builtins(reserved) {\n domprops.forEach(add);\n\n // Compatibility fix for some standard defined globals not defined on every js environment\n var new_globals = [\"Symbol\", \"Map\", \"Promise\", \"Proxy\", \"Reflect\", \"Set\", \"WeakMap\", \"WeakSet\"];\n var objects = {};\n var global_ref = typeof global === \"object\" ? global : self;\n\n new_globals.forEach(function (new_global) {\n objects[new_global] = global_ref[new_global] || new Function();\n });\n\n // NaN will be included due to Number.NaN\n [\n \"null\",\n \"true\",\n \"false\",\n \"Infinity\",\n \"-Infinity\",\n \"undefined\",\n ].forEach(add);\n [ Object, Array, Function, Number,\n String, Boolean, Error, Math,\n Date, RegExp, objects.Symbol, ArrayBuffer,\n DataView, decodeURI, decodeURIComponent,\n encodeURI, encodeURIComponent, eval, EvalError,\n Float32Array, Float64Array, Int8Array, Int16Array,\n Int32Array, isFinite, isNaN, JSON, objects.Map, parseFloat,\n parseInt, objects.Promise, objects.Proxy, RangeError, ReferenceError,\n objects.Reflect, objects.Set, SyntaxError, TypeError, Uint8Array,\n Uint8ClampedArray, Uint16Array, Uint32Array, URIError,\n objects.WeakMap, objects.WeakSet\n ].forEach(function(ctor) {\n Object.getOwnPropertyNames(ctor).map(add);\n if (ctor.prototype) {\n Object.getOwnPropertyNames(ctor.prototype).map(add);\n }\n });\n function add(name) {\n reserved.add(name);\n }\n}\n\nfunction reserve_quoted_keys(ast, reserved) {\n function add(name) {\n push_uniq(reserved, name);\n }\n\n ast.walk(new TreeWalker(function(node) {\n if (node instanceof AST_ObjectKeyVal && node.quote) {\n add(node.key);\n } else if (node instanceof AST_ObjectProperty && node.quote) {\n add(node.key.name);\n } else if (node instanceof AST_Sub) {\n addStrings(node.property, add);\n }\n }));\n}\n\nfunction addStrings(node, add) {\n node.walk(new TreeWalker(function(node) {\n if (node instanceof AST_Sequence) {\n addStrings(node.tail_node(), add);\n } else if (node instanceof AST_String) {\n add(node.value);\n } else if (node instanceof AST_Conditional) {\n addStrings(node.consequent, add);\n addStrings(node.alternative, add);\n }\n return true;\n }));\n}\n\nfunction mangle_properties(ast, options) {\n options = defaults(options, {\n builtins: false,\n cache: null,\n debug: false,\n keep_quoted: false,\n only_cache: false,\n regex: null,\n reserved: null,\n undeclared: false,\n }, true);\n\n var reserved_option = options.reserved;\n if (!Array.isArray(reserved_option)) reserved_option = [reserved_option];\n var reserved = new Set(reserved_option);\n if (!options.builtins) find_builtins(reserved);\n\n var cname = -1;\n var cache;\n if (options.cache) {\n cache = options.cache.props;\n cache.forEach(function(mangled_name) {\n reserved.add(mangled_name);\n });\n } else {\n cache = new Map();\n }\n\n var regex = options.regex && new RegExp(options.regex);\n\n // note debug is either false (disabled), or a string of the debug suffix to use (enabled).\n // note debug may be enabled as an empty string, which is falsey. Also treat passing 'true'\n // the same as passing an empty string.\n var debug = options.debug !== false;\n var debug_name_suffix;\n if (debug) {\n debug_name_suffix = (options.debug === true ? \"\" : options.debug);\n }\n\n var names_to_mangle = new Set();\n var unmangleable = new Set();\n\n var keep_quoted_strict = options.keep_quoted === \"strict\";\n\n // step 1: find candidates to mangle\n ast.walk(new TreeWalker(function(node) {\n if (node instanceof AST_ObjectKeyVal) {\n if (typeof node.key == \"string\" &&\n (!keep_quoted_strict || !node.quote)) {\n add(node.key);\n }\n } else if (node instanceof AST_ObjectProperty) {\n // setter or getter, since KeyVal is handled above\n if (!keep_quoted_strict || !node.key.end.quote) {\n add(node.key.name);\n }\n } else if (node instanceof AST_Dot) {\n var declared = !!options.undeclared;\n if (!declared) {\n var root = node;\n while (root.expression) {\n root = root.expression;\n }\n declared = !(root.thedef && root.thedef.undeclared);\n }\n if (declared &&\n (!keep_quoted_strict || !node.quote)) {\n add(node.property);\n }\n } else if (node instanceof AST_Sub) {\n if (!keep_quoted_strict) {\n addStrings(node.property, add);\n }\n } else if (node instanceof AST_Call\n && node.expression.print_to_string() == \"Object.defineProperty\") {\n addStrings(node.args[1], add);\n }\n }));\n\n // step 2: transform the tree, renaming properties\n return ast.transform(new TreeTransformer(function(node) {\n if (node instanceof AST_ObjectKeyVal) {\n if (typeof node.key == \"string\" &&\n (!keep_quoted_strict || !node.quote)) {\n node.key = mangle(node.key);\n }\n } else if (node instanceof AST_ObjectProperty) {\n // setter or getter\n if (!keep_quoted_strict || !node.key.end.quote) {\n node.key.name = mangle(node.key.name);\n }\n } else if (node instanceof AST_Dot) {\n if (!keep_quoted_strict || !node.quote) {\n node.property = mangle(node.property);\n }\n } else if (!options.keep_quoted && node instanceof AST_Sub) {\n node.property = mangleStrings(node.property);\n } else if (node instanceof AST_Call\n && node.expression.print_to_string() == \"Object.defineProperty\") {\n node.args[1] = mangleStrings(node.args[1]);\n }\n }));\n\n // only function declarations after this line\n\n function can_mangle(name) {\n if (unmangleable.has(name)) return false;\n if (reserved.has(name)) return false;\n if (options.only_cache) {\n return cache.has(name);\n }\n if (/^-?[0-9]+(\\.[0-9]+)?(e[+-][0-9]+)?$/.test(name)) return false;\n return true;\n }\n\n function should_mangle(name) {\n if (regex && !regex.test(name)) return false;\n if (reserved.has(name)) return false;\n return cache.has(name)\n || names_to_mangle.has(name);\n }\n\n function add(name) {\n if (can_mangle(name))\n names_to_mangle.add(name);\n\n if (!should_mangle(name)) {\n unmangleable.add(name);\n }\n }\n\n function mangle(name) {\n if (!should_mangle(name)) {\n return name;\n }\n\n var mangled = cache.get(name);\n if (!mangled) {\n if (debug) {\n // debug mode: use a prefix and suffix to preserve readability, e.g. o.foo -> o._$foo$NNN_.\n var debug_mangled = \"_$\" + name + \"$\" + debug_name_suffix + \"_\";\n\n if (can_mangle(debug_mangled)) {\n mangled = debug_mangled;\n }\n }\n\n // either debug mode is off, or it is on and we could not use the mangled name\n if (!mangled) {\n do {\n mangled = base54(++cname);\n } while (!can_mangle(mangled));\n }\n\n cache.set(name, mangled);\n }\n return mangled;\n }\n\n function mangleStrings(node) {\n return node.transform(new TreeTransformer(function(node) {\n if (node instanceof AST_Sequence) {\n var last = node.expressions.length - 1;\n node.expressions[last] = mangleStrings(node.expressions[last]);\n } else if (node instanceof AST_String) {\n node.value = mangle(node.value);\n } else if (node instanceof AST_Conditional) {\n node.consequent = mangleStrings(node.consequent);\n node.alternative = mangleStrings(node.alternative);\n }\n return node;\n }));\n }\n}\n\nexport {\n reserve_quoted_keys,\n mangle_properties,\n};\n","\"use strict\";\n/* eslint-env browser, es6, node */\n\nimport {\n defaults,\n map_from_object,\n map_to_object,\n HOP,\n} from \"./utils/index.js\";\nimport {\n AST_Node,\n AST_Toplevel,\n} from \"./ast.js\";\nimport { parse } from \"./parse.js\";\nimport { OutputStream } from \"./output.js\";\nimport { Compressor } from \"./compress/index.js\";\nimport { base54 } from \"./scope.js\";\nimport { SourceMap } from \"./sourcemap.js\";\nimport {\n mangle_properties,\n reserve_quoted_keys,\n} from \"./propmangle.js\";\n\nvar to_ascii = typeof atob == \"undefined\" ? function(b64) {\n return Buffer.from(b64, \"base64\").toString();\n} : atob;\nvar to_base64 = typeof btoa == \"undefined\" ? function(str) {\n return Buffer.from(str).toString(\"base64\");\n} : btoa;\n\nfunction read_source_map(code) {\n var match = /(?:^|[^.])\\/\\/# sourceMappingURL=data:application\\/json(;[\\w=-]*)?;base64,([+/0-9A-Za-z]*=*)\\s*$/.exec(code);\n if (!match) {\n AST_Node.warn(\"inline source map not found\");\n return null;\n }\n return to_ascii(match[2]);\n}\n\nfunction set_shorthand(name, options, keys) {\n if (options[name]) {\n keys.forEach(function(key) {\n if (options[key]) {\n if (typeof options[key] != \"object\") options[key] = {};\n if (!(name in options[key])) options[key][name] = options[name];\n }\n });\n }\n}\n\nfunction init_cache(cache) {\n if (!cache) return;\n if (!(\"props\" in cache)) {\n cache.props = new Map();\n } else if (!(cache.props instanceof Map)) {\n cache.props = map_from_object(cache.props);\n }\n}\n\nfunction cache_to_json(cache) {\n return {\n props: map_to_object(cache.props)\n };\n}\n\nfunction minify(files, options) {\n var warn_function = AST_Node.warn_function;\n try {\n options = defaults(options, {\n compress: {},\n ecma: undefined,\n enclose: false,\n ie8: false,\n keep_classnames: undefined,\n keep_fnames: false,\n mangle: {},\n module: false,\n nameCache: null,\n output: {},\n parse: {},\n rename: undefined,\n safari10: false,\n sourceMap: false,\n timings: false,\n toplevel: false,\n warnings: false,\n wrap: false,\n }, true);\n var timings = options.timings && {\n start: Date.now()\n };\n if (options.keep_classnames === undefined) {\n options.keep_classnames = options.keep_fnames;\n }\n if (options.rename === undefined) {\n options.rename = options.compress && options.mangle;\n }\n set_shorthand(\"ecma\", options, [ \"parse\", \"compress\", \"output\" ]);\n set_shorthand(\"ie8\", options, [ \"compress\", \"mangle\", \"output\" ]);\n set_shorthand(\"keep_classnames\", options, [ \"compress\", \"mangle\" ]);\n set_shorthand(\"keep_fnames\", options, [ \"compress\", \"mangle\" ]);\n set_shorthand(\"module\", options, [ \"parse\", \"compress\", \"mangle\" ]);\n set_shorthand(\"safari10\", options, [ \"mangle\", \"output\" ]);\n set_shorthand(\"toplevel\", options, [ \"compress\", \"mangle\" ]);\n set_shorthand(\"warnings\", options, [ \"compress\" ]);\n var quoted_props;\n if (options.mangle) {\n options.mangle = defaults(options.mangle, {\n cache: options.nameCache && (options.nameCache.vars || {}),\n eval: false,\n ie8: false,\n keep_classnames: false,\n keep_fnames: false,\n module: false,\n properties: false,\n reserved: [],\n safari10: false,\n toplevel: false,\n }, true);\n if (options.mangle.properties) {\n if (typeof options.mangle.properties != \"object\") {\n options.mangle.properties = {};\n }\n if (options.mangle.properties.keep_quoted) {\n quoted_props = options.mangle.properties.reserved;\n if (!Array.isArray(quoted_props)) quoted_props = [];\n options.mangle.properties.reserved = quoted_props;\n }\n if (options.nameCache && !(\"cache\" in options.mangle.properties)) {\n options.mangle.properties.cache = options.nameCache.props || {};\n }\n }\n init_cache(options.mangle.cache);\n init_cache(options.mangle.properties.cache);\n }\n if (options.sourceMap) {\n options.sourceMap = defaults(options.sourceMap, {\n asObject: false,\n content: null,\n filename: null,\n includeSources: false,\n root: null,\n url: null,\n }, true);\n }\n var warnings = [];\n if (options.warnings && !AST_Node.warn_function) {\n AST_Node.warn_function = function(warning) {\n warnings.push(warning);\n };\n }\n if (timings) timings.parse = Date.now();\n var toplevel;\n if (files instanceof AST_Toplevel) {\n toplevel = files;\n } else {\n if (typeof files == \"string\") {\n files = [ files ];\n }\n options.parse = options.parse || {};\n options.parse.toplevel = null;\n for (var name in files) if (HOP(files, name)) {\n options.parse.filename = name;\n options.parse.toplevel = parse(files[name], options.parse);\n if (options.sourceMap && options.sourceMap.content == \"inline\") {\n if (Object.keys(files).length > 1)\n throw new Error(\"inline source map only works with singular input\");\n options.sourceMap.content = read_source_map(files[name]);\n }\n }\n toplevel = options.parse.toplevel;\n }\n if (quoted_props && options.mangle.properties.keep_quoted !== \"strict\") {\n reserve_quoted_keys(toplevel, quoted_props);\n }\n if (options.wrap) {\n toplevel = toplevel.wrap_commonjs(options.wrap);\n }\n if (options.enclose) {\n toplevel = toplevel.wrap_enclose(options.enclose);\n }\n if (timings) timings.rename = Date.now();\n // disable rename on harmony due to expand_names bug in for-of loops\n // https://github.com/mishoo/UglifyJS2/issues/2794\n if (0 && options.rename) {\n toplevel.figure_out_scope(options.mangle);\n toplevel.expand_names(options.mangle);\n }\n if (timings) timings.compress = Date.now();\n if (options.compress) toplevel = new Compressor(options.compress).compress(toplevel);\n if (timings) timings.scope = Date.now();\n if (options.mangle) toplevel.figure_out_scope(options.mangle);\n if (timings) timings.mangle = Date.now();\n if (options.mangle) {\n base54.reset();\n toplevel.compute_char_frequency(options.mangle);\n toplevel.mangle_names(options.mangle);\n }\n if (timings) timings.properties = Date.now();\n if (options.mangle && options.mangle.properties) {\n toplevel = mangle_properties(toplevel, options.mangle.properties);\n }\n if (timings) timings.output = Date.now();\n var result = {};\n if (options.output.ast) {\n result.ast = toplevel;\n }\n if (!HOP(options.output, \"code\") || options.output.code) {\n if (options.sourceMap) {\n if (typeof options.sourceMap.content == \"string\") {\n options.sourceMap.content = JSON.parse(options.sourceMap.content);\n }\n options.output.source_map = SourceMap({\n file: options.sourceMap.filename,\n orig: options.sourceMap.content,\n root: options.sourceMap.root\n });\n if (options.sourceMap.includeSources) {\n if (files instanceof AST_Toplevel) {\n throw new Error(\"original source content unavailable\");\n } else for (var name in files) if (HOP(files, name)) {\n options.output.source_map.get().setSourceContent(name, files[name]);\n }\n }\n }\n delete options.output.ast;\n delete options.output.code;\n var stream = OutputStream(options.output);\n toplevel.print(stream);\n result.code = stream.get();\n if (options.sourceMap) {\n if(options.sourceMap.asObject) {\n result.map = options.output.source_map.get().toJSON();\n } else {\n result.map = options.output.source_map.toString();\n }\n if (options.sourceMap.url == \"inline\") {\n var sourceMap = typeof result.map === \"object\" ? JSON.stringify(result.map) : result.map;\n result.code += \"\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,\" + to_base64(sourceMap);\n } else if (options.sourceMap.url) {\n result.code += \"\\n//# sourceMappingURL=\" + options.sourceMap.url;\n }\n }\n }\n if (options.nameCache && options.mangle) {\n if (options.mangle.cache) options.nameCache.vars = cache_to_json(options.mangle.cache);\n if (options.mangle.properties && options.mangle.properties.cache) {\n options.nameCache.props = cache_to_json(options.mangle.properties.cache);\n }\n }\n if (timings) {\n timings.end = Date.now();\n result.timings = {\n parse: 1e-3 * (timings.rename - timings.parse),\n rename: 1e-3 * (timings.compress - timings.rename),\n compress: 1e-3 * (timings.scope - timings.compress),\n scope: 1e-3 * (timings.mangle - timings.scope),\n mangle: 1e-3 * (timings.properties - timings.mangle),\n properties: 1e-3 * (timings.output - timings.properties),\n output: 1e-3 * (timings.end - timings.output),\n total: 1e-3 * (timings.end - timings.start)\n };\n }\n if (warnings.length) {\n result.warnings = warnings;\n }\n return result;\n } catch (ex) {\n return { error: ex };\n } finally {\n AST_Node.warn_function = warn_function;\n }\n}\n\nexport {\n minify,\n to_ascii,\n};\n","/***********************************************************************\n\n A JavaScript tokenizer / parser / beautifier / compressor.\n https://github.com/mishoo/UglifyJS2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Mihai Bazon\n \n http://mihai.bazon.net/blog\n\n Distributed under the BSD license:\n\n Copyright 2012 (c) Mihai Bazon \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n ***********************************************************************/\n\n\"use strict\";\n\nimport MOZ_SourceMap from \"source-map\";\nimport {\n defaults,\n} from \"./utils/index.js\";\n\n// a small wrapper around fitzgen's source-map library\nfunction SourceMap(options) {\n options = defaults(options, {\n file : null,\n root : null,\n orig : null,\n\n orig_line_diff : 0,\n dest_line_diff : 0,\n });\n var generator = new MOZ_SourceMap.SourceMapGenerator({\n file : options.file,\n sourceRoot : options.root\n });\n var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig);\n\n if (orig_map) {\n orig_map.sources.forEach(function(source) {\n var sourceContent = orig_map.sourceContentFor(source, true);\n if (sourceContent) {\n generator.setSourceContent(source, sourceContent);\n }\n });\n }\n\n function add(source, gen_line, gen_col, orig_line, orig_col, name) {\n if (orig_map) {\n var info = orig_map.originalPositionFor({\n line: orig_line,\n column: orig_col\n });\n if (info.source === null) {\n return;\n }\n source = info.source;\n orig_line = info.line;\n orig_col = info.column;\n name = info.name || name;\n }\n generator.addMapping({\n generated : { line: gen_line + options.dest_line_diff, column: gen_col },\n original : { line: orig_line + options.orig_line_diff, column: orig_col },\n source : source,\n name : name\n });\n }\n return {\n add : add,\n get : function() { return generator; },\n toString : function() { return JSON.stringify(generator.toJSON()); }\n };\n}\n\nexport {\n SourceMap,\n};\n","import { minify } from \"../lib/minify\";\n\nexport function default_options() {\n const defs = {};\n\n Object.keys(infer_options({ 0: 0 })).forEach((component) => {\n const options = infer_options({\n [component]: {0: 0}\n });\n\n if (options) defs[component] = options;\n });\n return defs;\n}\n\nfunction infer_options(options) {\n var result = minify(\"\", options);\n return result.error && result.error.defs;\n}\n","/***********************************************************************\n\n A JavaScript tokenizer / parser / beautifier / compressor.\n https://github.com/mishoo/UglifyJS2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Mihai Bazon\n \n http://mihai.bazon.net/blog\n\n Distributed under the BSD license:\n\n Copyright 2012 (c) Mihai Bazon \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n ***********************************************************************/\n\n\"use strict\";\n\nimport * as ast from \"./ast.js\";\nimport { make_node } from \"./utils/index.js\";\nimport {\n AST_Accessor,\n AST_Array,\n AST_Arrow,\n AST_Assign,\n AST_Atom,\n AST_Await,\n AST_BigInt,\n AST_Binary,\n AST_Block,\n AST_BlockStatement,\n AST_Boolean,\n AST_Break,\n AST_Call,\n AST_Case,\n AST_Catch,\n AST_Class,\n AST_ClassExpression,\n AST_ConciseMethod,\n AST_Conditional,\n AST_Const,\n AST_Constant,\n AST_Continue,\n AST_Debugger,\n AST_Default,\n AST_DefaultAssign,\n AST_DefClass,\n AST_Definitions,\n AST_Defun,\n AST_Destructuring,\n AST_Directive,\n AST_Do,\n AST_Dot,\n AST_EmptyStatement,\n AST_Expansion,\n AST_Export,\n AST_False,\n AST_Finally,\n AST_For,\n AST_ForIn,\n AST_ForOf,\n AST_Function,\n AST_Hole,\n AST_If,\n AST_Import,\n AST_Label,\n AST_LabeledStatement,\n AST_LabelRef,\n AST_Lambda,\n AST_Let,\n AST_NameMapping,\n AST_New,\n AST_NewTarget,\n AST_Node,\n AST_Null,\n AST_Number,\n AST_Object,\n AST_ObjectGetter,\n AST_ObjectKeyVal,\n AST_ObjectProperty,\n AST_ObjectSetter,\n AST_PrefixedTemplateString,\n AST_PropAccess,\n AST_RegExp,\n AST_Return,\n AST_Sequence,\n AST_SimpleStatement,\n AST_Statement,\n AST_String,\n AST_Sub,\n AST_Super,\n AST_Switch,\n AST_SwitchBranch,\n AST_Symbol,\n AST_SymbolCatch,\n AST_SymbolClass,\n AST_SymbolConst,\n AST_SymbolDefClass,\n AST_SymbolDefun,\n AST_SymbolExport,\n AST_SymbolExportForeign,\n AST_SymbolFunarg,\n AST_SymbolImport,\n AST_SymbolImportForeign,\n AST_SymbolLambda,\n AST_SymbolLet,\n AST_SymbolMethod,\n AST_SymbolRef,\n AST_SymbolVar,\n AST_TemplateSegment,\n AST_TemplateString,\n AST_This,\n AST_Throw,\n AST_Token,\n AST_Toplevel,\n AST_True,\n AST_Try,\n AST_Unary,\n AST_UnaryPostfix,\n AST_UnaryPrefix,\n AST_Var,\n AST_VarDef,\n AST_While,\n AST_With,\n AST_Yield,\n} from \"./ast.js\";\n\n(function() {\n\n var normalize_directives = function(body) {\n var in_directive = true;\n\n for (var i = 0; i < body.length; i++) {\n if (in_directive && body[i] instanceof AST_Statement && body[i].body instanceof AST_String) {\n body[i] = new AST_Directive({\n start: body[i].start,\n end: body[i].end,\n value: body[i].body.value\n });\n } else if (in_directive && !(body[i] instanceof AST_Statement && body[i].body instanceof AST_String)) {\n in_directive = false;\n }\n }\n\n return body;\n };\n\n var MOZ_TO_ME = {\n Program: function(M) {\n return new AST_Toplevel({\n start: my_start_token(M),\n end: my_end_token(M),\n body: normalize_directives(M.body.map(from_moz))\n });\n },\n ArrayPattern: function(M) {\n return new AST_Destructuring({\n start: my_start_token(M),\n end: my_end_token(M),\n names: M.elements.map(function(elm) {\n if (elm === null) {\n return new AST_Hole();\n }\n return from_moz(elm);\n }),\n is_array: true\n });\n },\n ObjectPattern: function(M) {\n return new AST_Destructuring({\n start: my_start_token(M),\n end: my_end_token(M),\n names: M.properties.map(from_moz),\n is_array: false\n });\n },\n AssignmentPattern: function(M) {\n var Type = AST_Binary;\n if(FROM_MOZ_STACK.length > 2) {\n var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2];\n if(p.type === \"FunctionDeclaration\"\n || p.type === \"FunctionExpression\"\n || p.type === \"ArrowFunctionExpression\") {\n Type = AST_DefaultAssign;\n }\n }\n return new Type({\n start: my_start_token(M),\n end: my_end_token(M),\n left: from_moz(M.left),\n operator: \"=\",\n right: from_moz(M.right)\n });\n },\n SpreadElement: function(M) {\n return new AST_Expansion({\n start: my_start_token(M),\n end: my_end_token(M),\n expression: from_moz(M.argument)\n });\n },\n RestElement: function(M) {\n return new AST_Expansion({\n start: my_start_token(M),\n end: my_end_token(M),\n expression: from_moz(M.argument)\n });\n },\n TemplateElement: function(M) {\n return new AST_TemplateSegment({\n start: my_start_token(M),\n end: my_end_token(M),\n value: M.value.cooked,\n raw: M.value.raw\n });\n },\n TemplateLiteral: function(M) {\n var segments = [];\n for (var i = 0; i < M.quasis.length; i++) {\n segments.push(from_moz(M.quasis[i]));\n if (M.expressions[i]) {\n segments.push(from_moz(M.expressions[i]));\n }\n }\n return new AST_TemplateString({\n start: my_start_token(M),\n end: my_end_token(M),\n segments: segments\n });\n },\n TaggedTemplateExpression: function(M) {\n return new AST_PrefixedTemplateString({\n start: my_start_token(M),\n end: my_end_token(M),\n template_string: from_moz(M.quasi),\n prefix: from_moz(M.tag)\n });\n },\n FunctionDeclaration: function(M) {\n return new AST_Defun({\n start: my_start_token(M),\n end: my_end_token(M),\n name: from_moz(M.id),\n argnames: M.params.map(from_moz),\n is_generator: M.generator,\n async: M.async,\n body: normalize_directives(from_moz(M.body).body)\n });\n },\n FunctionExpression: function(M) {\n return new AST_Function({\n start: my_start_token(M),\n end: my_end_token(M),\n name: from_moz(M.id),\n argnames: M.params.map(from_moz),\n is_generator: M.generator,\n async: M.async,\n body: normalize_directives(from_moz(M.body).body)\n });\n },\n ArrowFunctionExpression: function(M) {\n const body = M.body.type === \"BlockStatement\"\n ? from_moz(M.body).body\n : [make_node(AST_Return, {}, { value: from_moz(M.body) })];\n return new AST_Arrow({\n start: my_start_token(M),\n end: my_end_token(M),\n argnames: M.params.map(from_moz),\n body,\n async: M.async,\n });\n },\n ExpressionStatement: function(M) {\n return new AST_SimpleStatement({\n start: my_start_token(M),\n end: my_end_token(M),\n body: from_moz(M.expression)\n });\n },\n TryStatement: function(M) {\n var handlers = M.handlers || [M.handler];\n if (handlers.length > 1 || M.guardedHandlers && M.guardedHandlers.length) {\n throw new Error(\"Multiple catch clauses are not supported.\");\n }\n return new AST_Try({\n start : my_start_token(M),\n end : my_end_token(M),\n body : from_moz(M.block).body,\n bcatch : from_moz(handlers[0]),\n bfinally : M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null\n });\n },\n Property: function(M) {\n var key = M.key;\n var args = {\n start : my_start_token(key || M.value),\n end : my_end_token(M.value),\n key : key.type == \"Identifier\" ? key.name : key.value,\n value : from_moz(M.value)\n };\n if (M.computed) {\n args.key = from_moz(M.key);\n }\n if (M.method) {\n args.is_generator = M.value.generator;\n args.async = M.value.async;\n if (!M.computed) {\n args.key = new AST_SymbolMethod({ name: args.key });\n } else {\n args.key = from_moz(M.key);\n }\n return new AST_ConciseMethod(args);\n }\n if (M.kind == \"init\") {\n if (key.type != \"Identifier\" && key.type != \"Literal\") {\n args.key = from_moz(key);\n }\n return new AST_ObjectKeyVal(args);\n }\n if (typeof args.key === \"string\" || typeof args.key === \"number\") {\n args.key = new AST_SymbolMethod({\n name: args.key\n });\n }\n args.value = new AST_Accessor(args.value);\n if (M.kind == \"get\") return new AST_ObjectGetter(args);\n if (M.kind == \"set\") return new AST_ObjectSetter(args);\n if (M.kind == \"method\") {\n args.async = M.value.async;\n args.is_generator = M.value.generator;\n args.quote = M.computed ? \"\\\"\" : null;\n return new AST_ConciseMethod(args);\n }\n },\n MethodDefinition: function(M) {\n var args = {\n start : my_start_token(M),\n end : my_end_token(M),\n key : M.computed ? from_moz(M.key) : new AST_SymbolMethod({ name: M.key.name || M.key.value }),\n value : from_moz(M.value),\n static : M.static,\n };\n if (M.kind == \"get\") {\n return new AST_ObjectGetter(args);\n }\n if (M.kind == \"set\") {\n return new AST_ObjectSetter(args);\n }\n args.is_generator = M.value.generator;\n args.async = M.value.async;\n return new AST_ConciseMethod(args);\n },\n ArrayExpression: function(M) {\n return new AST_Array({\n start : my_start_token(M),\n end : my_end_token(M),\n elements : M.elements.map(function(elem) {\n return elem === null ? new AST_Hole() : from_moz(elem);\n })\n });\n },\n ObjectExpression: function(M) {\n return new AST_Object({\n start : my_start_token(M),\n end : my_end_token(M),\n properties : M.properties.map(function(prop) {\n if (prop.type === \"SpreadElement\") {\n return from_moz(prop);\n }\n prop.type = \"Property\";\n return from_moz(prop);\n })\n });\n },\n SequenceExpression: function(M) {\n return new AST_Sequence({\n start : my_start_token(M),\n end : my_end_token(M),\n expressions: M.expressions.map(from_moz)\n });\n },\n MemberExpression: function(M) {\n return new (M.computed ? AST_Sub : AST_Dot)({\n start : my_start_token(M),\n end : my_end_token(M),\n property : M.computed ? from_moz(M.property) : M.property.name,\n expression : from_moz(M.object)\n });\n },\n SwitchCase: function(M) {\n return new (M.test ? AST_Case : AST_Default)({\n start : my_start_token(M),\n end : my_end_token(M),\n expression : from_moz(M.test),\n body : M.consequent.map(from_moz)\n });\n },\n VariableDeclaration: function(M) {\n return new (M.kind === \"const\" ? AST_Const :\n M.kind === \"let\" ? AST_Let : AST_Var)({\n start : my_start_token(M),\n end : my_end_token(M),\n definitions : M.declarations.map(from_moz)\n });\n },\n\n ImportDeclaration: function(M) {\n var imported_name = null;\n var imported_names = null;\n M.specifiers.forEach(function (specifier) {\n if (specifier.type === \"ImportSpecifier\") {\n if (!imported_names) { imported_names = []; }\n imported_names.push(new AST_NameMapping({\n start: my_start_token(specifier),\n end: my_end_token(specifier),\n foreign_name: from_moz(specifier.imported),\n name: from_moz(specifier.local)\n }));\n } else if (specifier.type === \"ImportDefaultSpecifier\") {\n imported_name = from_moz(specifier.local);\n } else if (specifier.type === \"ImportNamespaceSpecifier\") {\n if (!imported_names) { imported_names = []; }\n imported_names.push(new AST_NameMapping({\n start: my_start_token(specifier),\n end: my_end_token(specifier),\n foreign_name: new AST_SymbolImportForeign({ name: \"*\" }),\n name: from_moz(specifier.local)\n }));\n }\n });\n return new AST_Import({\n start : my_start_token(M),\n end : my_end_token(M),\n imported_name: imported_name,\n imported_names : imported_names,\n module_name : from_moz(M.source)\n });\n },\n ExportAllDeclaration: function(M) {\n return new AST_Export({\n start: my_start_token(M),\n end: my_end_token(M),\n exported_names: [\n new AST_NameMapping({\n name: new AST_SymbolExportForeign({ name: \"*\" }),\n foreign_name: new AST_SymbolExportForeign({ name: \"*\" })\n })\n ],\n module_name: from_moz(M.source)\n });\n },\n ExportNamedDeclaration: function(M) {\n return new AST_Export({\n start: my_start_token(M),\n end: my_end_token(M),\n exported_definition: from_moz(M.declaration),\n exported_names: M.specifiers && M.specifiers.length ? M.specifiers.map(function (specifier) {\n return new AST_NameMapping({\n foreign_name: from_moz(specifier.exported),\n name: from_moz(specifier.local)\n });\n }) : null,\n module_name: from_moz(M.source)\n });\n },\n ExportDefaultDeclaration: function(M) {\n return new AST_Export({\n start: my_start_token(M),\n end: my_end_token(M),\n exported_value: from_moz(M.declaration),\n is_default: true\n });\n },\n Literal: function(M) {\n var val = M.value, args = {\n start : my_start_token(M),\n end : my_end_token(M)\n };\n var rx = M.regex;\n if (rx && rx.pattern) {\n // RegExpLiteral as per ESTree AST spec\n args.value = {\n source: rx.pattern,\n flags: rx.flags\n };\n return new AST_RegExp(args);\n } else if (rx) {\n // support legacy RegExp\n const rx_source = M.raw || val;\n const match = rx_source.match(/^\\/(.*)\\/(\\w*)$/);\n if (!match) throw new Error(\"Invalid regex source \" + rx_source);\n const [_, source, flags] = match;\n args.value = { source, flags };\n return new AST_RegExp(args);\n }\n if (val === null) return new AST_Null(args);\n switch (typeof val) {\n case \"string\":\n args.value = val;\n return new AST_String(args);\n case \"number\":\n args.value = val;\n return new AST_Number(args);\n case \"boolean\":\n return new (val ? AST_True : AST_False)(args);\n }\n },\n MetaProperty: function(M) {\n if (M.meta.name === \"new\" && M.property.name === \"target\") {\n return new AST_NewTarget({\n start: my_start_token(M),\n end: my_end_token(M)\n });\n }\n },\n Identifier: function(M) {\n var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2];\n return new ( p.type == \"LabeledStatement\" ? AST_Label\n : p.type == \"VariableDeclarator\" && p.id === M ? (p.kind == \"const\" ? AST_SymbolConst : p.kind == \"let\" ? AST_SymbolLet : AST_SymbolVar)\n : /Import.*Specifier/.test(p.type) ? (p.local === M ? AST_SymbolImport : AST_SymbolImportForeign)\n : p.type == \"ExportSpecifier\" ? (p.local === M ? AST_SymbolExport : AST_SymbolExportForeign)\n : p.type == \"FunctionExpression\" ? (p.id === M ? AST_SymbolLambda : AST_SymbolFunarg)\n : p.type == \"FunctionDeclaration\" ? (p.id === M ? AST_SymbolDefun : AST_SymbolFunarg)\n : p.type == \"ArrowFunctionExpression\" ? (p.params.includes(M)) ? AST_SymbolFunarg : AST_SymbolRef\n : p.type == \"ClassExpression\" ? (p.id === M ? AST_SymbolClass : AST_SymbolRef)\n : p.type == \"Property\" ? (p.key === M && p.computed || p.value === M ? AST_SymbolRef : AST_SymbolMethod)\n : p.type == \"ClassDeclaration\" ? (p.id === M ? AST_SymbolDefClass : AST_SymbolRef)\n : p.type == \"MethodDefinition\" ? (p.computed ? AST_SymbolRef : AST_SymbolMethod)\n : p.type == \"CatchClause\" ? AST_SymbolCatch\n : p.type == \"BreakStatement\" || p.type == \"ContinueStatement\" ? AST_LabelRef\n : AST_SymbolRef)({\n start : my_start_token(M),\n end : my_end_token(M),\n name : M.name\n });\n },\n BigIntLiteral(M) {\n return new AST_BigInt({\n start : my_start_token(M),\n end : my_end_token(M),\n value : M.value\n });\n }\n };\n\n MOZ_TO_ME.UpdateExpression =\n MOZ_TO_ME.UnaryExpression = function To_Moz_Unary(M) {\n var prefix = \"prefix\" in M ? M.prefix\n : M.type == \"UnaryExpression\" ? true : false;\n return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({\n start : my_start_token(M),\n end : my_end_token(M),\n operator : M.operator,\n expression : from_moz(M.argument)\n });\n };\n\n MOZ_TO_ME.ClassDeclaration =\n MOZ_TO_ME.ClassExpression = function From_Moz_Class(M) {\n return new (M.type === \"ClassDeclaration\" ? AST_DefClass : AST_ClassExpression)({\n start : my_start_token(M),\n end : my_end_token(M),\n name : from_moz(M.id),\n extends : from_moz(M.superClass),\n properties: M.body.body.map(from_moz)\n });\n };\n\n map(\"EmptyStatement\", AST_EmptyStatement);\n map(\"BlockStatement\", AST_BlockStatement, \"body@body\");\n map(\"IfStatement\", AST_If, \"test>condition, consequent>body, alternate>alternative\");\n map(\"LabeledStatement\", AST_LabeledStatement, \"label>label, body>body\");\n map(\"BreakStatement\", AST_Break, \"label>label\");\n map(\"ContinueStatement\", AST_Continue, \"label>label\");\n map(\"WithStatement\", AST_With, \"object>expression, body>body\");\n map(\"SwitchStatement\", AST_Switch, \"discriminant>expression, cases@body\");\n map(\"ReturnStatement\", AST_Return, \"argument>value\");\n map(\"ThrowStatement\", AST_Throw, \"argument>value\");\n map(\"WhileStatement\", AST_While, \"test>condition, body>body\");\n map(\"DoWhileStatement\", AST_Do, \"test>condition, body>body\");\n map(\"ForStatement\", AST_For, \"init>init, test>condition, update>step, body>body\");\n map(\"ForInStatement\", AST_ForIn, \"left>init, right>object, body>body\");\n map(\"ForOfStatement\", AST_ForOf, \"left>init, right>object, body>body, await=await\");\n map(\"AwaitExpression\", AST_Await, \"argument>expression\");\n map(\"YieldExpression\", AST_Yield, \"argument>expression, delegate=is_star\");\n map(\"DebuggerStatement\", AST_Debugger);\n map(\"VariableDeclarator\", AST_VarDef, \"id>name, init>value\");\n map(\"CatchClause\", AST_Catch, \"param>argname, body%body\");\n\n map(\"ThisExpression\", AST_This);\n map(\"Super\", AST_Super);\n map(\"BinaryExpression\", AST_Binary, \"operator=operator, left>left, right>right\");\n map(\"LogicalExpression\", AST_Binary, \"operator=operator, left>left, right>right\");\n map(\"AssignmentExpression\", AST_Assign, \"operator=operator, left>left, right>right\");\n map(\"ConditionalExpression\", AST_Conditional, \"test>condition, consequent>consequent, alternate>alternative\");\n map(\"NewExpression\", AST_New, \"callee>expression, arguments@args\");\n map(\"CallExpression\", AST_Call, \"callee>expression, arguments@args\");\n\n def_to_moz(AST_Toplevel, function To_Moz_Program(M) {\n return to_moz_scope(\"Program\", M);\n });\n\n def_to_moz(AST_Expansion, function To_Moz_Spread(M, parent) {\n return {\n type: to_moz_in_destructuring() ? \"RestElement\" : \"SpreadElement\",\n argument: to_moz(M.expression)\n };\n });\n\n def_to_moz(AST_PrefixedTemplateString, function To_Moz_TaggedTemplateExpression(M) {\n return {\n type: \"TaggedTemplateExpression\",\n tag: to_moz(M.prefix),\n quasi: to_moz(M.template_string)\n };\n });\n\n def_to_moz(AST_TemplateString, function To_Moz_TemplateLiteral(M) {\n var quasis = [];\n var expressions = [];\n for (var i = 0; i < M.segments.length; i++) {\n if (i % 2 !== 0) {\n expressions.push(to_moz(M.segments[i]));\n } else {\n quasis.push({\n type: \"TemplateElement\",\n value: {\n raw: M.segments[i].raw,\n cooked: M.segments[i].value\n },\n tail: i === M.segments.length - 1\n });\n }\n }\n return {\n type: \"TemplateLiteral\",\n quasis: quasis,\n expressions: expressions\n };\n });\n\n def_to_moz(AST_Defun, function To_Moz_FunctionDeclaration(M) {\n return {\n type: \"FunctionDeclaration\",\n id: to_moz(M.name),\n params: M.argnames.map(to_moz),\n generator: M.is_generator,\n async: M.async,\n body: to_moz_scope(\"BlockStatement\", M)\n };\n });\n\n def_to_moz(AST_Function, function To_Moz_FunctionExpression(M, parent) {\n var is_generator = parent.is_generator !== undefined ?\n parent.is_generator : M.is_generator;\n return {\n type: \"FunctionExpression\",\n id: to_moz(M.name),\n params: M.argnames.map(to_moz),\n generator: is_generator,\n async: M.async,\n body: to_moz_scope(\"BlockStatement\", M)\n };\n });\n\n def_to_moz(AST_Arrow, function To_Moz_ArrowFunctionExpression(M) {\n var body = {\n type: \"BlockStatement\",\n body: M.body.map(to_moz)\n };\n return {\n type: \"ArrowFunctionExpression\",\n params: M.argnames.map(to_moz),\n async: M.async,\n body: body\n };\n });\n\n def_to_moz(AST_Destructuring, function To_Moz_ObjectPattern(M) {\n if (M.is_array) {\n return {\n type: \"ArrayPattern\",\n elements: M.names.map(to_moz)\n };\n }\n return {\n type: \"ObjectPattern\",\n properties: M.names.map(to_moz)\n };\n });\n\n def_to_moz(AST_Directive, function To_Moz_Directive(M) {\n return {\n type: \"ExpressionStatement\",\n expression: {\n type: \"Literal\",\n value: M.value\n }\n };\n });\n\n def_to_moz(AST_SimpleStatement, function To_Moz_ExpressionStatement(M) {\n return {\n type: \"ExpressionStatement\",\n expression: to_moz(M.body)\n };\n });\n\n def_to_moz(AST_SwitchBranch, function To_Moz_SwitchCase(M) {\n return {\n type: \"SwitchCase\",\n test: to_moz(M.expression),\n consequent: M.body.map(to_moz)\n };\n });\n\n def_to_moz(AST_Try, function To_Moz_TryStatement(M) {\n return {\n type: \"TryStatement\",\n block: to_moz_block(M),\n handler: to_moz(M.bcatch),\n guardedHandlers: [],\n finalizer: to_moz(M.bfinally)\n };\n });\n\n def_to_moz(AST_Catch, function To_Moz_CatchClause(M) {\n return {\n type: \"CatchClause\",\n param: to_moz(M.argname),\n guard: null,\n body: to_moz_block(M)\n };\n });\n\n def_to_moz(AST_Definitions, function To_Moz_VariableDeclaration(M) {\n return {\n type: \"VariableDeclaration\",\n kind:\n M instanceof AST_Const ? \"const\" :\n M instanceof AST_Let ? \"let\" : \"var\",\n declarations: M.definitions.map(to_moz)\n };\n });\n\n def_to_moz(AST_Export, function To_Moz_ExportDeclaration(M) {\n if (M.exported_names) {\n if (M.exported_names[0].name.name === \"*\") {\n return {\n type: \"ExportAllDeclaration\",\n source: to_moz(M.module_name)\n };\n }\n return {\n type: \"ExportNamedDeclaration\",\n specifiers: M.exported_names.map(function (name_mapping) {\n return {\n type: \"ExportSpecifier\",\n exported: to_moz(name_mapping.foreign_name),\n local: to_moz(name_mapping.name)\n };\n }),\n declaration: to_moz(M.exported_definition),\n source: to_moz(M.module_name)\n };\n }\n return {\n type: M.is_default ? \"ExportDefaultDeclaration\" : \"ExportNamedDeclaration\",\n declaration: to_moz(M.exported_value || M.exported_definition)\n };\n });\n\n def_to_moz(AST_Import, function To_Moz_ImportDeclaration(M) {\n var specifiers = [];\n if (M.imported_name) {\n specifiers.push({\n type: \"ImportDefaultSpecifier\",\n local: to_moz(M.imported_name)\n });\n }\n if (M.imported_names && M.imported_names[0].foreign_name.name === \"*\") {\n specifiers.push({\n type: \"ImportNamespaceSpecifier\",\n local: to_moz(M.imported_names[0].name)\n });\n } else if (M.imported_names) {\n M.imported_names.forEach(function(name_mapping) {\n specifiers.push({\n type: \"ImportSpecifier\",\n local: to_moz(name_mapping.name),\n imported: to_moz(name_mapping.foreign_name)\n });\n });\n }\n return {\n type: \"ImportDeclaration\",\n specifiers: specifiers,\n source: to_moz(M.module_name)\n };\n });\n\n def_to_moz(AST_Sequence, function To_Moz_SequenceExpression(M) {\n return {\n type: \"SequenceExpression\",\n expressions: M.expressions.map(to_moz)\n };\n });\n\n def_to_moz(AST_PropAccess, function To_Moz_MemberExpression(M) {\n var isComputed = M instanceof AST_Sub;\n return {\n type: \"MemberExpression\",\n object: to_moz(M.expression),\n computed: isComputed,\n property: isComputed ? to_moz(M.property) : {type: \"Identifier\", name: M.property}\n };\n });\n\n def_to_moz(AST_Unary, function To_Moz_Unary(M) {\n return {\n type: M.operator == \"++\" || M.operator == \"--\" ? \"UpdateExpression\" : \"UnaryExpression\",\n operator: M.operator,\n prefix: M instanceof AST_UnaryPrefix,\n argument: to_moz(M.expression)\n };\n });\n\n def_to_moz(AST_Binary, function To_Moz_BinaryExpression(M) {\n if (M.operator == \"=\" && to_moz_in_destructuring()) {\n return {\n type: \"AssignmentPattern\",\n left: to_moz(M.left),\n right: to_moz(M.right)\n };\n }\n return {\n type: M.operator == \"&&\" || M.operator == \"||\" ? \"LogicalExpression\" : \"BinaryExpression\",\n left: to_moz(M.left),\n operator: M.operator,\n right: to_moz(M.right)\n };\n });\n\n def_to_moz(AST_Array, function To_Moz_ArrayExpression(M) {\n return {\n type: \"ArrayExpression\",\n elements: M.elements.map(to_moz)\n };\n });\n\n def_to_moz(AST_Object, function To_Moz_ObjectExpression(M) {\n return {\n type: \"ObjectExpression\",\n properties: M.properties.map(to_moz)\n };\n });\n\n def_to_moz(AST_ObjectProperty, function To_Moz_Property(M, parent) {\n var key = M.key instanceof AST_Node ? to_moz(M.key) : {\n type: \"Identifier\",\n value: M.key\n };\n if (typeof M.key === \"number\") {\n key = {\n type: \"Literal\",\n value: Number(M.key)\n };\n }\n if (typeof M.key === \"string\") {\n key = {\n type: \"Identifier\",\n name: M.key\n };\n }\n var kind;\n var string_or_num = typeof M.key === \"string\" || typeof M.key === \"number\";\n var computed = string_or_num ? false : !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef;\n if (M instanceof AST_ObjectKeyVal) {\n kind = \"init\";\n computed = !string_or_num;\n } else\n if (M instanceof AST_ObjectGetter) {\n kind = \"get\";\n } else\n if (M instanceof AST_ObjectSetter) {\n kind = \"set\";\n }\n if (parent instanceof AST_Class) {\n return {\n type: \"MethodDefinition\",\n computed: computed,\n kind: kind,\n static: M.static,\n key: to_moz(M.key),\n value: to_moz(M.value)\n };\n }\n return {\n type: \"Property\",\n computed: computed,\n kind: kind,\n key: key,\n value: to_moz(M.value)\n };\n });\n\n def_to_moz(AST_ConciseMethod, function To_Moz_MethodDefinition(M, parent) {\n if (parent instanceof AST_Object) {\n return {\n type: \"Property\",\n computed: !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef,\n kind: \"init\",\n method: true,\n shorthand: false,\n key: to_moz(M.key),\n value: to_moz(M.value)\n };\n }\n return {\n type: \"MethodDefinition\",\n computed: !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef,\n kind: M.key === \"constructor\" ? \"constructor\" : \"method\",\n static: M.static,\n key: to_moz(M.key),\n value: to_moz(M.value)\n };\n });\n\n def_to_moz(AST_Class, function To_Moz_Class(M) {\n var type = M instanceof AST_ClassExpression ? \"ClassExpression\" : \"ClassDeclaration\";\n return {\n type: type,\n superClass: to_moz(M.extends),\n id: M.name ? to_moz(M.name) : null,\n body: {\n type: \"ClassBody\",\n body: M.properties.map(to_moz)\n }\n };\n });\n\n def_to_moz(AST_NewTarget, function To_Moz_MetaProperty(M) {\n return {\n type: \"MetaProperty\",\n meta: {\n type: \"Identifier\",\n name: \"new\"\n },\n property: {\n type: \"Identifier\",\n name: \"target\"\n }\n };\n });\n\n def_to_moz(AST_Symbol, function To_Moz_Identifier(M, parent) {\n if (M instanceof AST_SymbolMethod && parent.quote) {\n return {\n type: \"Literal\",\n value: M.name\n };\n }\n var def = M.definition();\n return {\n type: \"Identifier\",\n name: def ? def.mangled_name || def.name : M.name\n };\n });\n\n def_to_moz(AST_RegExp, function To_Moz_RegExpLiteral(M) {\n const pattern = M.value.source;\n const flags = M.value.flags;\n return {\n type: \"Literal\",\n value: null,\n raw: M.print_to_string(),\n regex: { pattern, flags }\n };\n });\n\n def_to_moz(AST_Constant, function To_Moz_Literal(M) {\n var value = M.value;\n if (typeof value === \"number\" && (value < 0 || (value === 0 && 1 / value < 0))) {\n return {\n type: \"UnaryExpression\",\n operator: \"-\",\n prefix: true,\n argument: {\n type: \"Literal\",\n value: -value,\n raw: M.start.raw\n }\n };\n }\n return {\n type: \"Literal\",\n value: value,\n raw: M.start.raw\n };\n });\n\n def_to_moz(AST_Atom, function To_Moz_Atom(M) {\n return {\n type: \"Identifier\",\n name: String(M.value)\n };\n });\n\n def_to_moz(AST_BigInt, M => ({\n type: \"BigIntLiteral\",\n value: M.value\n }));\n\n AST_Boolean.DEFMETHOD(\"to_mozilla_ast\", AST_Constant.prototype.to_mozilla_ast);\n AST_Null.DEFMETHOD(\"to_mozilla_ast\", AST_Constant.prototype.to_mozilla_ast);\n AST_Hole.DEFMETHOD(\"to_mozilla_ast\", function To_Moz_ArrayHole() { return null; });\n\n AST_Block.DEFMETHOD(\"to_mozilla_ast\", AST_BlockStatement.prototype.to_mozilla_ast);\n AST_Lambda.DEFMETHOD(\"to_mozilla_ast\", AST_Function.prototype.to_mozilla_ast);\n\n /* -----[ tools ]----- */\n\n function raw_token(moznode) {\n if (moznode.type == \"Literal\") {\n return moznode.raw != null ? moznode.raw : moznode.value + \"\";\n }\n }\n\n function my_start_token(moznode) {\n var loc = moznode.loc, start = loc && loc.start;\n var range = moznode.range;\n return new AST_Token({\n file : loc && loc.source,\n line : start && start.line,\n col : start && start.column,\n pos : range ? range[0] : moznode.start,\n endline : start && start.line,\n endcol : start && start.column,\n endpos : range ? range[0] : moznode.start,\n raw : raw_token(moznode),\n });\n }\n\n function my_end_token(moznode) {\n var loc = moznode.loc, end = loc && loc.end;\n var range = moznode.range;\n return new AST_Token({\n file : loc && loc.source,\n line : end && end.line,\n col : end && end.column,\n pos : range ? range[1] : moznode.end,\n endline : end && end.line,\n endcol : end && end.column,\n endpos : range ? range[1] : moznode.end,\n raw : raw_token(moznode),\n });\n }\n\n function map(moztype, mytype, propmap) {\n var moz_to_me = \"function From_Moz_\" + moztype + \"(M){\\n\";\n moz_to_me += \"return new U2.\" + mytype.name + \"({\\n\" +\n \"start: my_start_token(M),\\n\" +\n \"end: my_end_token(M)\";\n\n var me_to_moz = \"function To_Moz_\" + moztype + \"(M){\\n\";\n me_to_moz += \"return {\\n\" +\n \"type: \" + JSON.stringify(moztype);\n\n if (propmap) propmap.split(/\\s*,\\s*/).forEach(function(prop) {\n var m = /([a-z0-9$_]+)([=@>%])([a-z0-9$_]+)/i.exec(prop);\n if (!m) throw new Error(\"Can't understand property map: \" + prop);\n var moz = m[1], how = m[2], my = m[3];\n moz_to_me += \",\\n\" + my + \": \";\n me_to_moz += \",\\n\" + moz + \": \";\n switch (how) {\n case \"@\":\n moz_to_me += \"M.\" + moz + \".map(from_moz)\";\n me_to_moz += \"M.\" + my + \".map(to_moz)\";\n break;\n case \">\":\n moz_to_me += \"from_moz(M.\" + moz + \")\";\n me_to_moz += \"to_moz(M.\" + my + \")\";\n break;\n case \"=\":\n moz_to_me += \"M.\" + moz;\n me_to_moz += \"M.\" + my;\n break;\n case \"%\":\n moz_to_me += \"from_moz(M.\" + moz + \").body\";\n me_to_moz += \"to_moz_block(M)\";\n break;\n default:\n throw new Error(\"Can't understand operator in propmap: \" + prop);\n }\n });\n\n moz_to_me += \"\\n})\\n}\";\n me_to_moz += \"\\n}\\n}\";\n\n moz_to_me = new Function(\"U2\", \"my_start_token\", \"my_end_token\", \"from_moz\", \"return(\" + moz_to_me + \")\")(\n ast, my_start_token, my_end_token, from_moz\n );\n me_to_moz = new Function(\"to_moz\", \"to_moz_block\", \"to_moz_scope\", \"return(\" + me_to_moz + \")\")(\n to_moz, to_moz_block, to_moz_scope\n );\n MOZ_TO_ME[moztype] = moz_to_me;\n def_to_moz(mytype, me_to_moz);\n }\n\n var FROM_MOZ_STACK = null;\n\n function from_moz(node) {\n FROM_MOZ_STACK.push(node);\n var ret = node != null ? MOZ_TO_ME[node.type](node) : null;\n FROM_MOZ_STACK.pop();\n return ret;\n }\n\n AST_Node.from_mozilla_ast = function(node) {\n var save_stack = FROM_MOZ_STACK;\n FROM_MOZ_STACK = [];\n var ast = from_moz(node);\n FROM_MOZ_STACK = save_stack;\n return ast;\n };\n\n function set_moz_loc(mynode, moznode, myparent) {\n var start = mynode.start;\n var end = mynode.end;\n if (!(start && end)) {\n return moznode;\n }\n if (start.pos != null && end.endpos != null) {\n moznode.range = [start.pos, end.endpos];\n }\n if (start.line) {\n moznode.loc = {\n start: {line: start.line, column: start.col},\n end: end.endline ? {line: end.endline, column: end.endcol} : null\n };\n if (start.file) {\n moznode.loc.source = start.file;\n }\n }\n return moznode;\n }\n\n function def_to_moz(mytype, handler) {\n mytype.DEFMETHOD(\"to_mozilla_ast\", function(parent) {\n return set_moz_loc(this, handler(this, parent));\n });\n }\n\n var TO_MOZ_STACK = null;\n\n function to_moz(node) {\n if (TO_MOZ_STACK === null) { TO_MOZ_STACK = []; }\n TO_MOZ_STACK.push(node);\n var ast = node != null ? node.to_mozilla_ast(TO_MOZ_STACK[TO_MOZ_STACK.length - 2]) : null;\n TO_MOZ_STACK.pop();\n if (TO_MOZ_STACK.length === 0) { TO_MOZ_STACK = null; }\n return ast;\n }\n\n function to_moz_in_destructuring() {\n var i = TO_MOZ_STACK.length;\n while (i--) {\n if (TO_MOZ_STACK[i] instanceof AST_Destructuring) {\n return true;\n }\n }\n return false;\n }\n\n function to_moz_block(node) {\n return {\n type: \"BlockStatement\",\n body: node.body.map(to_moz)\n };\n }\n\n function to_moz_scope(type, node) {\n var body = node.body.map(to_moz);\n if (node.body[0] instanceof AST_SimpleStatement && node.body[0].body instanceof AST_String) {\n body.unshift(to_moz(new AST_EmptyStatement(node.body[0])));\n }\n return {\n type: type,\n body: body\n };\n }\n})();\n"],"names":["characters","str","split","member","name","array","includes","DefaultsError","Error","[object Object]","msg","defs","super","this","message","defaults","args","croak","ret","i","HOP","ecma","noop","return_false","return_true","return_this","return_null","MAP","a","f","backwards","top","doit","val","is_last","Last","v","AtTop","Splice","push","apply","slice","reverse","skip","Array","isArray","length","concat","at_top","splice","last","make_node","ctor","orig","props","start","end","push_uniq","el","string_template","text","replace","p","remove","mergeSort","cmp","_ms","m","Math","floor","left","right","b","r","ai","bi","merge","makePredicate","words","Set","map_add","map","key","value","has","get","set","obj","prop","Object","prototype","hasOwnProperty","call","keep_name","keep_setting","RegExp","test","lineTerminatorEscape","\n","\r","
","
","regexp_source_fix","source","match","offset","all_flags","has_annotation","node","annotation","_annotations","set_annotation","KEYWORDS","KEYWORDS_ATOM","RESERVED_WORDS","KEYWORDS_BEFORE_EXPRESSION","OPERATOR_CHARS","RE_NUM_LITERAL","RE_HEX_NUMBER","RE_OCT_NUMBER","RE_ES6_OCT_NUMBER","RE_BIN_NUMBER","RE_DEC_NUMBER","RE_BIG_INT","OPERATORS","WHITESPACE_CHARS","NEWLINE_CHARS","PUNC_AFTER_EXPRESSION","PUNC_BEFORE_EXPRESSION","PUNC_CHARS","UNICODE","ID_Start","ID_Continue","get_full_char","pos","char","charAt","is_surrogate_pair_head","next","is_surrogate_pair_tail","prev","code","charCodeAt","is_digit","is_identifier_start","ch","is_identifier_char","is_identifier_string","parse_js_number","num","allow_e","NaN","parseInt","substr","parseFloat","JS_Parse_Error","filename","line","col","js_error","is_token","token","type","EX_EOF","tokenizer","$TEXT","html5_comments","shebang","S","tokpos","tokline","tokcol","newline_before","regex_allowed","brace_counter","template_braces","comments_before","directives","directive_stack","peek","signal_eof","in_string","forward","looking_at","find","what","indexOf","start_token","prev_was_dot","previous_token","is_comment","UNARY_POSTFIX","endline","endcol","endpos","nlb","file","raw","substring","comments_after","AST_Token","skip_whitespace","parse_error","err","read_num","prefix","has_e","after_e","has_x","has_dot","is_big_int","pred","read_while","next_token","has_directive","endsWith","without_n","valid","isNaN","is_octal","read_escaped_char","strict_hex","template_string","String","fromCharCode","hex_bytes","result","strict_octal","read_octal_escape_sequence","n","digit","read_string","with_eof_error","quote","tok","read_template_characters","begin","content","tmp","pop","skip_line_comment","find_eol","skip_multiline_comment","surrogates","get_full_char_length","read_name","escaped","read_escaped_identifier_char","read_regexp","prev_backslash","in_class","flags","read_operator","grow","op","bigger","handle_slash","eof_error","cont","x","ex","force_regexp","word","context","nc","add_directive","directive","undefined","push_directives_stack","pop_directives_stack","UNARY_PREFIX","ASSIGNMENT","PRECEDENCE","j","ATOMIC_START_TOKEN","parse","options","outer_comments_before_counts","Map","bare_returns","expression","module","strict","toplevel","input","peeked","in_function","in_async","in_generator","in_directives","in_loop","labels","is","ctx","token_error","unexpected","expect_token","expect","punc","has_newline_before","every","comment","can_insert_semicolon","is_in_generator","is_in_async","semicolon","optional","parenthesised","exp","embed_tokens","parser","expr","handle_regexp","statement","is_export_default","is_for_body","is_if_body","dir","stat","simple_statement","body","AST_String","AST_Directive","function_","AST_Defun","imported_name","imported_names","as_symbol","AST_SymbolImport","map_names","mod_str","AST_Import","module_name","import_","label","AST_Label","some","l","AST_IterationStatement","references","forEach","ref","AST_Continue","AST_LabeledStatement","labeled_statement","AST_BlockStatement","block_","AST_EmptyStatement","break_cont","AST_Break","AST_Debugger","condition","AST_Do","AST_While","for_await_error","await_tok","init","var_","let_","const_","is_in","is_of","AST_Definitions","definitions","is_assignable","to_destructuring","AST_Destructuring","AST_ForIn","object","for_in","is_await","lhs","AST_ForOf","await","for_of","step","AST_For","regular_for","for_","class_","AST_DefClass","cond","belse","AST_If","alternative","if_","AST_Return","AST_Switch","switch_body_","AST_Throw","bcatch","bfinally","parameter","AST_SymbolCatch","AST_Catch","argname","AST_Finally","AST_Try","try_","AST_With","is_default","exported_names","exported_value","exported_definition","AST_Export","AST_Lambda","AST_SimpleStatement","export_","ldef","AST_LabelRef","thedef","TYPE","arrow_function","argnames","is_async","_function_body","AST_Arrow","async","is_generator_property","in_statement","is_generator","AST_SymbolDefun","AST_SymbolLambda","AST_Function","AST_Accessor","AST_SymbolDeclaration","track_used_binding_identifiers","is_parameter","parameters","duplicate","default_assignment","spread","strict_mode","tracker","add_parameter","check_strict","add","mark_default_assignment","mark_spread","mark_strict_mode","is_strict","used_parameters","symbol_type","param","expand","binding_element","AST_DefaultAssign","operator","AST_Expansion","expand_token","elements","first","is_expand","first_token","AST_SymbolFunarg","AST_Hole","names","is_array","AST_ObjectKeyVal","property_token","property","as_property_name","block","generator","loop","current_generator","current_async","params","_verify_symbol","cur","branch","AST_Case","AST_Default","vardefs","no_in","kind","def","sym_type","AST_SymbolVar","AST_SymbolConst","AST_SymbolLet","AST_VarDef","AST_Var","AST_Let","AST_Const","as_atom_node","_make_symbol","AST_SymbolRef","AST_Number","AST_BigInt","AST_RegExp","AST_False","AST_True","AST_Null","to_fun_args","_","__","default_seen_above","insert_default","default_value","AST_Object","properties","AST_Array","AST_Assign","expr_atom","allow_calls","allow_arrows","subscripts","AST_NewTarget","newexp","expr_list","AST_New","annotate","new_","exprs","maybe_sequence","spread_token","invalid_sequence","trailing_comma","params_or_seq_","AST_Call","AST_Sequence","expressions","outer_comments_before","unshift","array_","object_or_destructuring_","func","cls","AST_ClassExpression","tagged","segments","AST_TemplateSegment","AST_TemplateString","closing","allow_trailing_comma","allow_empty","create_accessor","concise","concise_method_or_getset","AST_Node","KindOfClass","method","class_name","extends_","AST_SymbolDefClass","AST_SymbolClass","extends","is_class","get_ast","AST_SymbolMethod","is_static","AST_ConciseMethod","static","AST_ObjectGetter","AST_ObjectSetter","map_name","is_import","make_symbol","foreign_name","foreign_type","AST_SymbolImportForeign","AST_SymbolExportForeign","AST_SymbolExport","AST_NameMapping","map_nameAsterisk","AST_This","AST_Super","sym","noerror","comments","comments_outside_parens","_PURE","_INLINE","_NOINLINE","AST_Dot","AST_Sub","call_args","AST_PrefixedTemplateString","maybe_unary","AST_Await","make_unary","AST_UnaryPrefix","AST_UnaryPostfix","expr_op","min_prec","prec","AST_Binary","maybe_conditional","expr_ops","yes","AST_Conditional","consequent","AST_PropAccess","AST_ObjectProperty","maybe_assign","star","has_expression","AST_Yield","is_star","_yield_expression","commas","AST_Toplevel","DEFNODE","methods","base","self_props","PROPS","proto","create","initialize","Function","BASE","SUBCLASSES","CTOR","SELF_PROPS","DEFMETHOD","_clone","deep","self","clone","transform","TreeTransformer","$documentation","$propdoc","_walk","visitor","_visit","walk","warn_function","warn","txt","AST_Statement","walk_body","len","clone_block_scope","block_scope","AST_Block","AST_StatementWithBody","TreeWalker","AST_LoopControl","AST_DWLoop","AST_Scope","variables","functions","uses_with","uses_eval","parent_scope","enclosed","cname","get_defun_scope","is_block_scope","pinned","globals","wrap_commonjs","wrapped_tl","wrap_enclose","args_values","index","join","uses_arguments","args_as_names","out","all_symbols","AST_Symbol","seg","AST_Jump","AST_Exit","AST_SwitchBranch","name_import","name_export","AST_Unary","AST_Class","scope","AST_SymbolBlockDeclaration","AST_Constant","getValue","literal","AST_Atom","AST_NaN","AST_Undefined","AST_Infinity","AST_Boolean","callback","visit","stack","descend","getPrototypeOf","st","before","after","def_transform","tw","in_list","transformed","after_ret","do_list","list","first_in_statement","parent","EXPECT_DIRECTIVE","CODE_LINE_BREAK","CODE_SPACE","r_annotation","is_some_comments","OutputStream","readonly","ascii_only","beautify","braces","ie8","indent_level","indent_start","inline_script","keep_numbers","keep_quoted_props","max_line_len","preamble","quote_keys","quote_style","safari10","semicolons","shorthand","source_map","webkit","width","wrap_iife","wrap_func_args","comment_filter","regex_pos","lastIndexOf","indentation","current_col","current_line","current_pos","OUTPUT","printed_comments","to_utf8","identifier","get_full_char_code","toString","s","encode_string","dq","sq","quote_single","quote_double","make_string","mapping_token","mapping_name","has_parens","might_need_space","might_need_semicolon","might_add_newline","need_newline_indented","need_space","newline_insert","mappings","do_add_mapping","mapping","cline","ccol","ensure_line_len","delta","requireSemicolonChars","print","indent","space","half","back","repeat","with_indent","next_indent","save_indentation","newline","force_semicolon","has_nlb","in_directive","use_asm","active_scope","current_width","should_break","comma","colon","print_name","make_name","print_string","escape_directive","encoded","print_template_string_chars","with_block","with_parens","with_square","add_mapping","option","opt","prepend_comments","shift","filter","c","last_nlb","append_comments","tail","insert","push_node","pop_node","DEFPRINT","nodetype","PARENS","display_body","is_toplevel","output","allow_directives","stmt","print_braced_empty","print_braced","parenthesize_for_noin","noin","parens","print_property_name","make_num","force_statement","make_block","digits","candidates","toLowerCase","exec","best","best_of","DEFMAP","force_parens","_codegen","add_source_map","needs_parens","po","pp","so","sp","p1","startsWith","_do_print_body","nokeyword","arg","_do_print","tag","parenthesize_tag","is_tagged","first_statement","returned","left_is_object","e","make_then","definition","mangled_name","get_name","allowShortHand","_print_getter_setter","existing_flags","flag","delete","size","sort_regexp_flags","MASK_EXPORT_DONT_MANGLE","MASK_EXPORT_WANT_MANGLE","function_defs","unmangleable_names","SymbolDef","eliminated","assignments","replaced","global","export","undeclared","id","next_id","chained","direct_access","recursive_refs","should_replace","single_use","fixed","seal","keep_fnames","eval","keep_classnames","cache","unmangleable","redefinition","redefined_catch_def","next_mangled","ext","base54","reserved","defun","in_destructuring","for_scopes","save_scope","init_scope_vars","the_block_scope","save_destructuring","save_defun","save_labels","def_function","mark_export","def_variable","mark_enclosed","find_variable","reference","level","exported","def_global","refs","g","_var_name_cache","varNames","var_names","_added_var_names","add_var_name","new_scope_enclosed_set","scope_ancestry","ancestry","to_enclose","scope_topdown","values","arguments","symbol","mangled_names","tricky_def","tricky_name","_default_mangler_options","lname","to_mangle","collect","save_nesting","mangle","avoid","to_avoid","add_def","reset","sort","find_colliding_names","rename","next_name","stream","_print","consider","skip_string","tail_node","print_to_string","leading","chars","frequency","compare","UNUSED","UNDEFINED","INLINED","WRITE_ONLY","SQUEEZED","OPTIMIZED","TOP","CLEAR_BETWEEN_PASSES","has_flag","set_flag","clear_flag","Compressor","false_by_default","arrows","booleans","booleans_as_integers","collapse_vars","comparisons","computed_props","conditionals","dead_code","drop_console","drop_debugger","evaluate","global_defs","hoist_funs","hoist_props","hoist_vars","if_return","inline","join_vars","keep_fargs","keep_infinity","loops","negate_iife","passes","pure_getters","pure_funcs","reduce_funcs","reduce_vars","sequences","side_effects","switches","top_retain","typeofs","unsafe","unsafe_arrows","unsafe_comps","unsafe_Function","unsafe_math","unsafe_methods","unsafe_proto","unsafe_regexp","unsafe_undefined","unused","warnings","funcs","vars","sequences_limit","warnings_produced","evaluated_regexps","resolve_defines","process_expression","min_count","stopping","pass","figure_out_scope","reset_opt_flags","count","info","was_scope","hoist_properties","hoist_declarations","optimize","drop_unused","def_optimize","optimizer","compressor","read_property","get_value","make_node_from_constant","fixed_value","is_modified","immutable","is_lhs","is_expr_pure","contains_this","is_func_expr","is_lhs_read_only","is_immutable","is_ref_of","find_scope","toplevel_ok","make_sequence","reduce","merge_sequence","isFinite","maintain_this_binding","as_statement_array","thing","is_empty","can_be_evicted_from_block","loop_body","is_iife_call","is_undeclared_ref","tt","drop_side_effect_free","def_reduce_vars","reset_def","exposed","reset_variables","defs_to_safe_ids","safe_ids","mark","loop_ids","reset_block_variables","safe","safe_to_read","safe_to_assign","def_safe_ids","mark_escaped","d","depth","is_constant","is_constant_expression","lazy_op","suppressor","eq","iife","arg_name","saved_loop","has_break_or_continue","recursive_ref","ref_once","pulled_scope","limit_scope","child_names","scope_encloses_variables_in_this_scope","preparation","global_names","def_is_string","identifier_atom","is_identifier_atom","tighten_body","statements","in_try","find_parent","find_loop_scope_try","CHANGED","max_iter","eliminate_spurious_blocks","eliminate_dead_code","handle_if_return","sequencesize","sequencesize_2","join_consecutive_vars","collapse","stat_index","scanner","abort","hit","hit_stack","hit_index","handle_custom_scan_order","stop_after","find_stop","write_only","lvalues","equivalent_to","replace_all","is_declared","pure_prop_access_globals","stop_if_hit","lhs_local","can_replace","value_def","candidate","funarg","may_modify","may_throw_on_access","may_throw","has_side_effects","side_effects_external","multi_replacer","extract_args","extract_candidates","get_lhs","get_lvalues","is_lhs_local","value_has_side_effects","replace_all_symbols","remove_candidate","has_overlapping_symbol","fn","fn_strict","found","scan_this","cur_scope","redefined_within_scope","referenced","var_def","mangleable_var","get_rvalue","min","unary_side_effects","seen_dirs","multiple_if_returns","has_multiple_if_returns","in_lambda","next_index","ab","can_merge_flow","aborts","negate","as_statement_array_with_return","extract_functions","prev_index","lct","loopcontrol_target","is_return_void","declarations_only","has_quit","extract_declarations_from_unreachable_code","seq","push_seq","to_simple_statement","decls","cons_seq","alt","join_object_assignments","defn","trimmed","diff","extract_object_assignments","target","remove_initializers","is_undefined","def_may_throw_on_access","_dot_throw","def_is_boolean","unary_bool","binary_bool","is_boolean","def_is_number","unary","binary","is_number","is_string","best_of_expression","ast1","ast2","best_of_statement","convert_to_predicate","keys","def_find_defs","_find_defs","child","suffix","defines","to_node","object_fns","native_fns","Boolean","Number","static_fns","def_eval","_eval","unaryPrefix","evaluated","element","non_converting_unary","non_converting_binary","pow","global_objs","static_values","aa","first_arg","static_value","static_fn","native_fn","constructor","def_negate","basic_negation","negated","global_pure_fns","def_has_side_effects","any","is_call_pure","def_may_throw","def_is_constant_expression","all_refs_local","scope_def","def_aborts","block_aborts","opt_AST_Lambda","r_keep_assign","retain_top_func","drop_funcs","drop_vars","assign_as_unused","in_use_ids","fixed_ids","var_defs_by_id","initializations","node_def","in_export","scan_ref_scoped","in_use","trim","unreferenced","template","drop_block","head","is_destructure","var_defs","assign","redef","dirs","hoisted","vars_found","var_decl","to_assignments","is_lambda","defs_by_id","hoister","make_sym","new_var","make_var_name","def_drop_side_effect_free","nodes","changed","if_break_in_loop","is_break","drop_it","rest","self_condition_length","negated_length","negated_is_best","default_branch","exact_match","decl","eliminate_branch","default_index","has_break","varDef","inline_array_like_spread","simple_args","is_func","rx","EXIT","separator","consts","ast","fun","comp","compute_char_frequency","mangle_names","is_regular_func","can_inline","returned_value","return_value","can_flatten_body","block_scoped","variable","safe_to_inject","can_inject_vars","can_inject_args","arg_vals_outer_refs","value_walker","scope_outer_refs","can_inject_args_values","is_reachable","can_inject_symbols","add_child_scope","append_var","flatten_args","lines","flatten_vars","flatten_fn","ev","trim_right_for_undefined","lift_sequences","in_boolean_context","commutativeOperators","is_atomic","reachable","find_ref","scan_scope","reversible","is_strict_comparison","combined","ll","rr","lr","associative","reversed","within_array_or_object_literal","defun_def","lambda_def","value_length","name_length","overhead","undef","ASSIGN_OPS","ASSIGN_OPS_COMMUTATIVE","safe_to_flatten","literals_in_boolean_context","lift_key","evaluateRight","arg_index","single_arg_diff","in_bool","is_true","is_false","booleanize","OPT_ARGUMENTS","sub","flatten_object","retValue","FLATTEN","flatten","k","optimized","has_special_symbol","segment","arrow","ancestors","is_destructuring_export_decl","keep","elem","should_retain","domprops","reserve_quoted_keys","addStrings","mangle_properties","reserved_option","builtins","debug","keep_quoted","only_cache","regex","objects","global_ref","new_global","Date","Symbol","ArrayBuffer","DataView","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","EvalError","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","JSON","Promise","Proxy","RangeError","ReferenceError","Reflect","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet","getOwnPropertyNames","find_builtins","debug_name_suffix","names_to_mangle","keep_quoted_strict","declared","root","mangleStrings","can_mangle","should_mangle","mangled","debug_mangled","to_ascii","atob","b64","Buffer","from","to_base64","btoa","set_shorthand","init_cache","map_from_object","cache_to_json","minify","files","quoted_props","timings","compress","enclose","nameCache","sourceMap","wrap","now","asObject","includeSources","url","warning","orig_line_diff","dest_line_diff","MOZ_SourceMap","SourceMapGenerator","sourceRoot","orig_map","SourceMapConsumer","sources","sourceContent","sourceContentFor","setSourceContent","gen_line","gen_col","orig_line","orig_col","originalPositionFor","column","addMapping","generated","original","stringify","toJSON","SourceMap","total","error","infer_options","normalize_directives","MOZ_TO_ME","Program","M","my_start_token","my_end_token","from_moz","ArrayPattern","elm","ObjectPattern","AssignmentPattern","Type","FROM_MOZ_STACK","SpreadElement","argument","RestElement","TemplateElement","cooked","TemplateLiteral","quasis","TaggedTemplateExpression","quasi","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ExpressionStatement","TryStatement","handlers","handler","guardedHandlers","finalizer","Property","computed","MethodDefinition","ArrayExpression","ObjectExpression","SequenceExpression","MemberExpression","SwitchCase","VariableDeclaration","declarations","ImportDeclaration","specifiers","specifier","imported","local","ExportAllDeclaration","ExportNamedDeclaration","declaration","ExportDefaultDeclaration","Literal","pattern","rx_source","MetaProperty","meta","Identifier","BigIntLiteral","raw_token","moznode","loc","range","moztype","mytype","propmap","moz_to_me","me_to_moz","moz","how","my","to_moz","to_moz_block","to_moz_scope","def_to_moz","UpdateExpression","UnaryExpression","ClassDeclaration","ClassExpression","superClass","to_moz_in_destructuring","guard","name_mapping","isComputed","string_or_num","to_mozilla_ast","mynode","from_mozilla_ast","save_stack","TO_MOZ_STACK","0","component"],"mappings":"qPA6CA,SAASA,EAAWC,GAChB,OAAOA,EAAIC,MAAM,IAGrB,SAASC,EAAOC,EAAMC,GAClB,OAAOA,EAAMC,SAASF,gDAG1B,MAAMG,UAAsBC,MACxBC,YAAYC,EAAKC,GACbC,QAEAC,KAAKT,KAAO,gBACZS,KAAKC,QAAUJ,EACfG,KAAKF,KAAOA,GAIpB,SAASI,EAASC,EAAML,EAAMM,IACb,IAATD,IACAA,EAAO,IACX,MAAME,EAAMF,GAAQ,GACpB,GAAIC,EAAO,IAAK,MAAME,KAAKD,EAAK,GAAIE,EAAIF,EAAKC,KAAOC,EAAIT,EAAMQ,GAC1D,MAAM,IAAIZ,EAAc,IAAMY,EAAI,8BAA+BR,GACrE,IAAK,MAAMQ,KAAKR,EAAM,GAAIS,EAAIT,EAAMQ,GAChC,GAAKH,GAASI,EAAIJ,EAAMG,GAEjB,GAAU,SAANA,EAAc,CACrB,IAAIE,EAAiB,EAAVL,EAAKG,GACZE,EAAO,GAAKA,EAAO,OAAMA,GAAQ,MACrCH,EAAIC,GAAKE,OAETH,EAAIC,GAAMH,GAAQI,EAAIJ,EAAMG,GAAMH,EAAKG,GAAKR,EAAKQ,QANjDD,EAAIC,GAAKR,EAAKQ,GAStB,OAAOD,EAGX,SAASI,KACT,SAASC,IAAiB,OAAO,EACjC,SAASC,IAAgB,OAAO,EAChC,SAASC,IAAgB,OAAOZ,KAChC,SAASa,IAAgB,OAAO,KAEhC,IAAIC,EAAM,WACN,SAASA,EAAIC,EAAGC,EAAGC,GACf,IAAwBX,EAApBD,EAAM,GAAIa,EAAM,GACpB,SAASC,IACL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BACA,qBACA,mBACA,6BACA,QACA,cACA,OACA,QACA,cACA,wBACA,eACA,uBACA,gBACA,YACA,aACA,uBACA,mBACA,yBACA,OACA,yBACA,WACA,QACA,cACA,kBACA,gBACA,iBACA,uBACA,qBACA,kBACA,gBACA,YACA,OACA,OACA,eACA,YACA,YACA,YACA,OACA,wBACA,iBACA,cACA,eACA,OACA,oBACA,UACA,WACA,iBACA,kBACA,oBACA,mBACA,OACA,YACA,UACA,kBACA,MACA,eACA,qBACA,SACA,eACA,WACA,gBACA,QACA,SACA,UACA,oBACA,mBACA,oBACA,kBACA,eACA,iBACA,gCACA,gCACA,gCACA,+BACA,6BACA,aACA,iBACA,iBACA,iBACA,qBACA,eACA,qBACA,MACA,iBACA,iBACA,mBACA,sBACA,kBACA,2BACA,kBACA,gBACA,kBACA,mBACA,eACA,qBACA,mBACA,cACA,oBACA,UACA,cACA,sBACA,eACA,gBACA,kBACA,iBACA,WACA,eACA,0BACA,mBACA,kBACA,WACA,SACA,cACA,aACA,UACA,gBACA,UACA,UACA,kBACA,wBACA,sBACA,oBACA,yBACA,uBACA,wBACA,oBACA,qBACA,uBACA,sBACA,mBACA,WACA,SACA,YACA,SACA,cACA,UACA,aACA,eACA,SACA,SACA,aACA,SACA,iBACA,kBACA,sBACA,SACA,SACA,UACA,WACA,eACA,aACA,eACA,cACA,cACA,cACA,QACA,YACA,cACA,aACA,aACA,aACA,WACA,YACA,YACA,aACA,gBACA,kBACA,iBACA,iBACA,iBACA,cACA,UACA,iBACA,SACA,WACA,WACA,SACA,YACA,iBACA,kBACA,wBACA,SACA,KACA,iBACA,gBACA,2BACA,gBACA,oBACA,sBACA,gBACA,aACA,iBACA,YACA,iBACA,aACA,WACA,eACA,UACA,mBACA,UACA,cACA,gBACA,UACA,SACA,YACA,cACA,eACA,iBACA,WACA,WACA,OACA,YACA,gBACA,mBACA,aACA,mBACA,oBACA,kBACA,oBACA,aACA,cACA,gBACA,2BACA,aACA,kBACA,iBACA,iBACA,kBACA,eACA,WACA,uBACA,SACA,yBACA,gBACA,iCACA,6BACA,iCACA,8BACA,4CACA,8BACA,qBACA,YACA,WACA,eACA,oBACA,sBACA,YACA,oBACA,YACA,WACA,mBACA,UACA,UACA,cACA,kBACA,aACA,qBACA,uBACA,gBACA,eACA,eACA,sBACA,iBACA,iBACA,kBACA,wBACA,+BACA,uBACA,4BACA,8BACA,0BACA,yBACA,0BACA,2BACA,yBACA,4BACA,wBACA,0BACA,0BACA,yBACA,4BACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,gBACA,aACA,aACA,eACA,mBACA,kBACA,YACA,cACA,WACA,mBACA,oBACA,oBACA,oBACA,WACA,gBACA,mBACA,oBACA,eACA,uBACA,6BACA,qBACA,eACA,eACA,sBACA,iBACA,iBACA,eACA,cACA,WACA,iBACA,gBACA,gBACA,gBACA,sBACA,cACA,WACA,cACA,aACA,eACA,gBACA,eACA,gBACA,qBACA,iBACA,eACA,WACA,YACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,YACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,YACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,YACA,YACA,YACA,YACA,YACA,YACA,eACA,eACA,WACA,sBACA,WACA,gBACA,eACA,cACA,cACA,mBACA,cACA,sBACA,WACA,gBACA,WACA,eACA,WACA,cACA,eACA,WACA,cACA,kBACA,mBACA,WACA,cACA,oBACA,kBACA,WACA,oBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,kBACA,WACA,eACA,iBACA,eACA,eACA,eACA,eACA,eACA,eACA,eACA,mBACA,mBACA,oBACA,kBACA,sBACA,4BACA,oBACA,WACA,aACA,kBACA,gBACA,mBACA,iBACA,eACA,iBACA,gBACA,cACA,cACA,cACA,eACA,qBACA,oBACA,oBACA,WACA,uBACA,eACA,WACA,cACA,gBACA,eACA,WACA,qBACA,gBACA,mBACA,mBACA,eACA,eACA,eACA,eACA,kBACA,WACA,aACA,eACA,WACA,oBACA,cACA,iBACA,YACA,WACA,qBACA,qBACA,mBACA,WACA,aACA,gBACA,oBACA,uBACA,sBACA,sBACA,sBACA,yBACA,uBACA,sBACA,uBACA,sBACA,wBACA,0BACA,yBACA,4BACA,yBACA,4BACA,sBACA,qBACA,qBACA,qBACA,uBACA,wBACA,WACA,6BACA,iCACA,kCACA,kCACA,8BACA,mCACA,4BACA,2BACA,2BACA,4BACA,2BACA,2BACA,mCACA,kCACA,6BACA,6BACA,6BACA,2BACA,qBACA,qBACA,6BACA,wBACA,qBACA,0BACA,qBACA,kCACA,2BACA,yBACA,mBACA,sBACA,0BACA,gCACA,qBACA,oBACA,4BACA,wBACA,0BACA,oBACA,sBACA,sBACA,yBACA,0BACA,wBACA,wBACA,2BACA,8BACA,qBACA,mBACA,sBACA,0BACA,wBACA,0BACA,0BACA,wBACA,oCACA,kCACA,iCACA,wBACA,wBACA,wBACA,wBACA,wBACA,wBACA,wBACA,wBACA,wBACA,wBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,2BACA,wBACA,qBACA,6BACA,uBACA,wBACA,qBACA,wBACA,wBACA,0BACA,oCACA,kCACA,sBACA,4BACA,yBACA,oBACA,qBACA,4BACA,qBACA,yBACA,uBACA,sBACA,sBACA,yBACA,2BACA,0BACA,oBACA,wBACA,uBACA,sBACA,4BACA,6BACA,0BACA,+BACA,4BACA,4BACA,qBACA,6BACA,6BACA,4BACA,0BACA,uBACA,qBACA,qBACA,sBACA,6BACA,wBACA,sBACA,qBACA,yBACA,wBACA,wBACA,0BACA,yBACA,qBACA,sBACA,yBACA,2BACA,uBACA,wBACA,wBACA,wBACA,oBACA,4BACA,sBACA,qBACA,wBACA,wBACA,6BACA,qBACA,qBACA,oBACA,qBACA,uBACA,wBACA,yBACA,WACA,WACA,cACA,OACA,YACA,cACA,WACA,YACA,YACA,eACA,cACA,eACA,mBACA,uBACA,WACA,OACA,iBACA,YACA,sBACA,4BACA,mBACA,oBACA,yBACA,uBACA,gBACA,2BACA,WACA,mBACA,eACA,YACA,yBACA,IACA,uBACA,+BACA,eACA,QACA,eACA,QACA,aACA,eACA,cACA,wBACA,UACA,QACA,aACA,QACA,uBACA,UACA,eACA,SACA,kBACA,QACA,aACA,YACA,QACA,iBACA,cACA,cACA,WACA,UACA,UACA,gBACA,mBACA,gBACA,cACA,iBACA,0BACA,QACA,aACA,aACA,aACA,aACA,aACA,aACA,QACA,iBACA,2BACA,kBACA,sCACA,cACA,qCACA,qCACA,+CACA,uCACA,sBACA,uBACA,oCACA,oCACA,4CACA,0BACA,QACA,iBACA,aACA,WACA,wBACA,gBACA,OACA,YACA,OACA,YACA,WACA,aACA,aACA,eACA,eACA,aACA,WACA,WACA,WACA,uBACA,SACA,UACA,aACA,WACA,UACA,gBACA,eACA,eACA,oBACA,mBACA,mBACA,gBACA,eACA,mBACA,SACA,wBACA,WACA,YACA,aACA,WACA,aACA,kBACA,OACA,oBACA,oBACA,oBACA,kBACA,mBACA,gBACA,kBACA,sBACA,wBACA,kBACA,oBACA,oBACA,iBACA,qBACA,qBACA,mBACA,kBACA,sBACA,qBACA,oBACA,uBACA,iBACA,eACA,cACA,mBACA,sBACA,kBACA,6BACA,kBACA,mBACA,sBACA,gBACA,kBACA,qBACA,kBACA,oBACA,mBACA,mBACA,qBACA,oBACA,gBACA,mBACA,oBACA,kBACA,iBACA,qBACA,mBACA,kBACA,sBACA,kBACA,mBACA,iBACA,mBACA,oBACA,sBACA,oBACA,wBACA,oBACA,uBACA,mBACA,qBACA,iBACA,sBACA,2BACA,mBACA,oBACA,oBACA,oBACA,oBACA,kBACA,mBACA,0BACA,uBACA,sBACA,mBACA,sBACA,0BACA,sBACA,sBACA,kBACA,mBACA,mBACA,mBACA,qBACA,mBACA,kBACA,UACA,UACA,eACA,aACA,gBACA,gBACA,aACA,gBACA,cACA,YACA,qBACA,cACA,uBACA,aACA,gBACA,iBACA,WACA,cACA,iBACA,iBACA,mBACA,aACA,iBACA,wBACA,OACA,mCACA,iCACA,cACA,OACA,YACA,iBACA,MACA,WACA,WACA,WACA,sBACA,qBACA,wBACA,eACA,yBACA,gCACA,2BACA,wBACA,oBACA,oBACA,gBACA,mBACA,SACA,eACA,QACA,cACA,YACA,WACA,aACA,qBACA,iBACA,aACA,aACA,YACA,SACA,gBACA,OACA,4BACA,WACA,OACA,OACA,UACA,iBACA,gBACA,WACA,QACA,WACA,gBACA,uBACA,gCACA,uBACA,SACA,OACA,SACA,kBACA,uBACA,wBACA,QACA,YACA,aACA,aACA,cACA,OACA,OACA,MACA,SACA,UACA,SACA,QACA,UACA,WACA,YACA,UACA,cACA,iBACA,YACA,kBACA,mBACA,WACA,mCACA,4BACA,+BACA,wBACA,mBACA,0BACA,iCACA,mBACA,YACA,sBACA,qBACA,iCACA,6BACA,oBACA,oBACA,mBACA,sBACA,oBACA,8BACA,sBACA,sBACA,8BACA,sBACA,uBACA,uBACA,aACA,eACA,aACA,YACA,mBACA,YACA,kBACA,oBACA,mBACA,eACA,YACA,YACA,YACA,WACA,YACA,UACA,qBACA,oBACA,oBACA,oBACA,sBACA,mBACA,iBACA,mBACA,qBACA,uBACA,wBACA,qBACA,yBACA,sBACA,uBACA,qBACA,uBACA,2CACA,kCACA,qCACA,iCACA,gCACA,8BACA,2BACA,6BACA,+BACA,kCACA,kCACA,iCACA,gCACA,kCACA,kCACA,gCACA,yBACA,yBACA,yBACA,iCACA,yBACA,0BACA,0BACA,MACA,OACA,kBACA,eACA,8BACA,sBACA,aACA,gBACA,gBACA,uBACA,sBACA,kBACA,oBACA,uBACA,YACA,YACA,iBACA,sBACA,gBACA,cACA,cACA,kCACA,6BACA,mBACA,mBACA,wBACA,iBACA,eACA,cACA,UACA,WACA,gBACA,aACA,mBACA,eACA,oBACA,wBACA,uBACA,uBACA,6BACA,mBACA,wBACA,6BACA,gBACA,wBACA,aACA,wBACA,eACA,oBACA,oBACA,oBACA,iBACA,sBACA,uBACA,iBACA,sBACA,sBACA,sBACA,qBACA,cACA,kBACA,aACA,qBACA,eACA,aACA,eACA,qBACA,sBACA,iBACA,gBACA,eACA,gBACA,qBACA,qBACA,qBACA,iBACA,aACA,wBACA,eACA,yBACA,0BACA,0BACA,aACA,iBACA,eACA,iBACA,cACA,gBACA,yBACA,sBACA,YACA,mBACA,6BACA,8BACA,0BACA,2BACA,gBACA,kBACA,iBACA,uBACA,kBACA,mBACA,cACA,gBACA,iBACA,aACA,mBACA,yBACA,wBACA,yBACA,oBACA,eACA,qBACA,oBACA,gBACA,qBACA,wBACA,wBACA,8BACA,eACA,eACA,gBACA,gBACA,oBACA,kBACA,gBACA,mBACA,iBACA,gBACA,iBACA,UACA,wBACA,yBACA,oBACA,gBACA,cACA,eACA,iBACA,kBACA,oBACA,QACA,MACA,OACA,oBACA,SACA,aACA,cACA,wBACA,cACA,OACA,oBACA,gBACA,QACA,WACA,kBACA,gBACA,mBACA,oBACA,sBACA,SACA,WACA,8BACA,cACA,iCACA,MACA,eACA,YACA,cACA,qBACA,OACA,aACA,eACA,WACA,WACA,eACA,mBACA,SACA,eACA,WACA,MACA,2BACA,2BACA,sBACA,sBACA,sBACA,sBACA,OACA,SACA,UACA,6BACA,6BACA,gBACA,SACA,8BACA,sBACA,sBACA,SACA,iBACA,gBACA,iBACA,YACA,YACA,kBACA,kBACA,oBACA,4BACA,4BACA,mCACA,mCACA,gCACA,gCACA,uCACA,uCACA,qBACA,gCACA,gCACA,qBACA,8BACA,8BACA,qBACA,qBACA,kBACA,kBACA,UACA,oBACA,aACA,KACA,gBACA,SACA,wBACA,sBACA,uBACA,uBACA,oBACA,OACA,oBACA,8BACA,kBACA,sBACA,eACA,mBACA,aACA,SACA,cACA,mBACA,kBACA,qBACA,wBACA,4BACA,oBACA,eACA,SACA,cACA,gBACA,oBACA,wBACA,gBACA,UACA,mBACA,QACA,cACA,mBACA,IACA,YACA,qBACA,iBACA,YACA,gBACA,aACA,WACA,UACA,eACA,0BACA,uBACA,yBACA,0BACA,0BACA,sBACA,+BACA,wBACA,4BACA,qBACA,WACA,yCACA,wBACA,8BACA,yCACA,8BACA,2BACA,SACA,UACA,MACA,SACA,UACA,OACA,QACA,WACA,qBACA,4BACA,sBACA,kBACA,4BACA,iBACA,eACA,wBACA,iBACA,gBACA,QACA,aACA,iBACA,mBACA,OACA,iBACA,SACA,UACA,WACA,aACA,eACA,UACA,2BACA,iBACA,kBACA,yBACA,wBACA,WACA,kBACA,cACA,eACA,mBACA,iBACA,aACA,YACA,eACA,eACA,SACA,gBACA,iBACA,uBACA,mBACA,kBACA,cACA,2BACA,aACA,QACA,UACA,WACA,iBACA,qBACA,eACA,gBACA,yBACA,qBACA,eACA,cACA,wBACA,gBACA,8BACA,YACA,OACA,aACA,eACA,UACA,QACA,SACA,YACA,qBACA,YACA,eACA,iBACA,cACA,qBACA,oBACA,oBACA,+BACA,+BACA,mBACA,0BACA,yBACA,eACA,qBACA,sBACA,eACA,eACA,gBACA,iBACA,0BACA,0BACA,cACA,eACA,qBACA,oBACA,cACA,cACA,aACA,gBACA,gBACA,cACA,wBACA,qBACA,yBACA,WACA,yBACA,oBACA,0BACA,6BACA,mBACA,qBACA,yBACA,qBACA,oBACA,wBACA,oBACA,wBACA,iCACA,kBACA,oBACA,2BACA,sBACA,mBACA,qBACA,WACA,sCACA,mBACA,iBACA,iBACA,oBACA,cACA,aACA,qBACA,yBACA,oBACA,eACA,oBACA,0BACA,gCACA,wBACA,6BACA,8BACA,8BACA,2BACA,yBACA,oBACA,oBACA,oBACA,oBACA,oBACA,2BACA,oBACA,oBACA,wBACA,yBACA,qBACA,yBACA,+BACA,wBACA,mBACA,yBACA,mBACA,iBACA,qBACA,2BACA,yBACA,wBACA,wBACA,0BACA,cACA,qBACA,kBACA,qBACA,qBACA,qBACA,kBACA,kBACA,YACA,gBACA,iBACA,2BACA,kBACA,mBACA,iBACA,YACA,qBACA,yBACA,YACA,gBACA,WACA,iBACA,aACA,mBACA,mBACA,sBACA,4BACA,4BACA,kCACA,kCACA,gCACA,gCACA,sCACA,sCACA,sBACA,gCACA,gCACA,sBACA,8BACA,8BACA,iBACA,sBACA,sBACA,oBACA,WACA,eACA,oBACA,qBACA,yBACA,2BACA,UACA,iBACA,qBACA,gBACA,mBACA,gBACA,iBACA,gBACA,kBACA,mBACA,mBACA,iBACA,kBACA,wBACA,iBACA,qBACA,4BACA,kBACA,eACA,mBACA,eACA,gBACA,kBACA,iBACA,cACA,gBACA,eACA,oBACA,qBACA,oBACA,wBACA,4BACA,gBACA,gBACA,gBACA,gBACA,sBACA,6BACA,yBACA,kCACA,wBACA,yBACA,oBACA,uBACA,oBACA,yBACA,8BACA,+BACA,0BACA,8BACA,6BACA,8BACA,uBACA,2BACA,8BACA,4BACA,0BACA,2BACA,8BACA,0BACA,8BACA,2BACA,mCACA,0CACA,gCACA,kCACA,iCACA,wCACA,qCACA,wCACA,sCACA,qCACA,uCACA,sCACA,gCACA,8BACA,+BACA,gCACA,mCACA,+BACA,wBACA,oBACA,qBACA,qBACA,oBACA,oBACA,wBACA,oBACA,4BACA,oBACA,oBACA,yBACA,8BACA,0BACA,iCACA,0BACA,yBACA,4BACA,qBACA,yBACA,4BACA,uBACA,wBACA,0BACA,iCACA,gCACA,kCACA,6BACA,qBACA,yBACA,kCACA,wBACA,oBACA,iCACA,yBACA,6BACA,sCACA,+BACA,kCACA,mCACA,mCACA,mCACA,mCACA,mCACA,mCACA,mCACA,mCACA,mCACA,uBACA,2BACA,0BACA,2BACA,0BACA,wBACA,yBACA,uBACA,uBACA,sBACA,sBACA,sBACA,0BACA,wBACA,mCACA,iCACA,8BACA,kCACA,wBACA,+BACA,qBACA,yBACA,yBACA,yBACA,aACA,aACA,SACA,oBACA,SACA,sBACA,kBACA,+BACA,YACA,gBACA,yBACA,4BACA,qBACA,MACA,aACA,eACA,qBACA,uBACA,2BACA,gBACA,UACA,eACA,SACA,aACA,iBACA,eACA,SACA,cACA,YACA,4BACA,8BACA,8BACA,4BACA,6BACA,+BACA,UACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,WACA,YACA,YACA,WACA,WACA,WACA,WACA,WACA,WACA,aACA,qBACA,2BACA,mBACA,8BACA,8BACA,8BACA,8BACA,8BACA,8BACA,qBACA,6BACA,qBACA,iBACA,iBACA,YACA,UACA,cACA,gBACA,2BACA,WACA,YACA,eACA,iBACA,oBACA,WACA,oBACA,gBACA,cACA,gBACA,OACA,cACA,cACA,YACA,cACA,YACA,eACA,mBACA,gBACA,YACA,aACA,QACA,aACA,YACA,aACA,kBACA,aACA,YACA,UACA,WACA,cACA,eACA,0BACA,wBACA,+BACA,+BACA,mBACA,qCACA,sBACA,iCACA,oBACA,SACA,gBACA,eACA,iBACA,yBACA,yBACA,uBACA,6BACA,cACA,WACA,MACA,kBACA,eACA,mBACA,MACA,cACA,cACA,aACA,oBACA,qBACA,+BACA,qBACA,kBACA,iBACA,iBACA,SACA,UACA,iBACA,cACA,qCACA,oCACA,8BACA,iCACA,8BACA,2BACA,6BACA,2BACA,gBACA,WACA,gBACA,UACA,WACA,gBACA,SACA,YACA,gBACA,mBACA,qBACA,wBACA,uBACA,qBACA,qBACA,iBACA,UACA,UACA,kBACA,cACA,oBACA,mBACA,eACA,oBACA,wBACA,cACA,6BACA,eACA,uBACA,mBACA,uBACA,oBACA,sBACA,uBACA,wBACA,yBACA,kBACA,sBACA,0BACA,gBACA,gBACA,sBACA,6BACA,wBACA,kBACA,oBACA,yBACA,kBACA,wCACA,cACA,mBACA,qBACA,yBACA,wBACA,YACA,aACA,SACA,SACA,cACA,iBACA,4BACA,0BACA,8BACA,uBACA,gBACA,qCACA,iBACA,iBACA,kBACA,kBACA,cACA,gBACA,OACA,SACA,SACA,mBACA,mBACA,mBACA,mBACA,UACA,YACA,gBACA,IACA,QACA,OACA,QACA,MACA,WACA,eACA,+BACA,cACA,SACA,gBACA,aACA,YACA,iBACA,WACA,OACA,QACA,SACA,YACA,SACA,aACA,gBACA,sBACA,oBACA,gBACA,MACA,cACA,eACA,eACA,SACA,aACA,mBACA,YACA,gBACA,aACA,kBACA,YACA,cACA,WACA,cACA,UACA,aACA,WACA,YACA,UACA,kBACA,kBACA,YACA,eACA,WACA,sBACA,aACA,iBACA,kBACA,SACA,YACA,MACA,UACA,QACA,YACA,QACA,gBACA,cACA,aACA,eACA,aACA,YACA,oBACA,aACA,MACA,aACA,kBACA,oBACA,QACA,MACA,cACA,UACA,SACA,UACA,WACA,mBACA,YACA,kBACA,SACA,aACA,eACA,UACA,QACA,UACA,UACA,uBACA,gCACA,sBACA,iBACA,YACA,kBACA,sBACA,qBACA,sBACA,4BACA,iBACA,uBACA,4BACA,iBACA,qBACA,oBACA,oBACA,0BACA,gBACA,qBACA,qBACA,0BACA,mBACA,cACA,MACA,MACA,cACA,kBACA,UACA,mBACA,aACA,SACA,eACA,cACA,aACA,aACA,eACA,cACA,aACA,eACA,kBACA,oBACA,UACA,mBACA,QACA,eACA,MACA,QACA,UACA,QACA,YACA,cACA,OACA,QACA,SACA,SACA,QACA,QACA,OACA,QACA,QACA,OACA,cACA,eACA,eACA,cACA,SACA,aACA,WACA,kBACA,gBACA,qBACA,oBACA,aACA,cACA,gBACA,aACA,iBACA,eACA,cACA,YACA,WACA,cACA,YACA,WACA,aACA,eACA,YACA,WACA,OACA,OACA,UACA,IACA,OACA,sBACA,qBACA,aACA,wBACA,wBACA,kBACA,mBACA,mBACA,oBACA,sBACA,oBACA,kBACA,uBACA,sBACA,iBACA,kBACA,kBACA,mBACA,qBACA,sBACA,sBACA,mBACA,iBACA,WACA,UACA,iBACA,iBACA,WACA,aACA,UACA,UACA,gBACA,UACA,OACA,eACA,iBACA,YACA,WACA,iBACA,eACA,eACA,OACA,gBACA,UACA,eACA,OACA,MACA,aACA,OACA,qBACA,aACA,kBACA,mBACA,cACA,aACA,gBACA,wBACA,YACA,oBACA,QACA,OACA,iBACA,OACA,OACA,OACA,WACA,OACA,YACA,eACA,SACA,gBACA,sBACA,4BACA,6BACA,sBACA,sBACA,kBACA,eACA,eACA,sBACA,sBACA,qBACA,sBACA,qBACA,cACA,oBACA,oBACA,oBACA,gBACA,eACA,qBACA,qBACA,qBACA,iBACA,eACA,aACA,mBACA,yBACA,0BACA,mBACA,mBACA,eACA,eACA,oBACA,yBACA,0BACA,oBACA,oBACA,iBACA,cACA,kBACA,mBACA,cACA,oBACA,oBACA,mBACA,oBACA,mBACA,aACA,kBACA,kBACA,kBACA,eACA,cACA,mBACA,mBACA,mBACA,gBACA,cACA,YACA,iBACA,sBACA,uBACA,iBACA,iBACA,cACA,SACA,eACA,QACA,gBACA,qBACA,iBACA,eACA,cACA,gBACA,SACA,uBACA,aACA,aACA,qBACA,YACA,YACA,aACA,cACA,cACA,kBACA,OACA,UACA,SACA,aACA,cACA,aACA,gBACA,WACA,iBACA,UACA,cACA,SACA,WACA,UACA,aACA,aACA,IACA,OACA,SACA,iBACA,eACA,cACA,kBACA,cACA,cACA,SACA,uBACA,eACA,wBACA,aACA,YACA,SACA,UACA,eACA,cACA,UACA,gBACA,oBACA,yBACA,sBACA,OACA,QACA,WACA,OACA,KACA,OACA,YACA,cACA,cACA,QACA,KACA,QACA,QACA,YACA,iBACA,UACA,eACA,mBACA,wBACA,OACA,SACA,WACA,aACA,YACA,eACA,gBACA,wBACA,WACA,eACA,UACA,iBACA,yBACA,oBACA,gBACA,UACA,oBACA,YACA,aACA,WACA,SACA,aACA,OACA,YACA,YACA,UACA,QACA,kBACA,aACA,YACA,aACA,iBACA,gBACA,aACA,gBACA,kBACA,YACA,uBACA,cACA,eACA,eACA,aACA,QACA,aACA,eACA,oBACA,aACA,aACA,cACA,YACA,cACA,UACA,UACA,OACA,YACA,YACA,aACA,WACA,WACA,gBACA,YACA,WACA,UACA,gBACA,QACA,gBACA,YACA,aACA,QACA,YACA,SACA,UACA,MACA,QACA,MACA,OACA,WACA,cACA,WACA,UACA,WACA,gBACA,kBACA,YACA,UACA,QACA,QACA,sBACA,8BACA,aACA,qBACA,4BACA,YACA,YACA,OACA,cACA,aACA,YACA,eACA,aACA,kBACA,kBACA,kBACA,aACA,cACA,UACA,UACA,oBACA,0BACA,UACA,wBACA,0BACA,mBACA,cACA,eACA,aACA,aACA,UACA,gBACA,WACA,qBACA,uBACA,yBACA,uBACA,0BACA,SACA,gBACA,iBACA,iBACA,gBACA,UACA,qBACA,uCACA,kCACA,UACA,aACA,eACA,YACA,aACA,kBACA,UACA,cACA,qBACA,cACA,YACA,WACA,eACA,UACA,kBACA,kBACA,kBACA,oBACA,mBACA,cACA,gBACA,UACA,cACA,cACA,WACA,aACA,UACA,aACA,WACA,0BACA,SACA,gBACA,SACA,kBACA,iBACA,oBACA,gBACA,aACA,uBACA,0BACA,MACA,OACA,QACA,oBACA,gBACA,mBACA,eACA,WACA,kBACA,SACA,iBACA,eACA,kBACA,oBACA,qBACA,eACA,qBACA,qBACA,sBACA,gBACA,sBACA,wBACA,gBACA,2BACA,qBACA,kBACA,mBACA,oBACA,cACA,kBACA,iBACA,yBACA,qBACA,2BACA,gBACA,kBACA,wBACA,cACA,oBACA,mBACA,oBACA,iBACA,aACA,iBACA,qBACA,oBACA,kBACA,cACA,uBACA,uBACA,2BACA,kBACA,+BACA,0BACA,oBACA,mBACA,qBACA,qBACA,oBACA,kBACA,cACA,mBACA,eACA,gBACA,qBACA,cACA,8BACA,gBACA,uBACA,cACA,wBACA,qBACA,iBACA,kBACA,kBACA,kBACA,yBACA,yBACA,4BACA,kCACA,kCACA,wCACA,wCACA,sCACA,sCACA,4CACA,4CACA,4BACA,sCACA,sCACA,4BACA,oCACA,oCACA,4BACA,4BACA,iBACA,gBACA,qBACA,+BACA,wBACA,gBACA,eACA,mBACA,qBACA,mBACA,cACA,cACA,cACA,iBACA,kBACA,gBACA,cACA,kBACA,mBACA,mBACA,eACA,cACA,SACA,MACA,WACA,WACA,UACA,eACA,UACA,WACA,OACA,WACA,cACA,cACA,eACA,gBACA,aACA,eACA,eACA,gBACA,cACA,mBACA,cACA,SACA,QACA,cACA,KACA,KACA,IACA,OACA,UACA,eACA,eACA,UACA,eACA,WACA,UACA,WACA,KACA,QACA,kBACA,UACA,SACA,kBACA,eACA,YACA,qBACA,UACA,UACA,iBACA,iBACA,eACA,sBACA,mBACA,kBACA,gBACA,aACA,eACA,cACA,gBACA,QACA,sBACA,sBACA,mBACA,iBACA,YACA,SACA,eACA,gBACA,aACA,iBACA,aACA,iBACA,oBACA,qBACA,cACA,eACA,oBACA,gBACA,qBACA,YACA,aACA,eACA,cACA,cACA,gBACA,uBACA,WACA,eACA,iBACA,oBACA,QACA,YACA,SACA,SACA,SACA,YACA,YACA,aACA,aACA,YACA,cACA,cACA,aACA,cACA,iBACA,SACA,cACA,eACA,SACA,SACA,mBACA,aACA,aACA,kBACA,SACA,aACA,MACA,UACA,YACA,SACA,UACA,2BACA,WACA,kBACA,aACA,gBACA,UACA,gBACA,UACA,SACA,WACA,WACA,aACA,WACA,UACA,WACA,kBACA,eACA,cACA,UACA,oBACA,cACA,cACA,cACA,2BACA,6BACA,iBACA,aACA,SACA,kBACA,oBACA,oBACA,mBACA,OACA,gBACA,WACA,WACA,YACA,aACA,2BACA,sBACA,eACA,6BACA,oBACA,YACA,oBACA,sBACA,sBACA,qBACA,aACA,qBACA,WACA,OACA,YACA,WACA,SACA,QACA,KACA,KACA,SACA,IACA,WACA,gBACA,cACA,mBACA,WACA,YACA,UACA,QACA,SACA,QACA,cACA,aACA,SACA,mBACA,0BACA,0BACA,UACA,gBACA,SACA,YACA,qBACA,WACA,UACA,UACA,MACA,eACA,aACA,eACA,cACA,YACA,UACA,QACA,WACA,WACA,UACA,YACA,YACA,oBACA,QACA,YACA,SACA,OACA,WACA,QACA,aACA,QACA,YACA,OACA,cACA,sBACA,aACA,iBACA,kBACA,MACA,SACA,yBACA,UACA,YACA,aACA,yBACA,QACA,WACA,+BACA,YACA,SACA,aACA,aACA,eACA,WACA,4BACA,kBACA,cACA,IACA,OACA,eACA,WACA,aACA,0BACA,WACA,QACA,QACA,aACA,UACA,UACA,kBACA,aACA,mBACA,WACA,WACA,kBACA,WACA,QACA,OACA,eACA,YACA,cACA,WACA,WACA,YACA,WACA,SACA,aACA,aACA,cACA,UACA,UACA,OACA,YACA,WACA,WACA,SACA,YACA,aACA,oBACA,YACA,QACA,OACA,aACA,iBACA,YACA,YACA,cACA,YACA,YACA,gBACA,WACA,WACA,aACA,WACA,QACA,QACA,QACA,cACA,gBACA,aACA,eACA,QACA,QACA,QACA,YACA,cACA,OACA,cACA,wBACA,eACA,yBACA,YACA,mBACA,eACA,aACA,iBACA,eACA,0BACA,oBACA,0BACA,yBACA,uBACA,wBACA,cACA,aACA,sBACA,cACA,uBACA,WACA,iBACA,uBACA,cACA,YACA,gBACA,cACA,wBACA,kBACA,uBACA,uBACA,qBACA,sBACA,aACA,YACA,QACA,WACA,MACA,UACA,cACA,OACA,aACA,cACA,aACA,iBACA,aACA,SACA,gBACA,QACA,UACA,KACA,QACA,cACA,eACA,eACA,0BACA,uBACA,SACA,YACA,SACA,YACA,oBACA,OACA,eACA,gBACA,cACA,YACA,SACA,aACA,oBACA,oBACA,KACA,KACA,OACA,UACA,QACA,iBACA,cACA,iBACA,kBACA,cACA,gBACA,MACA,kBACA,mBACA,kBACA,SACA,wBACA,YACA,cACA,qBACA,oBACA,eACA,iBACA,mBACA,qBACA,iBACA,UACA,aACA,UACA,cACA,wBACA,qBACA,uBACA,wBACA,sBACA,SACA,+BACA,iBACA,uBACA,gBACA,iBACA,6BACA,mBACA,wBACA,mBACA,aACA,uBACA,kBACA,eACA,aACA,qBACA,iBACA,UACA,mBACA,UACA,SACA,0BACA,gCACA,sBACA,cACA,iBACA,yBACA,oBACA,uBACA,yBACA,mBACA,uBACA,aACA,mBACA,mBACA,WACA,eACA,kBACA,aACA,UACA,aACA,aACA,wBACA,yBACA,gBACA,oCACA,uBACA,cACA,cACA,WACA,eACA,WACA,WACA,UACA,sBACA,UACA,WACA,SACA,cACA,kBACA,WACA,qBACA,cACA,cACA,kBACA,aACA,mBACA,WACA,eACA,iBACA,cACA,mBACA,mCACA,mBACA,2BACA,sBACA,wBACA,eACA,qBACA,mBACA,gBACA,uBACA,2BACA,oBACA,oBACA,sBACA,sBACA,sBACA,uBACA,mBACA,iBACA,mBACA,kBACA,aACA,eACA,eACA,kBACA,mBACA,2BACA,oBACA,UACA,oBACA,iBACA,eACA,aACA,eACA,aACA,mBACA,qBACA,2BACA,kBACA,oBACA,eACA,aACA,2BACA,yBACA,eACA,WACA,oBACA,gBACA,iBACA,qBACA,kBACA,yBACA,kBACA,UACA,oBACA,iBACA,eACA,YACA,wBACA,aACA,YACA,iBACA,cACA,qBACA,gBACA,cACA,gBACA,YACA,YACA,WACA,aACA,qBACA,eACA,YACA,aACA,mBACA,kBACA,wBACA,0BACA,iBACA,mBACA,UACA,YACA,SACA,cACA,2BACA,6BACA,2BACA,WACA,KACA,oBACA,gBACA,WACA,QACA,QACA,iBACA,WACA,sBACA,MACA,eACA,iBACA,gBACA,gBACA,iBACA,eACA,aACA,WACA,YACA,iBACA,OACA,OACA,UACA,UACA,SACA,SACA,OACA,YACA,OACA,OACA,UACA,kBACA,kBACA,qBACA,OACA,WACA,OACA,WACA,SACA,wBACA,UACA,WACA,YACA,cACA,QACA,QACA,qBACA,oBACA,OACA,KACA,aACA,WACA,YACA,aACA,oBACA,kBACA,mBACA,iBACA,SACA,WACA,UACA,iBACA,YACA,aACA,mBACA,UACA,OACA,OACA,MACA,MACA,kCACA,UACA,WACA,cACA,gBACA,QACA,aACA,UACA,YACA,sBACA,sBACA,OACA,OACA,qBACA,sBACA,qBACA,iBACA,mBACA,uBACA,kBACA,WACA,wBACA,6BACA,gBACA,iBACA,YACA,iBACA,mBACA,sBACA,eACA,oBACA,0BACA,mBACA,iBACA,uBACA,sBACA,oBACA,mBACA,oBACA,gBACA,0BACA,mBACA,oBACA,oBACA,sBACA,yBACA,mBACA,gBACA,gBACA,iBACA,sBACA,cACA,2BACA,4BACA,uBACA,iBACA,cACA,aACA,gBACA,QACA,YACA,cACA,YACA,aACA,QACA,cACA,gBACA,cACA,wBACA,qBACA,qBACA,eACA,aACA,aACA,mBACA,aACA,YACA,aACA,eACA,YACA,iBACA,iBACA,iBACA,WACA,uBACA,UACA,aACA,KACA,OACA,cACA,UACA,6BACA,WACA,2BACA,SACA,cACA,cACA,oBACA,6BACA,gBACA,qBACA,aACA,YACA,UACA,cACA,eACA,WACA,gBACA,WACA,cACA,OACA,aACA,YACA,QACA,cACA,QACA,SACA,gBACA,gBACA,iBACA,kBACA,kBACA,YACA,YACA,qBACA,8BACA,gBACA,iBACA,gBACA,aACA,WACA,WACA,cACA,aACA,YACA,YACA,kBACA,SACA,YACA,UACA,OACA,SACA,WACA,UACA,YACA,WACA,YACA,cACA,WACA,cACA,WACA,OACA,OACA,kBACA,iBACA,KACA,KACA,KACA,KACA,eACA,oBACA,oBACA,UACA,MACA,UACA,SACA,gBACA,kBACA,cACA,UACA,YACA,UACA,WACA,OACA,UACA,OACA,OACA,QACA,SACA,OACA,WACA,YACA,eACA,YACA,mBACA,cACA,YACA,cACA,YACA,qBACA,kBACA,eACA,mBACA,WACA,YACA,YACA,oBACA,WACA,SACA,SACA,aACA,aACA,iBACA,iBACA,iBACA,iBACA,SACA,OACA,cACA,aACA,SACA,eACA,mBACA,iBACA,gBACA,QACA,iBACA,gBACA,oBACA,OACA,cACA,YACA,YACA,UACA,iBACA,aACA,WACA,aACA,SACA,YACA,0BACA,SACA,OACA,YACA,cACA,QACA,OACA,aACA,mBACA,sBACA,kBACA,YACA,iBACA,oBACA,gBACA,WACA,OACA,eACA,iBACA,YACA,SACA,mBACA,YACA,eACA,SACA,gBACA,WACA,cACA,OACA,aACA,MACA,QACA,QACA,OACA,cACA,cACA,WACA,YACA,qBACA,eACA,OACA,UACA,YACA,UACA,MACA,QACA,aACA,YACA,SACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,WACA,MACA,UACA,SACA,gBACA,cACA,eACA,aACA,eACA,eACA,aACA,cACA,YACA,cACA,OACA,SACA,aACA,aACA,gBACA,eACA,YACA,eACA,YACA,eACA,cACA,cACA,cACA,QACA,OACA,YACA,mBACA,WACA,YACA,QACA,aACA,cACA,UACA,SACA,kBACA,MACA,aACA,YACA,kBACA,kBACA,0BACA,cACA,cACA,YACA,YACA,iBACA,WACA,WACA,UACA,cACA,QACA,oBACA,eACA,eACA,aACA,YACA,YACA,cACA,SACA,UACA,kBACA,UACA,eACA,kBACA,UACA,SACA,WACA,YACA,MACA,aACA,YACA,cACA,YACA,WACA,WACA,aACA,iBACA,eACA,OACA,SACA,QACA,OACA,SACA,UACA,YACA,gBACA,gBACA,iBACA,cACA,WACA,UACA,YACA,SACA,iBACA,oBACA,cACA,SACA,wBACA,UACA,UACA,mBACA,sBACA,qBACA,0BACA,sBACA,iCACA,mBACA,6BACA,iBACA,aACA,cACA,sBACA,sBACA,6BACA,YACA,UACA,gBACA,mBACA,qBACA,cACA,iBACA,gBACA,gBACA,uBACA,uBACA,YACA,gBACA,eACA,eACA,iBACA,kBACA,cACA,aACA,YACA,2BACA,eACA,kBACA,kBACA,iBACA,iBACA,UACA,eACA,WACA,YACA,qBACA,qBACA,eACA,eACA,YACA,iBACA,gBACA,mBACA,kBACA,SACA,wBACA,qBACA,oBACA,cACA,mBACA,qBACA,uBACA,2BACA,YACA,2BACA,uBACA,wBACA,eACA,qBACA,gBACA,eACA,YACA,eACA,eACA,aACA,uBACA,mBACA,qBACA,cACA,mBACA,uBACA,sBACA,sBACA,4BACA,kBACA,uBACA,uBACA,4BACA,uBACA,qBACA,6BACA,YACA,mBACA,gCACA,uBACA,mBACA,UACA,wBACA,sBACA,qBACA,wBACA,wBACA,oBACA,0BACA,wBACA,mBACA,eACA,WACA,eACA,sBACA,qBACA,mBACA,iBACA,aACA,eACA,SACA,cACA,kBACA,aACA,kBACA,iBACA,iBACA,cACA,aACA,iBACA,sBACA,aACA,aACA,aACA,wBACA,sBACA,sBACA,oBACA,qBACA,2BACA,wBACA,eACA,oBACA,mBACA,gBACA,YACA,iBACA,gBACA,aACA,WACA,uBACA,wBACA,wBACA,uBACA,YACA,0BACA,aACA,cACA,sBACA,iBACA,cACA,SACA,cACA,oBACA,6BACA,eACA,oBACA,mBACA,gBACA,kBACA,gBACA,sBACA,mBACA,6BACA,kBACA,mBACA,mBACA,0BACA,0BACA,sBACA,aACA,mBACA,mBACA,gBACA,oBACA,oBACA,oBACA,oBACA,gBACA,sBACA,sBACA,mBACA,gBACA,gBACA,sBACA,iBACA,iBACA,sBACA,0BACA,mBACA,WACA,gBACA,gBACA,gCACA,+BACA,iCACA,gCACA,cACA,oBACA,mBACA,eACA,oBACA,uBACA,uBACA,6BACA,sBACA,gCACA,eACA,oBACA,aACA,eACA,gBACA,sBACA,SACA,WACA,KACA,aACA,oBACA,YACA,WACA,WACA,eACA,cACA,QACA,IACA,OACA,WACA,YACA,iBACA,QACA,eACA,aACA,gBACA,eACA,WACA,aACA,iBACA,kBACA,YACA,OACA,yBACA,WACA,WACA,eACA,WACA,eACA,SACA,WACA,yBACA,aACA,UACA,OACA,qBACA,WACA,WACA,cACA,WACA,SACA,WACA,UACA,aACA,SACA,WACA,WACA,YACA,YACA,wBACA,eACA,YACA,OACA,cACA,UACA,SACA,MACA,aACA,SACA,mBACA,iBACA,gBACA,kBACA,cACA,mBACA,SACA,aACA,kBACA,YACA,iBACA,cACA,mBACA,UACA,KACA,qBACA,SACA,eACA,aACA,aACA,eACA,YACA,cACA,UACA,UACA,KACA,SACA,WACA,aACA,kBACA,SACA,UACA,aACA,WACA,cACA,aACA,eACA,uBACA,gBACA,aACA,iBACA,eACA,iBACA,sBACA,mBACA,eACA,cACA,qBACA,oBACA,gBACA,gBACA,wBACA,iBACA,iBACA,YACA,SACA,WACA,aACA,WACA,WACA,wBACA,wBACA,0BACA,YACA,mBACA,OACA,eACA,WACA,mBACA,uBACA,aACA,UACA,UACA,4BACA,aACA,gBACA,kBACA,SACA,cACA,QACA,kBACA,gBACA,mBACA,oBACA,aACA,eACA,gBACA,iBACA,sBACA,oBACA,0BACA,YACA,gBACA,SACA,YACA,cACA,cACA,aACA,cACA,SACA,mBACA,YACA,cACA,QACA,UACA,UACA,UACA,gBACA,SACA,iBACA,WACA,UACA,YACA,aACA,qBACA,oBACA,kBACA,eACA,iBACA,sBACA,eACA,SACA,iBACA,6BACA,aACA,UACA,YACA,YACA,aACA,UACA,mBACA,mBACA,gBACA,SACA,eACA,mBACA,YACA,cACA,gBACA,uBACA,OACA,SACA,YACA,cACA,eACA,eACA,cACA,aACA,cACA,YACA,eACA,SACA,YACA,cACA,wBACA,uBACA,yBACA,yBACA,wBACA,kBACA,uBACA,sBACA,oBACA,uBACA,iBACA,kBACA,mBACA,iBACA,wBACA,mBACA,yBACA,+BACA,cACA,wBACA,oBACA,kBACA,mBACA,mBACA,mBACA,kBACA,iBACA,kBACA,gBACA,kCACA,qBACA,sBACA,YACA,aACA,aACA,YACA,WACA,SACA,sBACA,eACA,aACA,aACA,UACA,UACA,SACA,YACA,sBACA,kBACA,gBACA,iBACA,iBACA,sBACA,qBACA,gBACA,eACA,gBACA,cACA,aACA,aACA,mBACA,eACA,qBACA,iBACA,gBACA,UACA,WACA,cACA,gBACA,6BACA,WACA,WACA,aACA,YACA,eACA,iBACA,WACA,WACA,WACA,YACA,WACA,oBACA,gBACA,SACA,yBACA,aACA,eACA,cACA,gBACA,YACA,UACA,gBACA,SACA,YACA,kBACA,WACA,YACA,YACA,cACA,YACA,eACA,WACA,gBACA,aACA,cACA,eACA,kBACA,WACA,gBACA,kBACA,kBACA,kBACA,kBACA,iBACA,YACA,YACA,uBACA,6BACA,yBACA,iDACA,2BACA,0BACA,mBACA,mBACA,qBACA,kBACA,4BACA,4CACA,4BACA,2BACA,mCACA,wBACA,UACA,SACA,UACA,OACA,aACA,eACA,gBACA,SACA,QACA,gBACA,WACA,MACA,UACA,UACA,QACA,SACA,SACA,UACA,MACA,SACA,cACA,aACA,cACA,SACA,iBACA,UACA,QACA,YACA,cACA,YACA,aACA,UACA,gBACA,iBACA,gBACA,gBACA,eACA,gBACA,eACA,eACA,eACA,WACA,aACA,aACA,YACA,YACA,mBACA,aACA,gBACA,eACA,YACA,YACA,kBACA,gBACA,KACA,KACA,KACA,KACA,MACA,UACA,iBACA,eACA,gBACA,cACA,gBACA,cACA,eACA,aACA,OACA,mBACA,oBACA,oBACA,iBACA,kBACA,kBACA,YACA,QACA,cACA,QACA,cACA,QACA,cACA,aACA,gBACA,YACA,UACA,eACA,SACA,gBACA,aACA,aACA,mBACA,iBACA,eACA,QACA,aACA,kBACA,WACA,eACA,UACA,WACA,YACA,OACA,aACA,cACA,cACA,sBACA,WACA,UACA,sBACA,kBACA,mBACA,eACA,QACA,kBACA,cACA,SACA,UACA,cACA,aACA,YACA,cACA,cACA,qBACA,oBACA,qBACA,oBACA,QACA,OACA,QACA,cACA,aACA,cACA,YACA,aACA,cACA,WACA,yBACA,yBACA,aACA,cACA,WACA,OACA,eACA,gBACA,eACA,SACA,UACA,cACA,QACA,iBACA,6BACA,iBACA,gBACA,YACA,qBACA,cACA,SACA,YACA,YACA,YACA,gBACA,MACA,sBACA,kBACA,iBACA,OACA,QACA,QACA,QACA,YACA,YACA,UACA,WACA,SACA,WACA,WACA,gBACA,YACA,cACA,SACA,MACA,WACA,kBACA,YACA,yBACA,yBACA,SACA,UACA,UACA,gBACA,sBACA,4BACA,UACA,WACA,YACA,iBACA,oBACA,yBACA,eACA,eACA,gBACA,kBACA,oBACA,aACA,gBACA,iBACA,aACA,QACA,aACA,0BACA,UACA,oBACA,UACA,aACA,UACA,aACA,WACA,SACA,aACA,uBACA,eACA,WACA,eACA,YACA,cACA,gBACA,WACA,YACA,YACA,OACA,mBACA,YACA,MACA,eACA,mBACA,YACA,sBACA,uBACA,oBACA,wBACA,mBACA,oBACA,gBACA,mBACA,QACA,SACA,IACA,KACA,KACA,OACA,aACA,UACA,UACA,SACA,QACA,aACA,WACA,WACA,cACA,gBACA,cACA,iBACA,OACA,QACA,MACA,OACA,oBACA,qBACA,aACA,gBACA,aACA,WACA,aACA,sBACA,aACA,SACA,SACA,WACA,YACA,eACA,YACA,OACA,MACA,gBACA,cACA,gBACA,SACA,cACA,YACA,cACA,OACA,OACA,gBACA,WACA,UACA,SACA,gBACA,gBACA,WACA,UACA,WACA,yBACA,kBACA,0BACA,SACA,MACA,UACA,cACA,gBACA,UACA,iBACA,gBACA,wBACA,wBACA,WACA,SACA,iBACA,oBACA,SACA,kBACA,kBACA,oBACA,sBACA,iBACA,cACA,YACA,sBACA,eACA,eACA,aACA,iBACA,kBACA,oBACA,aACA,kBACA,iBACA,cACA,eACA,aACA,sCACA,qBACA,eACA,cACA,iBACA,yBACA,iCACA,eACA,sBACA,iBACA,gBACA,SACA,UACA,sBACA,eACA,cACA,YACA,cACA,cACA,eACA,eACA,mBACA,iBACA,wBACA,sBACA,cACA,oBACA,8BACA,oBACA,qBACA,eACA,mBACA,WACA,qBACA,mBACA,QACA,iBACA,SACA,WACA,WACA,UACA,WACA,eACA,cACA,gBACA,eACA,eACA,cACA,cACA,UACA,SACA,aACA,SACA,cACA,MACA,UACA,WACA,YACA,kBACA,WACA,QACA,eACA,cACA,gBACA,OACA,cACA,SACA,kBACA,sBACA,mBACA,uBACA,aACA,WACA,eACA,QACA,WACA,UACA,OACA,YACA,eACA,eACA,QACA,UACA,eACA,KACA,KACA,SACA,iBACA,aACA,UACA,OACA,QACA,UACA,cACA,kBACA,sBACA,YACA,SACA,UACA,QACA,YACA,SACA,SACA,mBACA,gBACA,aACA,2BACA,2BACA,YACA,UACA,UACA,UACA,SACA,kBACA,eACA,iBACA,WACA,gBACA,gBACA,cACA,eACA,iBACA,yBACA,aACA,gBACA,aACA,aACA,WACA,YACA,eACA,cACA,UACA,UACA,wBACA,sBACA,qBACA,2BACA,qBACA,0BACA,uBACA,sBACA,aACA,YACA,MACA,gBACA,SACA,OACA,SACA,YACA,uBACA,eACA,kBACA,wBACA,WACA,OACA,WACA,UACA,SACA,oBACA,aACA,qBACA,cACA,mBACA,kBACA,WACA,gBACA,kBACA,wBACA,wBACA,YACA,qBACA,eACA,iBACA,WACA,eACA,OACA,OACA,eACA,aACA,SACA,gBACA,YACA,oBACA,gBACA,YACA,iBACA,MACA,YACA,WACA,eACA,iBACA,mBACA,qBACA,mBACA,8BACA,aACA,WACA,wBACA,iBACA,oBACA,UACA,UACA,eACA,SACA,cACA,eACA,cACA,eACA,eACA,aACA,aACA,gBACA,cACA,WACA,eACA,WACA,WACA,UACA,cACA,UACA,aACA,cACA,cACA,eACA,sBACA,YACA,iBACA,eACA,kBACA,aACA,gBACA,WACA,eACA,iBACA,2BACA,mBACA,kBACA,iBACA,mCACA,WACA,eACA,kBACA,oBACA,cACA,gBACA,cACA,iBACA,cACA,sBACA,YACA,eACA,uBACA,mBACA,eACA,8BACA,YACA,WACA,aACA,oBACA,uBACA,YACA,WACA,WACA,WACA,gBACA,iBACA,kBACA,iBACA,iBACA,mBACA,kBACA,uBACA,UACA,aACA,eACA,eACA,aACA,iBACA,cACA,qBACA,gBACA,cACA,gBACA,YACA,YACA,WACA,SACA,iBACA,sBACA,cACA,cACA,aACA,UACA,cACA,eACA,MACA,eACA,aACA,cACA,gBACA,gBACA,aACA,QACA,kBACA,iBACA,QACA,QACA,WACA,YACA,OACA,WACA,YACA,kBACA,qBACA,mBACA,UACA,OACA,iBACA,MACA,kBACA,OACA,OACA,gBACA,QACA,QACA,YACA,QACA,YACA,QACA,QACA,QACA,SACA,OACA,wBACA,cACA,eACA,iBACA,OACA,OACA,SACA,eACA,gBACA,cACA,UACA,OACA,UACA,WACA,YACA,mBACA,mBACA,kBACA,QACA,eACA,aACA,SACA,QACA,YACA,eACA,OACA,MACA,aACA,YACA,SACA,SACA,UACA,SACA,QACA,kBACA,aACA,aACA,UACA,QACA,iBACA,WACA,cACA,iBACA,YACA,aACA,QACA,SACA,gBACA,aACA,YACA,gBACA,gBACA,cACA,sBACA,cACA,sBACA,YACA,oBACA,OACA,WACA,eACA,SACA,SACA,cACA,OACA,aACA,eACA,YACA,2BACA,cACA,kBACA,cACA,cACA,gBACA,qCACA,gCACA,aACA,SACA,SACA,cACA,YACA,SACA,mBACA,oBACA,iBACA,kBACA,oBACA,iBACA,eACA,kBACA,mBACA,gBACA,iBACA,mBACA,gBACA,aACA,cACA,aACA,cACA,QACA,aACA,aACA,aACA,iBACA,cACA,MACA,WACA,UACA,SACA,YACA,SACA,YACA,gBACA,SACA,UACA,SACA,WACA,UACA,MACA,WACA,eACA,mBACA,UACA,gBACA,YACA,WACA,YACA,UACA,SACA,aACA,WACA,iBACA,aACA,aACA,UACA,QACA,QACA,WACA,QACA,eACA,cACA,cACA,MACA,UACA,SACA,OACA,eACA,cACA,MACA,OACA,SACA,gBACA,gBACA,UACA,UACA,MACA,YACA,OACA,aACA,gBACA,gBACA,gBACA,OACA,aACA,cACA,kBACA,wBACA,uBACA,wBACA,cACA,gBACA,iBACA,cACA,iBACA,YACA,gBACA,aACA,gBACA,eACA,cACA,iBACA,sBACA,sBACA,qBACA,4BACA,qBACA,yBACA,sBACA,0BACA,aACA,cACA,kBACA,cACA,mBACA,aACA,eACA,gBACA,aACA,aACA,gBACA,wBACA,OACA,WACA,YACA,QACA,QACA,OACA,UACA,YACA,UACA,YACA,kBACA,SACA,QACA,UACA,SACA,YACA,eACA,YACA,gBACA,UACA,iBACA,iBACA,cACA,cACA,SACA,qBACA,iBACA,oBACA,iBACA,qBACA,oBACA,cACA,WACA,cACA,QACA,WACA,eACA,WACA,cACA,eACA,cACA,cACA,SACA,yBACA,UACA,UACA,MACA,YACA,QACA,kBACA,mBACA,cACA,UACA,QACA,QACA,cACA,eACA,YACA,mBACA,kBACA,kBACA,iBACA,kBACA,iBACA,sBACA,sBACA,aACA,mBACA,sBACA,sBACA,6BACA,kBACA,qBACA,qBACA,2BACA,YACA,gBACA,eACA,eACA,OACA,WACA,YACA,YACA,QACA,WACA,OACA,aACA,eACA,gBACA,QACA,SACA,YACA,WACA,SACA,eACA,cACA,YACA,aACA,YACA,aACA,YACA,aACA,YACA,aACA,YACA,aACA,YACA,aACA,YACA,aACA,YACA,aACA,mBACA,mBACA,mBACA,SACA,WACA,eACA,WACA,QACA,iBACA,mBACA,SACA,UACA,YACA,UACA,oBACA,cACA,aACA,2BACA,4BACA,cACA,eACA,UACA,cACA,kBACA,qBACA,UACA,YACA,SACA,iBACA,YACA,iBACA,iBACA,UACA,WACA,SACA,QACA,aACA,YACA,MACA,MACA,MACA,OACA,SACA,iBACA,SACA,aACA,YACA,YACA,eACA,WACA,kBACA,SACA,QACA,QACA,kBACA,oBACA,WACA,QACA,cACA,gBACA,gBACA,wBACA,eACA,UACA,YACA,YACA,SACA,gBACA,eACA,kBACA,oBACA,YACA,YACA,SACA,YACA,SACA,UACA,iBACA,kBACA,iBACA,kBACA,iBACA,kBACA,iBACA,kBACA,2BACA,sBACA,WACA,iBACA,gBACA,mBACA,UACA,cACA,cACA,aACA,OACA,UACA,gBACA,aACA,mBACA,WACA,kBACA,kBACA,kBACA,aACA,kBACA,UACA,aACA,QACA,SACA,OACA,SACA,IACA,OACA,OACA,WACA,QACA,gBACA,YACA,eACA,kBACA,uBACA,2BACA,0BACA,0BACA,gCACA,sBACA,2BACA,gCACA,mBACA,qBACA,8BACA,wBACA,2BACA,mBACA,6BACA,uBACA,wBACA,wBACA,yBACA,2BACA,4BACA,4BACA,yBACA,uBACA,+BACA,oBACA,0BACA,0BACA,yBACA,0BACA,yBACA,iBACA,qBACA,gBACA,wBACA,kBACA,gBACA,kBACA,6BACA,yBACA,yBACA,oCACA,6BACA,8BACA,mCACA,mCACA,yBACA,iCACA,wCACA,oCACA,6BACA,wBACA,wBACA,uBACA,uBACA,wBACA,uCACA,0BACA,0BACA,2BACA,mBACA,yBACA,mBACA,yBACA,yBACA,sBACA,oBACA,uBACA,sBACA,4BACA,qBACA,0BACA,eACA,kBACA,oBACA,yBACA,6BACA,mBACA,iBACA,oBACA,uBACA,mBACA,uBACA,8BACA,kBACA,yBACA,qBACA,aACA,uBACA,wBACA,wBACA,oBACA,sBACA,4BACA,oBACA,yBACA,0BACA,2BACA,oBACA,uBACA,uBACA,0BACA,sBACA,8BACA,0BACA,0BACA,0BACA,2BACA,kCACA,qBACA,oCACA,mBACA,iCACA,cACA,sBACA,0BACA,0BACA,+BACA,+BACA,oBACA,2BACA,yBACA,uBACA,kBACA,wBACA,mBACA,wBACA,2BACA,2BACA,iCACA,YACA,0BACA,mBACA,8BACA,wBACA,sCACA,iBACA,WACA,SACA,aACA,aACA,cACA,cACA,QACA,cACA,aACA,YACA,SACA,QACA,cACA,aACA,eACA,SACA,kBACA,aACA,eACA,YACA,YACA,cACA,WACA,OACA,UACA,QACA,UACA,cACA,IACA,KACA,KACA,mBACA,cACA,gBACA,aACA,UACA,UACA,WACA,IACA,KACA,KACA,mBACA,SACA,IACA,UACA,SACA,OACA,aACA,kBCr4KJ,SAASC,GAAoBhF,EAAK7Z,GAC9B,SAASxc,EAAIhb,GACTqD,EAAUm0B,EAAUx3B,GAGxBqxC,EAAIrqB,KAAK,IAAIW,IAAW,SAASnhB,GACzBA,aAAgB8V,IAAoB9V,EAAK6H,MACzC2M,EAAIxU,EAAK1B,KACF0B,aAAgBse,IAAsBte,EAAK6H,MAClD2M,EAAIxU,EAAK1B,IAAI9E,MACNwG,aAAgBod,IACvB0yB,GAAW9vC,EAAKgW,SAAUxB,OAKtC,SAASs7B,GAAW9vC,EAAMwU,GACtBxU,EAAKwgB,KAAK,IAAIW,IAAW,SAASnhB,GAS9B,OARIA,aAAgB6Z,GAChBi2B,GAAW9vC,EAAKu0B,YAAa/f,GACtBxU,aAAgBqN,GACvBmH,EAAIxU,EAAKzB,OACFyB,aAAgBme,KACvB2xB,GAAW9vC,EAAKoe,WAAY5J,GAC5Bs7B,GAAW9vC,EAAKoR,YAAaoD,KAE1B,MAIf,SAASu7B,GAAkBlF,EAAKrgC,GAY5B,IAAIwlC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B47C,IAAyBA,EAAe,IAC5CA,EAAajgD,KAAKqE,GAClB,IAAI6qC,EAAc,MAAR7qC,EAAeA,EAAKw7C,eAAeI,EAAaA,EAAa1/C,OAAS,IAAM,KAGtF,OAFA0/C,EAAazzC,MACe,IAAxByzC,EAAa1/C,SAAgB0/C,EAAe,MACzC/Q,EAGX,SAASsQ,IAEL,IADA,IAAI5gD,EAAIqhD,EAAa1/C,OACd3B,KACH,GAAIqhD,EAAarhD,aAAc2V,GAC3B,OAAO,EAGf,OAAO,EAGX,SAASyqC,EAAa36C,GAClB,MAAO,CACHsD,KAAM,iBACN8J,KAAMpN,EAAKoN,KAAK/O,IAAIq8C,IAI5B,SAASE,EAAat3C,EAAMtD,GACxB,IAAIoN,EAAOpN,EAAKoN,KAAK/O,IAAIq8C,GAIzB,OAHI16C,EAAKoN,KAAK,aAAcsF,IAAuB1S,EAAKoN,KAAK,GAAGA,gBAAgBC,IAC5ED,EAAK4M,QAAQ0gC,EAAO,IAAI3rC,GAAmB/O,EAAKoN,KAAK,MAElD,CACH9J,KAAMA,EACN8J,KAAMA,IAriClB,uwEDxJO,WACH,MAAMrT,EAAO,GASb,OAPA8E,OAAO6lC,KAAK0R,GAAc,CAAEyF,EAAG,KAAMrtC,QAASstC,IAC1C,MAAMtxC,EAAU4rC,GAAc,CAC1Bv8C,CAACiiD,GAAY,CAACD,EAAG,KAGjBrxC,IAASzQ,EAAK+hD,GAAatxC,KAE5BzQ"} \ No newline at end of file diff --git a/public/node_modules/_terser@4.5.1@terser/node_modules/commander b/public/node_modules/_terser@4.5.1@terser/node_modules/commander new file mode 120000 index 000000000..be8df6dc1 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/node_modules/commander @@ -0,0 +1 @@ +../../_commander@2.20.3@commander \ No newline at end of file diff --git a/public/node_modules/_terser@4.5.1@terser/node_modules/source-map b/public/node_modules/_terser@4.5.1@terser/node_modules/source-map new file mode 120000 index 000000000..891e694ba --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/node_modules/source-map @@ -0,0 +1 @@ +../../_source-map@0.6.1@source-map \ No newline at end of file diff --git a/public/node_modules/_terser@4.5.1@terser/node_modules/source-map-support b/public/node_modules/_terser@4.5.1@terser/node_modules/source-map-support new file mode 120000 index 000000000..b02bd76ab --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/node_modules/source-map-support @@ -0,0 +1 @@ +../../_source-map-support@0.5.16@source-map-support \ No newline at end of file diff --git a/public/node_modules/_terser@4.5.1@terser/package.json b/public/node_modules/_terser@4.5.1@terser/package.json new file mode 100644 index 000000000..810050973 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/package.json @@ -0,0 +1,125 @@ +{ + "name": "terser", + "description": "JavaScript parser, mangler/compressor and beautifier toolkit for ES6+", + "homepage": "https://terser.org", + "author": "Mihai Bazon (http://lisperator.net/)", + "license": "BSD-2-Clause", + "version": "4.5.1", + "engines": { + "node": ">=6.0.0" + }, + "maintainers": [ + "Fábio Santos " + ], + "repository": "https://github.com/terser/terser", + "main": "dist/bundle.min.js", + "types": "tools/terser.d.ts", + "bin": { + "terser": "bin/terser" + }, + "files": [ + "bin", + "dist", + "tools", + "LICENSE", + "README.md", + "CHANGELOG.md", + "PATRONS.md" + ], + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "devDependencies": { + "acorn": "^7.0.0", + "astring": "^1.4.1", + "eslint": "^6.3.0", + "eslump": "^2.0.0", + "mocha": "^5.2.0", + "mochallel": "^2.0.0", + "pre-commit": "^1.2.2", + "rimraf": "^3.0.0", + "rollup": "^1.20.3", + "rollup-plugin-terser": "^5.1.1", + "semver": "^6.3.0" + }, + "scripts": { + "test": "npm run build -- --configTest && node test/run-tests.js", + "test:compress": "npm run build -- --configTest && node test/compress.js", + "test:mocha": "npm run build -- --configTest && node test/mocha.js", + "lint": "eslint lib", + "lint-fix": "eslint --fix lib", + "build": "rimraf dist/* && rollup --config --silent", + "prepare": "npm run build", + "postversion": "echo 'Remember to update the changelog!'" + }, + "keywords": [ + "uglify", + "terser", + "uglify-es", + "uglify-js", + "minify", + "minifier", + "javascript", + "ecmascript", + "es5", + "es6", + "es7", + "es8", + "es2015", + "es2016", + "es2017", + "async", + "await" + ], + "eslintConfig": { + "parserOptions": { + "sourceType": "module" + }, + "env": { + "es6": true + }, + "globals": { + "describe": false, + "it": false, + "require": false, + "global": false, + "process": false + }, + "rules": { + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "quotes": [ + "error", + "double", + "avoid-escape" + ], + "no-debugger": "error", + "no-undef": "error", + "no-tabs": "error", + "semi": [ + "error", + "always" + ], + "no-extra-semi": "error", + "no-irregular-whitespace": "error", + "space-before-blocks": [ + "error", + "always" + ] + } + }, + "pre-commit": [ + "lint-fix", + "test" + ], + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "terser@4.5.1", + "_resolved": "https://registry.npm.taobao.org/terser/download/terser-4.5.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_terser@4.5.1@terser/tools/colorless-console.js b/public/node_modules/_terser@4.5.1@terser/tools/colorless-console.js new file mode 100644 index 000000000..b65bb6275 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/tools/colorless-console.js @@ -0,0 +1,11 @@ +"use strict" + +if (Number((/([0-9]+)\./.exec(process.version) || [])[1]) >= 10) { + var Console = require("console").Console; + global.console = new Console({ + stdout: process.stdout, + stderr: process.stderr, + colorMode: false + }); +} + diff --git a/public/node_modules/_terser@4.5.1@terser/tools/domprops.js b/public/node_modules/_terser@4.5.1@terser/tools/domprops.js new file mode 100644 index 000000000..d2ca97b71 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/tools/domprops.js @@ -0,0 +1,5619 @@ +export var domprops = [ + "$&", + "$'", + "$*", + "$+", + "$1", + "$2", + "$3", + "$4", + "$5", + "$6", + "$7", + "$8", + "$9", + "$_", + "$`", + "$input", + "@@iterator", + "ABORT_ERR", + "ACTIVE", + "ACTIVE_ATTRIBUTES", + "ACTIVE_TEXTURE", + "ACTIVE_UNIFORMS", + "ADDITION", + "ALIASED_LINE_WIDTH_RANGE", + "ALIASED_POINT_SIZE_RANGE", + "ALLOW_KEYBOARD_INPUT", + "ALLPASS", + "ALPHA", + "ALPHA_BITS", + "ALT_MASK", + "ALWAYS", + "ANY_TYPE", + "ANY_UNORDERED_NODE_TYPE", + "ARRAY_BUFFER", + "ARRAY_BUFFER_BINDING", + "ATTACHED_SHADERS", + "ATTRIBUTE_NODE", + "AT_TARGET", + "AddSearchProvider", + "AnalyserNode", + "AnimationEvent", + "AnonXMLHttpRequest", + "ApplicationCache", + "ApplicationCacheErrorEvent", + "Array", + "ArrayBuffer", + "Attr", + "Audio", + "AudioBuffer", + "AudioBufferSourceNode", + "AudioContext", + "AudioDestinationNode", + "AudioListener", + "AudioNode", + "AudioParam", + "AudioProcessingEvent", + "AudioStreamTrack", + "AutocompleteErrorEvent", + "BACK", + "BAD_BOUNDARYPOINTS_ERR", + "BANDPASS", + "BLEND", + "BLEND_COLOR", + "BLEND_DST_ALPHA", + "BLEND_DST_RGB", + "BLEND_EQUATION", + "BLEND_EQUATION_ALPHA", + "BLEND_EQUATION_RGB", + "BLEND_SRC_ALPHA", + "BLEND_SRC_RGB", + "BLUE_BITS", + "BLUR", + "BOOL", + "BOOLEAN_TYPE", + "BOOL_VEC2", + "BOOL_VEC3", + "BOOL_VEC4", + "BOTH", + "BROWSER_DEFAULT_WEBGL", + "BUBBLING_PHASE", + "BUFFER_SIZE", + "BUFFER_USAGE", + "BYTE", + "BYTES_PER_ELEMENT", + "BarProp", + "BaseHref", + "BatteryManager", + "BeforeLoadEvent", + "BeforeUnloadEvent", + "BiquadFilterNode", + "Blob", + "BlobEvent", + "Boolean", + "CAPTURING_PHASE", + "CCW", + "CDATASection", + "CDATA_SECTION_NODE", + "CHANGE", + "CHARSET_RULE", + "CHECKING", + "CLAMP_TO_EDGE", + "CLICK", + "CLOSED", + "CLOSING", + "COLOR_ATTACHMENT0", + "COLOR_BUFFER_BIT", + "COLOR_CLEAR_VALUE", + "COLOR_WRITEMASK", + "COMMENT_NODE", + "COMPILE_STATUS", + "COMPRESSED_RGBA_S3TC_DXT1_EXT", + "COMPRESSED_RGBA_S3TC_DXT3_EXT", + "COMPRESSED_RGBA_S3TC_DXT5_EXT", + "COMPRESSED_RGB_S3TC_DXT1_EXT", + "COMPRESSED_TEXTURE_FORMATS", + "CONNECTING", + "CONSTANT_ALPHA", + "CONSTANT_COLOR", + "CONSTRAINT_ERR", + "CONTEXT_LOST_WEBGL", + "CONTROL_MASK", + "COUNTER_STYLE_RULE", + "CSS", + "CSS2Properties", + "CSSCharsetRule", + "CSSConditionRule", + "CSSCounterStyleRule", + "CSSFontFaceRule", + "CSSFontFeatureValuesRule", + "CSSGroupingRule", + "CSSImportRule", + "CSSKeyframeRule", + "CSSKeyframesRule", + "CSSMediaRule", + "CSSMozDocumentRule", + "CSSNameSpaceRule", + "CSSPageRule", + "CSSPrimitiveValue", + "CSSRule", + "CSSRuleList", + "CSSStyleDeclaration", + "CSSStyleRule", + "CSSStyleSheet", + "CSSSupportsRule", + "CSSUnknownRule", + "CSSValue", + "CSSValueList", + "CSSVariablesDeclaration", + "CSSVariablesRule", + "CSSViewportRule", + "CSS_ATTR", + "CSS_CM", + "CSS_COUNTER", + "CSS_CUSTOM", + "CSS_DEG", + "CSS_DIMENSION", + "CSS_EMS", + "CSS_EXS", + "CSS_FILTER_BLUR", + "CSS_FILTER_BRIGHTNESS", + "CSS_FILTER_CONTRAST", + "CSS_FILTER_CUSTOM", + "CSS_FILTER_DROP_SHADOW", + "CSS_FILTER_GRAYSCALE", + "CSS_FILTER_HUE_ROTATE", + "CSS_FILTER_INVERT", + "CSS_FILTER_OPACITY", + "CSS_FILTER_REFERENCE", + "CSS_FILTER_SATURATE", + "CSS_FILTER_SEPIA", + "CSS_GRAD", + "CSS_HZ", + "CSS_IDENT", + "CSS_IN", + "CSS_INHERIT", + "CSS_KHZ", + "CSS_MATRIX", + "CSS_MATRIX3D", + "CSS_MM", + "CSS_MS", + "CSS_NUMBER", + "CSS_PC", + "CSS_PERCENTAGE", + "CSS_PERSPECTIVE", + "CSS_PRIMITIVE_VALUE", + "CSS_PT", + "CSS_PX", + "CSS_RAD", + "CSS_RECT", + "CSS_RGBCOLOR", + "CSS_ROTATE", + "CSS_ROTATE3D", + "CSS_ROTATEX", + "CSS_ROTATEY", + "CSS_ROTATEZ", + "CSS_S", + "CSS_SCALE", + "CSS_SCALE3D", + "CSS_SCALEX", + "CSS_SCALEY", + "CSS_SCALEZ", + "CSS_SKEW", + "CSS_SKEWX", + "CSS_SKEWY", + "CSS_STRING", + "CSS_TRANSLATE", + "CSS_TRANSLATE3D", + "CSS_TRANSLATEX", + "CSS_TRANSLATEY", + "CSS_TRANSLATEZ", + "CSS_UNKNOWN", + "CSS_URI", + "CSS_VALUE_LIST", + "CSS_VH", + "CSS_VMAX", + "CSS_VMIN", + "CSS_VW", + "CULL_FACE", + "CULL_FACE_MODE", + "CURRENT_PROGRAM", + "CURRENT_VERTEX_ATTRIB", + "CUSTOM", + "CW", + "CanvasGradient", + "CanvasPattern", + "CanvasRenderingContext2D", + "CaretPosition", + "ChannelMergerNode", + "ChannelSplitterNode", + "CharacterData", + "ClientRect", + "ClientRectList", + "Clipboard", + "ClipboardEvent", + "CloseEvent", + "Collator", + "CommandEvent", + "Comment", + "CompositionEvent", + "Console", + "Controllers", + "ConvolverNode", + "Counter", + "Crypto", + "CryptoKey", + "CustomEvent", + "DATABASE_ERR", + "DATA_CLONE_ERR", + "DATA_ERR", + "DBLCLICK", + "DECR", + "DECR_WRAP", + "DELETE_STATUS", + "DEPTH_ATTACHMENT", + "DEPTH_BITS", + "DEPTH_BUFFER_BIT", + "DEPTH_CLEAR_VALUE", + "DEPTH_COMPONENT", + "DEPTH_COMPONENT16", + "DEPTH_FUNC", + "DEPTH_RANGE", + "DEPTH_STENCIL", + "DEPTH_STENCIL_ATTACHMENT", + "DEPTH_TEST", + "DEPTH_WRITEMASK", + "DIRECTION_DOWN", + "DIRECTION_LEFT", + "DIRECTION_RIGHT", + "DIRECTION_UP", + "DISABLED", + "DISPATCH_REQUEST_ERR", + "DITHER", + "DOCUMENT_FRAGMENT_NODE", + "DOCUMENT_NODE", + "DOCUMENT_POSITION_CONTAINED_BY", + "DOCUMENT_POSITION_CONTAINS", + "DOCUMENT_POSITION_DISCONNECTED", + "DOCUMENT_POSITION_FOLLOWING", + "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", + "DOCUMENT_POSITION_PRECEDING", + "DOCUMENT_TYPE_NODE", + "DOMCursor", + "DOMError", + "DOMException", + "DOMImplementation", + "DOMImplementationLS", + "DOMMatrix", + "DOMMatrixReadOnly", + "DOMParser", + "DOMPoint", + "DOMPointReadOnly", + "DOMQuad", + "DOMRect", + "DOMRectList", + "DOMRectReadOnly", + "DOMRequest", + "DOMSTRING_SIZE_ERR", + "DOMSettableTokenList", + "DOMStringList", + "DOMStringMap", + "DOMTokenList", + "DOMTransactionEvent", + "DOM_DELTA_LINE", + "DOM_DELTA_PAGE", + "DOM_DELTA_PIXEL", + "DOM_INPUT_METHOD_DROP", + "DOM_INPUT_METHOD_HANDWRITING", + "DOM_INPUT_METHOD_IME", + "DOM_INPUT_METHOD_KEYBOARD", + "DOM_INPUT_METHOD_MULTIMODAL", + "DOM_INPUT_METHOD_OPTION", + "DOM_INPUT_METHOD_PASTE", + "DOM_INPUT_METHOD_SCRIPT", + "DOM_INPUT_METHOD_UNKNOWN", + "DOM_INPUT_METHOD_VOICE", + "DOM_KEY_LOCATION_JOYSTICK", + "DOM_KEY_LOCATION_LEFT", + "DOM_KEY_LOCATION_MOBILE", + "DOM_KEY_LOCATION_NUMPAD", + "DOM_KEY_LOCATION_RIGHT", + "DOM_KEY_LOCATION_STANDARD", + "DOM_VK_0", + "DOM_VK_1", + "DOM_VK_2", + "DOM_VK_3", + "DOM_VK_4", + "DOM_VK_5", + "DOM_VK_6", + "DOM_VK_7", + "DOM_VK_8", + "DOM_VK_9", + "DOM_VK_A", + "DOM_VK_ACCEPT", + "DOM_VK_ADD", + "DOM_VK_ALT", + "DOM_VK_ALTGR", + "DOM_VK_AMPERSAND", + "DOM_VK_ASTERISK", + "DOM_VK_AT", + "DOM_VK_ATTN", + "DOM_VK_B", + "DOM_VK_BACKSPACE", + "DOM_VK_BACK_QUOTE", + "DOM_VK_BACK_SLASH", + "DOM_VK_BACK_SPACE", + "DOM_VK_C", + "DOM_VK_CANCEL", + "DOM_VK_CAPS_LOCK", + "DOM_VK_CIRCUMFLEX", + "DOM_VK_CLEAR", + "DOM_VK_CLOSE_BRACKET", + "DOM_VK_CLOSE_CURLY_BRACKET", + "DOM_VK_CLOSE_PAREN", + "DOM_VK_COLON", + "DOM_VK_COMMA", + "DOM_VK_CONTEXT_MENU", + "DOM_VK_CONTROL", + "DOM_VK_CONVERT", + "DOM_VK_CRSEL", + "DOM_VK_CTRL", + "DOM_VK_D", + "DOM_VK_DECIMAL", + "DOM_VK_DELETE", + "DOM_VK_DIVIDE", + "DOM_VK_DOLLAR", + "DOM_VK_DOUBLE_QUOTE", + "DOM_VK_DOWN", + "DOM_VK_E", + "DOM_VK_EISU", + "DOM_VK_END", + "DOM_VK_ENTER", + "DOM_VK_EQUALS", + "DOM_VK_EREOF", + "DOM_VK_ESCAPE", + "DOM_VK_EXCLAMATION", + "DOM_VK_EXECUTE", + "DOM_VK_EXSEL", + "DOM_VK_F", + "DOM_VK_F1", + "DOM_VK_F10", + "DOM_VK_F11", + "DOM_VK_F12", + "DOM_VK_F13", + "DOM_VK_F14", + "DOM_VK_F15", + "DOM_VK_F16", + "DOM_VK_F17", + "DOM_VK_F18", + "DOM_VK_F19", + "DOM_VK_F2", + "DOM_VK_F20", + "DOM_VK_F21", + "DOM_VK_F22", + "DOM_VK_F23", + "DOM_VK_F24", + "DOM_VK_F25", + "DOM_VK_F26", + "DOM_VK_F27", + "DOM_VK_F28", + "DOM_VK_F29", + "DOM_VK_F3", + "DOM_VK_F30", + "DOM_VK_F31", + "DOM_VK_F32", + "DOM_VK_F33", + "DOM_VK_F34", + "DOM_VK_F35", + "DOM_VK_F36", + "DOM_VK_F4", + "DOM_VK_F5", + "DOM_VK_F6", + "DOM_VK_F7", + "DOM_VK_F8", + "DOM_VK_F9", + "DOM_VK_FINAL", + "DOM_VK_FRONT", + "DOM_VK_G", + "DOM_VK_GREATER_THAN", + "DOM_VK_H", + "DOM_VK_HANGUL", + "DOM_VK_HANJA", + "DOM_VK_HASH", + "DOM_VK_HELP", + "DOM_VK_HK_TOGGLE", + "DOM_VK_HOME", + "DOM_VK_HYPHEN_MINUS", + "DOM_VK_I", + "DOM_VK_INSERT", + "DOM_VK_J", + "DOM_VK_JUNJA", + "DOM_VK_K", + "DOM_VK_KANA", + "DOM_VK_KANJI", + "DOM_VK_L", + "DOM_VK_LEFT", + "DOM_VK_LEFT_TAB", + "DOM_VK_LESS_THAN", + "DOM_VK_M", + "DOM_VK_META", + "DOM_VK_MODECHANGE", + "DOM_VK_MULTIPLY", + "DOM_VK_N", + "DOM_VK_NONCONVERT", + "DOM_VK_NUMPAD0", + "DOM_VK_NUMPAD1", + "DOM_VK_NUMPAD2", + "DOM_VK_NUMPAD3", + "DOM_VK_NUMPAD4", + "DOM_VK_NUMPAD5", + "DOM_VK_NUMPAD6", + "DOM_VK_NUMPAD7", + "DOM_VK_NUMPAD8", + "DOM_VK_NUMPAD9", + "DOM_VK_NUM_LOCK", + "DOM_VK_O", + "DOM_VK_OEM_1", + "DOM_VK_OEM_102", + "DOM_VK_OEM_2", + "DOM_VK_OEM_3", + "DOM_VK_OEM_4", + "DOM_VK_OEM_5", + "DOM_VK_OEM_6", + "DOM_VK_OEM_7", + "DOM_VK_OEM_8", + "DOM_VK_OEM_COMMA", + "DOM_VK_OEM_MINUS", + "DOM_VK_OEM_PERIOD", + "DOM_VK_OEM_PLUS", + "DOM_VK_OPEN_BRACKET", + "DOM_VK_OPEN_CURLY_BRACKET", + "DOM_VK_OPEN_PAREN", + "DOM_VK_P", + "DOM_VK_PA1", + "DOM_VK_PAGEDOWN", + "DOM_VK_PAGEUP", + "DOM_VK_PAGE_DOWN", + "DOM_VK_PAGE_UP", + "DOM_VK_PAUSE", + "DOM_VK_PERCENT", + "DOM_VK_PERIOD", + "DOM_VK_PIPE", + "DOM_VK_PLAY", + "DOM_VK_PLUS", + "DOM_VK_PRINT", + "DOM_VK_PRINTSCREEN", + "DOM_VK_PROCESSKEY", + "DOM_VK_PROPERITES", + "DOM_VK_Q", + "DOM_VK_QUESTION_MARK", + "DOM_VK_QUOTE", + "DOM_VK_R", + "DOM_VK_REDO", + "DOM_VK_RETURN", + "DOM_VK_RIGHT", + "DOM_VK_S", + "DOM_VK_SCROLL_LOCK", + "DOM_VK_SELECT", + "DOM_VK_SEMICOLON", + "DOM_VK_SEPARATOR", + "DOM_VK_SHIFT", + "DOM_VK_SLASH", + "DOM_VK_SLEEP", + "DOM_VK_SPACE", + "DOM_VK_SUBTRACT", + "DOM_VK_T", + "DOM_VK_TAB", + "DOM_VK_TILDE", + "DOM_VK_U", + "DOM_VK_UNDERSCORE", + "DOM_VK_UNDO", + "DOM_VK_UNICODE", + "DOM_VK_UP", + "DOM_VK_V", + "DOM_VK_VOLUME_DOWN", + "DOM_VK_VOLUME_MUTE", + "DOM_VK_VOLUME_UP", + "DOM_VK_W", + "DOM_VK_WIN", + "DOM_VK_WINDOW", + "DOM_VK_WIN_ICO_00", + "DOM_VK_WIN_ICO_CLEAR", + "DOM_VK_WIN_ICO_HELP", + "DOM_VK_WIN_OEM_ATTN", + "DOM_VK_WIN_OEM_AUTO", + "DOM_VK_WIN_OEM_BACKTAB", + "DOM_VK_WIN_OEM_CLEAR", + "DOM_VK_WIN_OEM_COPY", + "DOM_VK_WIN_OEM_CUSEL", + "DOM_VK_WIN_OEM_ENLW", + "DOM_VK_WIN_OEM_FINISH", + "DOM_VK_WIN_OEM_FJ_JISHO", + "DOM_VK_WIN_OEM_FJ_LOYA", + "DOM_VK_WIN_OEM_FJ_MASSHOU", + "DOM_VK_WIN_OEM_FJ_ROYA", + "DOM_VK_WIN_OEM_FJ_TOUROKU", + "DOM_VK_WIN_OEM_JUMP", + "DOM_VK_WIN_OEM_PA1", + "DOM_VK_WIN_OEM_PA2", + "DOM_VK_WIN_OEM_PA3", + "DOM_VK_WIN_OEM_RESET", + "DOM_VK_WIN_OEM_WSCTRL", + "DOM_VK_X", + "DOM_VK_XF86XK_ADD_FAVORITE", + "DOM_VK_XF86XK_APPLICATION_LEFT", + "DOM_VK_XF86XK_APPLICATION_RIGHT", + "DOM_VK_XF86XK_AUDIO_CYCLE_TRACK", + "DOM_VK_XF86XK_AUDIO_FORWARD", + "DOM_VK_XF86XK_AUDIO_LOWER_VOLUME", + "DOM_VK_XF86XK_AUDIO_MEDIA", + "DOM_VK_XF86XK_AUDIO_MUTE", + "DOM_VK_XF86XK_AUDIO_NEXT", + "DOM_VK_XF86XK_AUDIO_PAUSE", + "DOM_VK_XF86XK_AUDIO_PLAY", + "DOM_VK_XF86XK_AUDIO_PREV", + "DOM_VK_XF86XK_AUDIO_RAISE_VOLUME", + "DOM_VK_XF86XK_AUDIO_RANDOM_PLAY", + "DOM_VK_XF86XK_AUDIO_RECORD", + "DOM_VK_XF86XK_AUDIO_REPEAT", + "DOM_VK_XF86XK_AUDIO_REWIND", + "DOM_VK_XF86XK_AUDIO_STOP", + "DOM_VK_XF86XK_AWAY", + "DOM_VK_XF86XK_BACK", + "DOM_VK_XF86XK_BACK_FORWARD", + "DOM_VK_XF86XK_BATTERY", + "DOM_VK_XF86XK_BLUE", + "DOM_VK_XF86XK_BLUETOOTH", + "DOM_VK_XF86XK_BOOK", + "DOM_VK_XF86XK_BRIGHTNESS_ADJUST", + "DOM_VK_XF86XK_CALCULATOR", + "DOM_VK_XF86XK_CALENDAR", + "DOM_VK_XF86XK_CD", + "DOM_VK_XF86XK_CLOSE", + "DOM_VK_XF86XK_COMMUNITY", + "DOM_VK_XF86XK_CONTRAST_ADJUST", + "DOM_VK_XF86XK_COPY", + "DOM_VK_XF86XK_CUT", + "DOM_VK_XF86XK_CYCLE_ANGLE", + "DOM_VK_XF86XK_DISPLAY", + "DOM_VK_XF86XK_DOCUMENTS", + "DOM_VK_XF86XK_DOS", + "DOM_VK_XF86XK_EJECT", + "DOM_VK_XF86XK_EXCEL", + "DOM_VK_XF86XK_EXPLORER", + "DOM_VK_XF86XK_FAVORITES", + "DOM_VK_XF86XK_FINANCE", + "DOM_VK_XF86XK_FORWARD", + "DOM_VK_XF86XK_FRAME_BACK", + "DOM_VK_XF86XK_FRAME_FORWARD", + "DOM_VK_XF86XK_GAME", + "DOM_VK_XF86XK_GO", + "DOM_VK_XF86XK_GREEN", + "DOM_VK_XF86XK_HIBERNATE", + "DOM_VK_XF86XK_HISTORY", + "DOM_VK_XF86XK_HOME_PAGE", + "DOM_VK_XF86XK_HOT_LINKS", + "DOM_VK_XF86XK_I_TOUCH", + "DOM_VK_XF86XK_KBD_BRIGHTNESS_DOWN", + "DOM_VK_XF86XK_KBD_BRIGHTNESS_UP", + "DOM_VK_XF86XK_KBD_LIGHT_ON_OFF", + "DOM_VK_XF86XK_LAUNCH0", + "DOM_VK_XF86XK_LAUNCH1", + "DOM_VK_XF86XK_LAUNCH2", + "DOM_VK_XF86XK_LAUNCH3", + "DOM_VK_XF86XK_LAUNCH4", + "DOM_VK_XF86XK_LAUNCH5", + "DOM_VK_XF86XK_LAUNCH6", + "DOM_VK_XF86XK_LAUNCH7", + "DOM_VK_XF86XK_LAUNCH8", + "DOM_VK_XF86XK_LAUNCH9", + "DOM_VK_XF86XK_LAUNCH_A", + "DOM_VK_XF86XK_LAUNCH_B", + "DOM_VK_XF86XK_LAUNCH_C", + "DOM_VK_XF86XK_LAUNCH_D", + "DOM_VK_XF86XK_LAUNCH_E", + "DOM_VK_XF86XK_LAUNCH_F", + "DOM_VK_XF86XK_LIGHT_BULB", + "DOM_VK_XF86XK_LOG_OFF", + "DOM_VK_XF86XK_MAIL", + "DOM_VK_XF86XK_MAIL_FORWARD", + "DOM_VK_XF86XK_MARKET", + "DOM_VK_XF86XK_MEETING", + "DOM_VK_XF86XK_MEMO", + "DOM_VK_XF86XK_MENU_KB", + "DOM_VK_XF86XK_MENU_PB", + "DOM_VK_XF86XK_MESSENGER", + "DOM_VK_XF86XK_MON_BRIGHTNESS_DOWN", + "DOM_VK_XF86XK_MON_BRIGHTNESS_UP", + "DOM_VK_XF86XK_MUSIC", + "DOM_VK_XF86XK_MY_COMPUTER", + "DOM_VK_XF86XK_MY_SITES", + "DOM_VK_XF86XK_NEW", + "DOM_VK_XF86XK_NEWS", + "DOM_VK_XF86XK_OFFICE_HOME", + "DOM_VK_XF86XK_OPEN", + "DOM_VK_XF86XK_OPEN_URL", + "DOM_VK_XF86XK_OPTION", + "DOM_VK_XF86XK_PASTE", + "DOM_VK_XF86XK_PHONE", + "DOM_VK_XF86XK_PICTURES", + "DOM_VK_XF86XK_POWER_DOWN", + "DOM_VK_XF86XK_POWER_OFF", + "DOM_VK_XF86XK_RED", + "DOM_VK_XF86XK_REFRESH", + "DOM_VK_XF86XK_RELOAD", + "DOM_VK_XF86XK_REPLY", + "DOM_VK_XF86XK_ROCKER_DOWN", + "DOM_VK_XF86XK_ROCKER_ENTER", + "DOM_VK_XF86XK_ROCKER_UP", + "DOM_VK_XF86XK_ROTATE_WINDOWS", + "DOM_VK_XF86XK_ROTATION_KB", + "DOM_VK_XF86XK_ROTATION_PB", + "DOM_VK_XF86XK_SAVE", + "DOM_VK_XF86XK_SCREEN_SAVER", + "DOM_VK_XF86XK_SCROLL_CLICK", + "DOM_VK_XF86XK_SCROLL_DOWN", + "DOM_VK_XF86XK_SCROLL_UP", + "DOM_VK_XF86XK_SEARCH", + "DOM_VK_XF86XK_SEND", + "DOM_VK_XF86XK_SHOP", + "DOM_VK_XF86XK_SPELL", + "DOM_VK_XF86XK_SPLIT_SCREEN", + "DOM_VK_XF86XK_STANDBY", + "DOM_VK_XF86XK_START", + "DOM_VK_XF86XK_STOP", + "DOM_VK_XF86XK_SUBTITLE", + "DOM_VK_XF86XK_SUPPORT", + "DOM_VK_XF86XK_SUSPEND", + "DOM_VK_XF86XK_TASK_PANE", + "DOM_VK_XF86XK_TERMINAL", + "DOM_VK_XF86XK_TIME", + "DOM_VK_XF86XK_TOOLS", + "DOM_VK_XF86XK_TOP_MENU", + "DOM_VK_XF86XK_TO_DO_LIST", + "DOM_VK_XF86XK_TRAVEL", + "DOM_VK_XF86XK_USER1KB", + "DOM_VK_XF86XK_USER2KB", + "DOM_VK_XF86XK_USER_PB", + "DOM_VK_XF86XK_UWB", + "DOM_VK_XF86XK_VENDOR_HOME", + "DOM_VK_XF86XK_VIDEO", + "DOM_VK_XF86XK_VIEW", + "DOM_VK_XF86XK_WAKE_UP", + "DOM_VK_XF86XK_WEB_CAM", + "DOM_VK_XF86XK_WHEEL_BUTTON", + "DOM_VK_XF86XK_WLAN", + "DOM_VK_XF86XK_WORD", + "DOM_VK_XF86XK_WWW", + "DOM_VK_XF86XK_XFER", + "DOM_VK_XF86XK_YELLOW", + "DOM_VK_XF86XK_ZOOM_IN", + "DOM_VK_XF86XK_ZOOM_OUT", + "DOM_VK_Y", + "DOM_VK_Z", + "DOM_VK_ZOOM", + "DONE", + "DONT_CARE", + "DOWNLOADING", + "DRAGDROP", + "DST_ALPHA", + "DST_COLOR", + "DYNAMIC_DRAW", + "DataChannel", + "DataTransfer", + "DataTransferItem", + "DataTransferItemList", + "DataView", + "Date", + "DateTimeFormat", + "DelayNode", + "DesktopNotification", + "DesktopNotificationCenter", + "DeviceLightEvent", + "DeviceMotionEvent", + "DeviceOrientationEvent", + "DeviceProximityEvent", + "DeviceStorage", + "DeviceStorageChangeEvent", + "Document", + "DocumentFragment", + "DocumentType", + "DragEvent", + "DynamicsCompressorNode", + "E", + "ELEMENT_ARRAY_BUFFER", + "ELEMENT_ARRAY_BUFFER_BINDING", + "ELEMENT_NODE", + "EMPTY", + "ENCODING_ERR", + "ENDED", + "END_TO_END", + "END_TO_START", + "ENTITY_NODE", + "ENTITY_REFERENCE_NODE", + "EPSILON", + "EQUAL", + "EQUALPOWER", + "ERROR", + "EXPONENTIAL_DISTANCE", + "Element", + "ElementQuery", + "Entity", + "EntityReference", + "Error", + "ErrorEvent", + "EvalError", + "Event", + "EventException", + "EventSource", + "EventTarget", + "External", + "FASTEST", + "FIDOSDK", + "FILTER_ACCEPT", + "FILTER_INTERRUPT", + "FILTER_REJECT", + "FILTER_SKIP", + "FINISHED_STATE", + "FIRST_ORDERED_NODE_TYPE", + "FLOAT", + "FLOAT_MAT2", + "FLOAT_MAT3", + "FLOAT_MAT4", + "FLOAT_VEC2", + "FLOAT_VEC3", + "FLOAT_VEC4", + "FOCUS", + "FONT_FACE_RULE", + "FONT_FEATURE_VALUES_RULE", + "FRAGMENT_SHADER", + "FRAGMENT_SHADER_DERIVATIVE_HINT_OES", + "FRAMEBUFFER", + "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", + "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", + "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", + "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", + "FRAMEBUFFER_BINDING", + "FRAMEBUFFER_COMPLETE", + "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", + "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", + "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", + "FRAMEBUFFER_UNSUPPORTED", + "FRONT", + "FRONT_AND_BACK", + "FRONT_FACE", + "FUNC_ADD", + "FUNC_REVERSE_SUBTRACT", + "FUNC_SUBTRACT", + "Feed", + "FeedEntry", + "File", + "FileError", + "FileList", + "FileReader", + "FindInPage", + "Float32Array", + "Float64Array", + "FocusEvent", + "FontFace", + "FormData", + "Function", + "GENERATE_MIPMAP_HINT", + "GEQUAL", + "GREATER", + "GREEN_BITS", + "GainNode", + "Gamepad", + "GamepadButton", + "GamepadEvent", + "GestureEvent", + "HAVE_CURRENT_DATA", + "HAVE_ENOUGH_DATA", + "HAVE_FUTURE_DATA", + "HAVE_METADATA", + "HAVE_NOTHING", + "HEADERS_RECEIVED", + "HIDDEN", + "HIERARCHY_REQUEST_ERR", + "HIGHPASS", + "HIGHSHELF", + "HIGH_FLOAT", + "HIGH_INT", + "HORIZONTAL", + "HORIZONTAL_AXIS", + "HRTF", + "HTMLAllCollection", + "HTMLAnchorElement", + "HTMLAppletElement", + "HTMLAreaElement", + "HTMLAudioElement", + "HTMLBRElement", + "HTMLBaseElement", + "HTMLBaseFontElement", + "HTMLBlockquoteElement", + "HTMLBodyElement", + "HTMLButtonElement", + "HTMLCanvasElement", + "HTMLCollection", + "HTMLCommandElement", + "HTMLContentElement", + "HTMLDListElement", + "HTMLDataElement", + "HTMLDataListElement", + "HTMLDetailsElement", + "HTMLDialogElement", + "HTMLDirectoryElement", + "HTMLDivElement", + "HTMLDocument", + "HTMLElement", + "HTMLEmbedElement", + "HTMLFieldSetElement", + "HTMLFontElement", + "HTMLFormControlsCollection", + "HTMLFormElement", + "HTMLFrameElement", + "HTMLFrameSetElement", + "HTMLHRElement", + "HTMLHeadElement", + "HTMLHeadingElement", + "HTMLHtmlElement", + "HTMLIFrameElement", + "HTMLImageElement", + "HTMLInputElement", + "HTMLIsIndexElement", + "HTMLKeygenElement", + "HTMLLIElement", + "HTMLLabelElement", + "HTMLLegendElement", + "HTMLLinkElement", + "HTMLMapElement", + "HTMLMarqueeElement", + "HTMLMediaElement", + "HTMLMenuElement", + "HTMLMenuItemElement", + "HTMLMetaElement", + "HTMLMeterElement", + "HTMLModElement", + "HTMLOListElement", + "HTMLObjectElement", + "HTMLOptGroupElement", + "HTMLOptionElement", + "HTMLOptionsCollection", + "HTMLOutputElement", + "HTMLParagraphElement", + "HTMLParamElement", + "HTMLPictureElement", + "HTMLPreElement", + "HTMLProgressElement", + "HTMLPropertiesCollection", + "HTMLQuoteElement", + "HTMLScriptElement", + "HTMLSelectElement", + "HTMLShadowElement", + "HTMLSourceElement", + "HTMLSpanElement", + "HTMLStyleElement", + "HTMLTableCaptionElement", + "HTMLTableCellElement", + "HTMLTableColElement", + "HTMLTableElement", + "HTMLTableRowElement", + "HTMLTableSectionElement", + "HTMLTemplateElement", + "HTMLTextAreaElement", + "HTMLTimeElement", + "HTMLTitleElement", + "HTMLTrackElement", + "HTMLUListElement", + "HTMLUnknownElement", + "HTMLVideoElement", + "HashChangeEvent", + "Headers", + "History", + "ICE_CHECKING", + "ICE_CLOSED", + "ICE_COMPLETED", + "ICE_CONNECTED", + "ICE_FAILED", + "ICE_GATHERING", + "ICE_WAITING", + "IDBCursor", + "IDBCursorWithValue", + "IDBDatabase", + "IDBDatabaseException", + "IDBFactory", + "IDBFileHandle", + "IDBFileRequest", + "IDBIndex", + "IDBKeyRange", + "IDBMutableFile", + "IDBObjectStore", + "IDBOpenDBRequest", + "IDBRequest", + "IDBTransaction", + "IDBVersionChangeEvent", + "IDLE", + "IMPLEMENTATION_COLOR_READ_FORMAT", + "IMPLEMENTATION_COLOR_READ_TYPE", + "IMPORT_RULE", + "INCR", + "INCR_WRAP", + "INDEX_SIZE_ERR", + "INT", + "INT_VEC2", + "INT_VEC3", + "INT_VEC4", + "INUSE_ATTRIBUTE_ERR", + "INVALID_ACCESS_ERR", + "INVALID_CHARACTER_ERR", + "INVALID_ENUM", + "INVALID_EXPRESSION_ERR", + "INVALID_FRAMEBUFFER_OPERATION", + "INVALID_MODIFICATION_ERR", + "INVALID_NODE_TYPE_ERR", + "INVALID_OPERATION", + "INVALID_STATE_ERR", + "INVALID_VALUE", + "INVERSE_DISTANCE", + "INVERT", + "IceCandidate", + "Image", + "ImageBitmap", + "ImageData", + "Infinity", + "InputEvent", + "InputMethodContext", + "InstallTrigger", + "Int16Array", + "Int32Array", + "Int8Array", + "Intent", + "InternalError", + "Intl", + "IsSearchProviderInstalled", + "Iterator", + "JSON", + "KEEP", + "KEYDOWN", + "KEYFRAMES_RULE", + "KEYFRAME_RULE", + "KEYPRESS", + "KEYUP", + "KeyEvent", + "KeyboardEvent", + "LENGTHADJUST_SPACING", + "LENGTHADJUST_SPACINGANDGLYPHS", + "LENGTHADJUST_UNKNOWN", + "LEQUAL", + "LESS", + "LINEAR", + "LINEAR_DISTANCE", + "LINEAR_MIPMAP_LINEAR", + "LINEAR_MIPMAP_NEAREST", + "LINES", + "LINE_LOOP", + "LINE_STRIP", + "LINE_WIDTH", + "LINK_STATUS", + "LIVE", + "LN10", + "LN2", + "LOADED", + "LOADING", + "LOG10E", + "LOG2E", + "LOWPASS", + "LOWSHELF", + "LOW_FLOAT", + "LOW_INT", + "LSException", + "LSParserFilter", + "LUMINANCE", + "LUMINANCE_ALPHA", + "LocalMediaStream", + "Location", + "MAX_COMBINED_TEXTURE_IMAGE_UNITS", + "MAX_CUBE_MAP_TEXTURE_SIZE", + "MAX_FRAGMENT_UNIFORM_VECTORS", + "MAX_RENDERBUFFER_SIZE", + "MAX_SAFE_INTEGER", + "MAX_TEXTURE_IMAGE_UNITS", + "MAX_TEXTURE_MAX_ANISOTROPY_EXT", + "MAX_TEXTURE_SIZE", + "MAX_VALUE", + "MAX_VARYING_VECTORS", + "MAX_VERTEX_ATTRIBS", + "MAX_VERTEX_TEXTURE_IMAGE_UNITS", + "MAX_VERTEX_UNIFORM_VECTORS", + "MAX_VIEWPORT_DIMS", + "MEDIA_ERR_ABORTED", + "MEDIA_ERR_DECODE", + "MEDIA_ERR_ENCRYPTED", + "MEDIA_ERR_NETWORK", + "MEDIA_ERR_SRC_NOT_SUPPORTED", + "MEDIA_KEYERR_CLIENT", + "MEDIA_KEYERR_DOMAIN", + "MEDIA_KEYERR_HARDWARECHANGE", + "MEDIA_KEYERR_OUTPUT", + "MEDIA_KEYERR_SERVICE", + "MEDIA_KEYERR_UNKNOWN", + "MEDIA_RULE", + "MEDIUM_FLOAT", + "MEDIUM_INT", + "META_MASK", + "MIN_SAFE_INTEGER", + "MIN_VALUE", + "MIRRORED_REPEAT", + "MODE_ASYNCHRONOUS", + "MODE_SYNCHRONOUS", + "MODIFICATION", + "MOUSEDOWN", + "MOUSEDRAG", + "MOUSEMOVE", + "MOUSEOUT", + "MOUSEOVER", + "MOUSEUP", + "MOZ_KEYFRAMES_RULE", + "MOZ_KEYFRAME_RULE", + "MOZ_SOURCE_CURSOR", + "MOZ_SOURCE_ERASER", + "MOZ_SOURCE_KEYBOARD", + "MOZ_SOURCE_MOUSE", + "MOZ_SOURCE_PEN", + "MOZ_SOURCE_TOUCH", + "MOZ_SOURCE_UNKNOWN", + "MSGESTURE_FLAG_BEGIN", + "MSGESTURE_FLAG_CANCEL", + "MSGESTURE_FLAG_END", + "MSGESTURE_FLAG_INERTIA", + "MSGESTURE_FLAG_NONE", + "MSPOINTER_TYPE_MOUSE", + "MSPOINTER_TYPE_PEN", + "MSPOINTER_TYPE_TOUCH", + "MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE", + "MS_ASYNC_CALLBACK_STATUS_CANCEL", + "MS_ASYNC_CALLBACK_STATUS_CHOOSEANY", + "MS_ASYNC_CALLBACK_STATUS_ERROR", + "MS_ASYNC_CALLBACK_STATUS_JOIN", + "MS_ASYNC_OP_STATUS_CANCELED", + "MS_ASYNC_OP_STATUS_ERROR", + "MS_ASYNC_OP_STATUS_SUCCESS", + "MS_MANIPULATION_STATE_ACTIVE", + "MS_MANIPULATION_STATE_CANCELLED", + "MS_MANIPULATION_STATE_COMMITTED", + "MS_MANIPULATION_STATE_DRAGGING", + "MS_MANIPULATION_STATE_INERTIA", + "MS_MANIPULATION_STATE_PRESELECT", + "MS_MANIPULATION_STATE_SELECTING", + "MS_MANIPULATION_STATE_STOPPED", + "MS_MEDIA_ERR_ENCRYPTED", + "MS_MEDIA_KEYERR_CLIENT", + "MS_MEDIA_KEYERR_DOMAIN", + "MS_MEDIA_KEYERR_HARDWARECHANGE", + "MS_MEDIA_KEYERR_OUTPUT", + "MS_MEDIA_KEYERR_SERVICE", + "MS_MEDIA_KEYERR_UNKNOWN", + "Map", + "Math", + "MediaController", + "MediaDevices", + "MediaElementAudioSourceNode", + "MediaEncryptedEvent", + "MediaError", + "MediaKeyError", + "MediaKeyEvent", + "MediaKeyMessageEvent", + "MediaKeyNeededEvent", + "MediaKeySession", + "MediaKeyStatusMap", + "MediaKeySystemAccess", + "MediaKeys", + "MediaList", + "MediaQueryList", + "MediaQueryListEvent", + "MediaRecorder", + "MediaSource", + "MediaStream", + "MediaStreamAudioDestinationNode", + "MediaStreamAudioSourceNode", + "MediaStreamEvent", + "MediaStreamTrack", + "MediaStreamTrackEvent", + "MessageChannel", + "MessageEvent", + "MessagePort", + "Methods", + "MimeType", + "MimeTypeArray", + "MouseEvent", + "MouseScrollEvent", + "MozAnimation", + "MozAnimationDelay", + "MozAnimationDirection", + "MozAnimationDuration", + "MozAnimationFillMode", + "MozAnimationIterationCount", + "MozAnimationName", + "MozAnimationPlayState", + "MozAnimationTimingFunction", + "MozAppearance", + "MozBackfaceVisibility", + "MozBinding", + "MozBorderBottomColors", + "MozBorderEnd", + "MozBorderEndColor", + "MozBorderEndStyle", + "MozBorderEndWidth", + "MozBorderImage", + "MozBorderLeftColors", + "MozBorderRightColors", + "MozBorderStart", + "MozBorderStartColor", + "MozBorderStartStyle", + "MozBorderStartWidth", + "MozBorderTopColors", + "MozBoxAlign", + "MozBoxDirection", + "MozBoxFlex", + "MozBoxOrdinalGroup", + "MozBoxOrient", + "MozBoxPack", + "MozBoxSizing", + "MozCSSKeyframeRule", + "MozCSSKeyframesRule", + "MozColumnCount", + "MozColumnFill", + "MozColumnGap", + "MozColumnRule", + "MozColumnRuleColor", + "MozColumnRuleStyle", + "MozColumnRuleWidth", + "MozColumnWidth", + "MozColumns", + "MozContactChangeEvent", + "MozFloatEdge", + "MozFontFeatureSettings", + "MozFontLanguageOverride", + "MozForceBrokenImageIcon", + "MozHyphens", + "MozImageRegion", + "MozMarginEnd", + "MozMarginStart", + "MozMmsEvent", + "MozMmsMessage", + "MozMobileMessageThread", + "MozOSXFontSmoothing", + "MozOrient", + "MozOutlineRadius", + "MozOutlineRadiusBottomleft", + "MozOutlineRadiusBottomright", + "MozOutlineRadiusTopleft", + "MozOutlineRadiusTopright", + "MozPaddingEnd", + "MozPaddingStart", + "MozPerspective", + "MozPerspectiveOrigin", + "MozPowerManager", + "MozSettingsEvent", + "MozSmsEvent", + "MozSmsMessage", + "MozStackSizing", + "MozTabSize", + "MozTextAlignLast", + "MozTextDecorationColor", + "MozTextDecorationLine", + "MozTextDecorationStyle", + "MozTextSizeAdjust", + "MozTransform", + "MozTransformOrigin", + "MozTransformStyle", + "MozTransition", + "MozTransitionDelay", + "MozTransitionDuration", + "MozTransitionProperty", + "MozTransitionTimingFunction", + "MozUserFocus", + "MozUserInput", + "MozUserModify", + "MozUserSelect", + "MozWindowDragging", + "MozWindowShadow", + "MutationEvent", + "MutationObserver", + "MutationRecord", + "NAMESPACE_ERR", + "NAMESPACE_RULE", + "NEAREST", + "NEAREST_MIPMAP_LINEAR", + "NEAREST_MIPMAP_NEAREST", + "NEGATIVE_INFINITY", + "NETWORK_EMPTY", + "NETWORK_ERR", + "NETWORK_IDLE", + "NETWORK_LOADED", + "NETWORK_LOADING", + "NETWORK_NO_SOURCE", + "NEVER", + "NEW", + "NEXT", + "NEXT_NO_DUPLICATE", + "NICEST", + "NODE_AFTER", + "NODE_BEFORE", + "NODE_BEFORE_AND_AFTER", + "NODE_INSIDE", + "NONE", + "NON_TRANSIENT_ERR", + "NOTATION_NODE", + "NOTCH", + "NOTEQUAL", + "NOT_ALLOWED_ERR", + "NOT_FOUND_ERR", + "NOT_READABLE_ERR", + "NOT_SUPPORTED_ERR", + "NO_DATA_ALLOWED_ERR", + "NO_ERR", + "NO_ERROR", + "NO_MODIFICATION_ALLOWED_ERR", + "NUMBER_TYPE", + "NUM_COMPRESSED_TEXTURE_FORMATS", + "NaN", + "NamedNodeMap", + "Navigator", + "NearbyLinks", + "NetworkInformation", + "Node", + "NodeFilter", + "NodeIterator", + "NodeList", + "Notation", + "Notification", + "NotifyPaintEvent", + "Number", + "NumberFormat", + "OBSOLETE", + "ONE", + "ONE_MINUS_CONSTANT_ALPHA", + "ONE_MINUS_CONSTANT_COLOR", + "ONE_MINUS_DST_ALPHA", + "ONE_MINUS_DST_COLOR", + "ONE_MINUS_SRC_ALPHA", + "ONE_MINUS_SRC_COLOR", + "OPEN", + "OPENED", + "OPENING", + "ORDERED_NODE_ITERATOR_TYPE", + "ORDERED_NODE_SNAPSHOT_TYPE", + "OUT_OF_MEMORY", + "Object", + "OfflineAudioCompletionEvent", + "OfflineAudioContext", + "OfflineResourceList", + "Option", + "OscillatorNode", + "OverflowEvent", + "PACK_ALIGNMENT", + "PAGE_RULE", + "PARSE_ERR", + "PATHSEG_ARC_ABS", + "PATHSEG_ARC_REL", + "PATHSEG_CLOSEPATH", + "PATHSEG_CURVETO_CUBIC_ABS", + "PATHSEG_CURVETO_CUBIC_REL", + "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", + "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", + "PATHSEG_CURVETO_QUADRATIC_ABS", + "PATHSEG_CURVETO_QUADRATIC_REL", + "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", + "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", + "PATHSEG_LINETO_ABS", + "PATHSEG_LINETO_HORIZONTAL_ABS", + "PATHSEG_LINETO_HORIZONTAL_REL", + "PATHSEG_LINETO_REL", + "PATHSEG_LINETO_VERTICAL_ABS", + "PATHSEG_LINETO_VERTICAL_REL", + "PATHSEG_MOVETO_ABS", + "PATHSEG_MOVETO_REL", + "PATHSEG_UNKNOWN", + "PATH_EXISTS_ERR", + "PEAKING", + "PERMISSION_DENIED", + "PERSISTENT", + "PI", + "PLAYING_STATE", + "POINTS", + "POLYGON_OFFSET_FACTOR", + "POLYGON_OFFSET_FILL", + "POLYGON_OFFSET_UNITS", + "POSITION_UNAVAILABLE", + "POSITIVE_INFINITY", + "PREV", + "PREV_NO_DUPLICATE", + "PROCESSING_INSTRUCTION_NODE", + "PageChangeEvent", + "PageTransitionEvent", + "PaintRequest", + "PaintRequestList", + "PannerNode", + "Path2D", + "Performance", + "PerformanceEntry", + "PerformanceMark", + "PerformanceMeasure", + "PerformanceNavigation", + "PerformanceResourceTiming", + "PerformanceTiming", + "PeriodicWave", + "Plugin", + "PluginArray", + "PopStateEvent", + "PopupBlockedEvent", + "ProcessingInstruction", + "ProgressEvent", + "Promise", + "PropertyNodeList", + "Proxy", + "PushManager", + "PushSubscription", + "Q", + "QUOTA_ERR", + "QUOTA_EXCEEDED_ERR", + "QueryInterface", + "READ_ONLY", + "READ_ONLY_ERR", + "READ_WRITE", + "RED_BITS", + "REMOVAL", + "RENDERBUFFER", + "RENDERBUFFER_ALPHA_SIZE", + "RENDERBUFFER_BINDING", + "RENDERBUFFER_BLUE_SIZE", + "RENDERBUFFER_DEPTH_SIZE", + "RENDERBUFFER_GREEN_SIZE", + "RENDERBUFFER_HEIGHT", + "RENDERBUFFER_INTERNAL_FORMAT", + "RENDERBUFFER_RED_SIZE", + "RENDERBUFFER_STENCIL_SIZE", + "RENDERBUFFER_WIDTH", + "RENDERER", + "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC", + "RENDERING_INTENT_AUTO", + "RENDERING_INTENT_PERCEPTUAL", + "RENDERING_INTENT_RELATIVE_COLORIMETRIC", + "RENDERING_INTENT_SATURATION", + "RENDERING_INTENT_UNKNOWN", + "REPEAT", + "REPLACE", + "RGB", + "RGB565", + "RGB5_A1", + "RGBA", + "RGBA4", + "RGBColor", + "ROTATION_CLOCKWISE", + "ROTATION_COUNTERCLOCKWISE", + "RTCDataChannelEvent", + "RTCIceCandidate", + "RTCPeerConnectionIceEvent", + "RTCRtpReceiver", + "RTCRtpSender", + "RTCSessionDescription", + "RTCStatsReport", + "RadioNodeList", + "Range", + "RangeError", + "RangeException", + "RecordErrorEvent", + "Rect", + "ReferenceError", + "RegExp", + "Request", + "Response", + "SAMPLER_2D", + "SAMPLER_CUBE", + "SAMPLES", + "SAMPLE_ALPHA_TO_COVERAGE", + "SAMPLE_BUFFERS", + "SAMPLE_COVERAGE", + "SAMPLE_COVERAGE_INVERT", + "SAMPLE_COVERAGE_VALUE", + "SAWTOOTH", + "SCHEDULED_STATE", + "SCISSOR_BOX", + "SCISSOR_TEST", + "SCROLL_PAGE_DOWN", + "SCROLL_PAGE_UP", + "SDP_ANSWER", + "SDP_OFFER", + "SDP_PRANSWER", + "SECURITY_ERR", + "SELECT", + "SERIALIZE_ERR", + "SEVERITY_ERROR", + "SEVERITY_FATAL_ERROR", + "SEVERITY_WARNING", + "SHADER_COMPILER", + "SHADER_TYPE", + "SHADING_LANGUAGE_VERSION", + "SHIFT_MASK", + "SHORT", + "SHOWING", + "SHOW_ALL", + "SHOW_ATTRIBUTE", + "SHOW_CDATA_SECTION", + "SHOW_COMMENT", + "SHOW_DOCUMENT", + "SHOW_DOCUMENT_FRAGMENT", + "SHOW_DOCUMENT_TYPE", + "SHOW_ELEMENT", + "SHOW_ENTITY", + "SHOW_ENTITY_REFERENCE", + "SHOW_NOTATION", + "SHOW_PROCESSING_INSTRUCTION", + "SHOW_TEXT", + "SINE", + "SOUNDFIELD", + "SQLException", + "SQRT1_2", + "SQRT2", + "SQUARE", + "SRC_ALPHA", + "SRC_ALPHA_SATURATE", + "SRC_COLOR", + "START_TO_END", + "START_TO_START", + "STATIC_DRAW", + "STENCIL_ATTACHMENT", + "STENCIL_BACK_FAIL", + "STENCIL_BACK_FUNC", + "STENCIL_BACK_PASS_DEPTH_FAIL", + "STENCIL_BACK_PASS_DEPTH_PASS", + "STENCIL_BACK_REF", + "STENCIL_BACK_VALUE_MASK", + "STENCIL_BACK_WRITEMASK", + "STENCIL_BITS", + "STENCIL_BUFFER_BIT", + "STENCIL_CLEAR_VALUE", + "STENCIL_FAIL", + "STENCIL_FUNC", + "STENCIL_INDEX", + "STENCIL_INDEX8", + "STENCIL_PASS_DEPTH_FAIL", + "STENCIL_PASS_DEPTH_PASS", + "STENCIL_REF", + "STENCIL_TEST", + "STENCIL_VALUE_MASK", + "STENCIL_WRITEMASK", + "STREAM_DRAW", + "STRING_TYPE", + "STYLE_RULE", + "SUBPIXEL_BITS", + "SUPPORTS_RULE", + "SVGAElement", + "SVGAltGlyphDefElement", + "SVGAltGlyphElement", + "SVGAltGlyphItemElement", + "SVGAngle", + "SVGAnimateColorElement", + "SVGAnimateElement", + "SVGAnimateMotionElement", + "SVGAnimateTransformElement", + "SVGAnimatedAngle", + "SVGAnimatedBoolean", + "SVGAnimatedEnumeration", + "SVGAnimatedInteger", + "SVGAnimatedLength", + "SVGAnimatedLengthList", + "SVGAnimatedNumber", + "SVGAnimatedNumberList", + "SVGAnimatedPreserveAspectRatio", + "SVGAnimatedRect", + "SVGAnimatedString", + "SVGAnimatedTransformList", + "SVGAnimationElement", + "SVGCircleElement", + "SVGClipPathElement", + "SVGColor", + "SVGComponentTransferFunctionElement", + "SVGCursorElement", + "SVGDefsElement", + "SVGDescElement", + "SVGDiscardElement", + "SVGDocument", + "SVGElement", + "SVGElementInstance", + "SVGElementInstanceList", + "SVGEllipseElement", + "SVGException", + "SVGFEBlendElement", + "SVGFEColorMatrixElement", + "SVGFEComponentTransferElement", + "SVGFECompositeElement", + "SVGFEConvolveMatrixElement", + "SVGFEDiffuseLightingElement", + "SVGFEDisplacementMapElement", + "SVGFEDistantLightElement", + "SVGFEDropShadowElement", + "SVGFEFloodElement", + "SVGFEFuncAElement", + "SVGFEFuncBElement", + "SVGFEFuncGElement", + "SVGFEFuncRElement", + "SVGFEGaussianBlurElement", + "SVGFEImageElement", + "SVGFEMergeElement", + "SVGFEMergeNodeElement", + "SVGFEMorphologyElement", + "SVGFEOffsetElement", + "SVGFEPointLightElement", + "SVGFESpecularLightingElement", + "SVGFESpotLightElement", + "SVGFETileElement", + "SVGFETurbulenceElement", + "SVGFilterElement", + "SVGFontElement", + "SVGFontFaceElement", + "SVGFontFaceFormatElement", + "SVGFontFaceNameElement", + "SVGFontFaceSrcElement", + "SVGFontFaceUriElement", + "SVGForeignObjectElement", + "SVGGElement", + "SVGGeometryElement", + "SVGGlyphElement", + "SVGGlyphRefElement", + "SVGGradientElement", + "SVGGraphicsElement", + "SVGHKernElement", + "SVGImageElement", + "SVGLength", + "SVGLengthList", + "SVGLineElement", + "SVGLinearGradientElement", + "SVGMPathElement", + "SVGMarkerElement", + "SVGMaskElement", + "SVGMatrix", + "SVGMetadataElement", + "SVGMissingGlyphElement", + "SVGNumber", + "SVGNumberList", + "SVGPaint", + "SVGPathElement", + "SVGPathSeg", + "SVGPathSegArcAbs", + "SVGPathSegArcRel", + "SVGPathSegClosePath", + "SVGPathSegCurvetoCubicAbs", + "SVGPathSegCurvetoCubicRel", + "SVGPathSegCurvetoCubicSmoothAbs", + "SVGPathSegCurvetoCubicSmoothRel", + "SVGPathSegCurvetoQuadraticAbs", + "SVGPathSegCurvetoQuadraticRel", + "SVGPathSegCurvetoQuadraticSmoothAbs", + "SVGPathSegCurvetoQuadraticSmoothRel", + "SVGPathSegLinetoAbs", + "SVGPathSegLinetoHorizontalAbs", + "SVGPathSegLinetoHorizontalRel", + "SVGPathSegLinetoRel", + "SVGPathSegLinetoVerticalAbs", + "SVGPathSegLinetoVerticalRel", + "SVGPathSegList", + "SVGPathSegMovetoAbs", + "SVGPathSegMovetoRel", + "SVGPatternElement", + "SVGPoint", + "SVGPointList", + "SVGPolygonElement", + "SVGPolylineElement", + "SVGPreserveAspectRatio", + "SVGRadialGradientElement", + "SVGRect", + "SVGRectElement", + "SVGRenderingIntent", + "SVGSVGElement", + "SVGScriptElement", + "SVGSetElement", + "SVGStopElement", + "SVGStringList", + "SVGStyleElement", + "SVGSwitchElement", + "SVGSymbolElement", + "SVGTRefElement", + "SVGTSpanElement", + "SVGTextContentElement", + "SVGTextElement", + "SVGTextPathElement", + "SVGTextPositioningElement", + "SVGTitleElement", + "SVGTransform", + "SVGTransformList", + "SVGUnitTypes", + "SVGUseElement", + "SVGVKernElement", + "SVGViewElement", + "SVGViewSpec", + "SVGZoomAndPan", + "SVGZoomEvent", + "SVG_ANGLETYPE_DEG", + "SVG_ANGLETYPE_GRAD", + "SVG_ANGLETYPE_RAD", + "SVG_ANGLETYPE_UNKNOWN", + "SVG_ANGLETYPE_UNSPECIFIED", + "SVG_CHANNEL_A", + "SVG_CHANNEL_B", + "SVG_CHANNEL_G", + "SVG_CHANNEL_R", + "SVG_CHANNEL_UNKNOWN", + "SVG_COLORTYPE_CURRENTCOLOR", + "SVG_COLORTYPE_RGBCOLOR", + "SVG_COLORTYPE_RGBCOLOR_ICCCOLOR", + "SVG_COLORTYPE_UNKNOWN", + "SVG_EDGEMODE_DUPLICATE", + "SVG_EDGEMODE_NONE", + "SVG_EDGEMODE_UNKNOWN", + "SVG_EDGEMODE_WRAP", + "SVG_FEBLEND_MODE_COLOR", + "SVG_FEBLEND_MODE_COLOR_BURN", + "SVG_FEBLEND_MODE_COLOR_DODGE", + "SVG_FEBLEND_MODE_DARKEN", + "SVG_FEBLEND_MODE_DIFFERENCE", + "SVG_FEBLEND_MODE_EXCLUSION", + "SVG_FEBLEND_MODE_HARD_LIGHT", + "SVG_FEBLEND_MODE_HUE", + "SVG_FEBLEND_MODE_LIGHTEN", + "SVG_FEBLEND_MODE_LUMINOSITY", + "SVG_FEBLEND_MODE_MULTIPLY", + "SVG_FEBLEND_MODE_NORMAL", + "SVG_FEBLEND_MODE_OVERLAY", + "SVG_FEBLEND_MODE_SATURATION", + "SVG_FEBLEND_MODE_SCREEN", + "SVG_FEBLEND_MODE_SOFT_LIGHT", + "SVG_FEBLEND_MODE_UNKNOWN", + "SVG_FECOLORMATRIX_TYPE_HUEROTATE", + "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", + "SVG_FECOLORMATRIX_TYPE_MATRIX", + "SVG_FECOLORMATRIX_TYPE_SATURATE", + "SVG_FECOLORMATRIX_TYPE_UNKNOWN", + "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", + "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", + "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", + "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", + "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", + "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", + "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC", + "SVG_FECOMPOSITE_OPERATOR_ATOP", + "SVG_FECOMPOSITE_OPERATOR_IN", + "SVG_FECOMPOSITE_OPERATOR_OUT", + "SVG_FECOMPOSITE_OPERATOR_OVER", + "SVG_FECOMPOSITE_OPERATOR_UNKNOWN", + "SVG_FECOMPOSITE_OPERATOR_XOR", + "SVG_INVALID_VALUE_ERR", + "SVG_LENGTHTYPE_CM", + "SVG_LENGTHTYPE_EMS", + "SVG_LENGTHTYPE_EXS", + "SVG_LENGTHTYPE_IN", + "SVG_LENGTHTYPE_MM", + "SVG_LENGTHTYPE_NUMBER", + "SVG_LENGTHTYPE_PC", + "SVG_LENGTHTYPE_PERCENTAGE", + "SVG_LENGTHTYPE_PT", + "SVG_LENGTHTYPE_PX", + "SVG_LENGTHTYPE_UNKNOWN", + "SVG_MARKERUNITS_STROKEWIDTH", + "SVG_MARKERUNITS_UNKNOWN", + "SVG_MARKERUNITS_USERSPACEONUSE", + "SVG_MARKER_ORIENT_ANGLE", + "SVG_MARKER_ORIENT_AUTO", + "SVG_MARKER_ORIENT_UNKNOWN", + "SVG_MASKTYPE_ALPHA", + "SVG_MASKTYPE_LUMINANCE", + "SVG_MATRIX_NOT_INVERTABLE", + "SVG_MEETORSLICE_MEET", + "SVG_MEETORSLICE_SLICE", + "SVG_MEETORSLICE_UNKNOWN", + "SVG_MORPHOLOGY_OPERATOR_DILATE", + "SVG_MORPHOLOGY_OPERATOR_ERODE", + "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", + "SVG_PAINTTYPE_CURRENTCOLOR", + "SVG_PAINTTYPE_NONE", + "SVG_PAINTTYPE_RGBCOLOR", + "SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR", + "SVG_PAINTTYPE_UNKNOWN", + "SVG_PAINTTYPE_URI", + "SVG_PAINTTYPE_URI_CURRENTCOLOR", + "SVG_PAINTTYPE_URI_NONE", + "SVG_PAINTTYPE_URI_RGBCOLOR", + "SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR", + "SVG_PRESERVEASPECTRATIO_NONE", + "SVG_PRESERVEASPECTRATIO_UNKNOWN", + "SVG_PRESERVEASPECTRATIO_XMAXYMAX", + "SVG_PRESERVEASPECTRATIO_XMAXYMID", + "SVG_PRESERVEASPECTRATIO_XMAXYMIN", + "SVG_PRESERVEASPECTRATIO_XMIDYMAX", + "SVG_PRESERVEASPECTRATIO_XMIDYMID", + "SVG_PRESERVEASPECTRATIO_XMIDYMIN", + "SVG_PRESERVEASPECTRATIO_XMINYMAX", + "SVG_PRESERVEASPECTRATIO_XMINYMID", + "SVG_PRESERVEASPECTRATIO_XMINYMIN", + "SVG_SPREADMETHOD_PAD", + "SVG_SPREADMETHOD_REFLECT", + "SVG_SPREADMETHOD_REPEAT", + "SVG_SPREADMETHOD_UNKNOWN", + "SVG_STITCHTYPE_NOSTITCH", + "SVG_STITCHTYPE_STITCH", + "SVG_STITCHTYPE_UNKNOWN", + "SVG_TRANSFORM_MATRIX", + "SVG_TRANSFORM_ROTATE", + "SVG_TRANSFORM_SCALE", + "SVG_TRANSFORM_SKEWX", + "SVG_TRANSFORM_SKEWY", + "SVG_TRANSFORM_TRANSLATE", + "SVG_TRANSFORM_UNKNOWN", + "SVG_TURBULENCE_TYPE_FRACTALNOISE", + "SVG_TURBULENCE_TYPE_TURBULENCE", + "SVG_TURBULENCE_TYPE_UNKNOWN", + "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", + "SVG_UNIT_TYPE_UNKNOWN", + "SVG_UNIT_TYPE_USERSPACEONUSE", + "SVG_WRONG_TYPE_ERR", + "SVG_ZOOMANDPAN_DISABLE", + "SVG_ZOOMANDPAN_MAGNIFY", + "SVG_ZOOMANDPAN_UNKNOWN", + "SYNTAX_ERR", + "SavedPages", + "Screen", + "ScreenOrientation", + "Script", + "ScriptProcessorNode", + "ScrollAreaEvent", + "SecurityPolicyViolationEvent", + "Selection", + "ServiceWorker", + "ServiceWorkerContainer", + "ServiceWorkerRegistration", + "SessionDescription", + "Set", + "ShadowRoot", + "SharedWorker", + "SimpleGestureEvent", + "SpeechSynthesisEvent", + "SpeechSynthesisUtterance", + "StopIteration", + "Storage", + "StorageEvent", + "String", + "StyleSheet", + "StyleSheetList", + "SubtleCrypto", + "Symbol", + "SyntaxError", + "TEMPORARY", + "TEXTPATH_METHODTYPE_ALIGN", + "TEXTPATH_METHODTYPE_STRETCH", + "TEXTPATH_METHODTYPE_UNKNOWN", + "TEXTPATH_SPACINGTYPE_AUTO", + "TEXTPATH_SPACINGTYPE_EXACT", + "TEXTPATH_SPACINGTYPE_UNKNOWN", + "TEXTURE", + "TEXTURE0", + "TEXTURE1", + "TEXTURE10", + "TEXTURE11", + "TEXTURE12", + "TEXTURE13", + "TEXTURE14", + "TEXTURE15", + "TEXTURE16", + "TEXTURE17", + "TEXTURE18", + "TEXTURE19", + "TEXTURE2", + "TEXTURE20", + "TEXTURE21", + "TEXTURE22", + "TEXTURE23", + "TEXTURE24", + "TEXTURE25", + "TEXTURE26", + "TEXTURE27", + "TEXTURE28", + "TEXTURE29", + "TEXTURE3", + "TEXTURE30", + "TEXTURE31", + "TEXTURE4", + "TEXTURE5", + "TEXTURE6", + "TEXTURE7", + "TEXTURE8", + "TEXTURE9", + "TEXTURE_2D", + "TEXTURE_BINDING_2D", + "TEXTURE_BINDING_CUBE_MAP", + "TEXTURE_CUBE_MAP", + "TEXTURE_CUBE_MAP_NEGATIVE_X", + "TEXTURE_CUBE_MAP_NEGATIVE_Y", + "TEXTURE_CUBE_MAP_NEGATIVE_Z", + "TEXTURE_CUBE_MAP_POSITIVE_X", + "TEXTURE_CUBE_MAP_POSITIVE_Y", + "TEXTURE_CUBE_MAP_POSITIVE_Z", + "TEXTURE_MAG_FILTER", + "TEXTURE_MAX_ANISOTROPY_EXT", + "TEXTURE_MIN_FILTER", + "TEXTURE_WRAP_S", + "TEXTURE_WRAP_T", + "TEXT_NODE", + "TIMEOUT", + "TIMEOUT_ERR", + "TOO_LARGE_ERR", + "TRANSACTION_INACTIVE_ERR", + "TRIANGLE", + "TRIANGLES", + "TRIANGLE_FAN", + "TRIANGLE_STRIP", + "TYPE_BACK_FORWARD", + "TYPE_ERR", + "TYPE_MISMATCH_ERR", + "TYPE_NAVIGATE", + "TYPE_RELOAD", + "TYPE_RESERVED", + "Text", + "TextDecoder", + "TextEncoder", + "TextEvent", + "TextMetrics", + "TextTrack", + "TextTrackCue", + "TextTrackCueList", + "TextTrackList", + "TimeEvent", + "TimeRanges", + "Touch", + "TouchEvent", + "TouchList", + "TrackEvent", + "TransitionEvent", + "TreeWalker", + "TypeError", + "UIEvent", + "UNCACHED", + "UNKNOWN_ERR", + "UNKNOWN_RULE", + "UNMASKED_RENDERER_WEBGL", + "UNMASKED_VENDOR_WEBGL", + "UNORDERED_NODE_ITERATOR_TYPE", + "UNORDERED_NODE_SNAPSHOT_TYPE", + "UNPACK_ALIGNMENT", + "UNPACK_COLORSPACE_CONVERSION_WEBGL", + "UNPACK_FLIP_Y_WEBGL", + "UNPACK_PREMULTIPLY_ALPHA_WEBGL", + "UNSCHEDULED_STATE", + "UNSENT", + "UNSIGNED_BYTE", + "UNSIGNED_INT", + "UNSIGNED_SHORT", + "UNSIGNED_SHORT_4_4_4_4", + "UNSIGNED_SHORT_5_5_5_1", + "UNSIGNED_SHORT_5_6_5", + "UNSPECIFIED_EVENT_TYPE_ERR", + "UPDATEREADY", + "URIError", + "URL", + "URLSearchParams", + "URLUnencoded", + "URL_MISMATCH_ERR", + "UTC", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", + "UserMessageHandler", + "UserMessageHandlersNamespace", + "UserProximityEvent", + "VALIDATE_STATUS", + "VALIDATION_ERR", + "VARIABLES_RULE", + "VENDOR", + "VERSION", + "VERSION_CHANGE", + "VERSION_ERR", + "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", + "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", + "VERTEX_ATTRIB_ARRAY_ENABLED", + "VERTEX_ATTRIB_ARRAY_NORMALIZED", + "VERTEX_ATTRIB_ARRAY_POINTER", + "VERTEX_ATTRIB_ARRAY_SIZE", + "VERTEX_ATTRIB_ARRAY_STRIDE", + "VERTEX_ATTRIB_ARRAY_TYPE", + "VERTEX_SHADER", + "VERTICAL", + "VERTICAL_AXIS", + "VER_ERR", + "VIEWPORT", + "VIEWPORT_RULE", + "VTTCue", + "VTTRegion", + "ValidityState", + "VideoStreamTrack", + "WEBKIT_FILTER_RULE", + "WEBKIT_KEYFRAMES_RULE", + "WEBKIT_KEYFRAME_RULE", + "WEBKIT_REGION_RULE", + "WRONG_DOCUMENT_ERR", + "WaveShaperNode", + "WeakMap", + "WeakSet", + "WebGLActiveInfo", + "WebGLBuffer", + "WebGLContextEvent", + "WebGLFramebuffer", + "WebGLProgram", + "WebGLRenderbuffer", + "WebGLRenderingContext", + "WebGLShader", + "WebGLShaderPrecisionFormat", + "WebGLTexture", + "WebGLUniformLocation", + "WebGLVertexArray", + "WebKitAnimationEvent", + "WebKitBlobBuilder", + "WebKitCSSFilterRule", + "WebKitCSSFilterValue", + "WebKitCSSKeyframeRule", + "WebKitCSSKeyframesRule", + "WebKitCSSMatrix", + "WebKitCSSRegionRule", + "WebKitCSSTransformValue", + "WebKitDataCue", + "WebKitGamepad", + "WebKitMediaKeyError", + "WebKitMediaKeyMessageEvent", + "WebKitMediaKeySession", + "WebKitMediaKeys", + "WebKitMediaSource", + "WebKitMutationObserver", + "WebKitNamespace", + "WebKitPlaybackTargetAvailabilityEvent", + "WebKitPoint", + "WebKitShadowRoot", + "WebKitSourceBuffer", + "WebKitSourceBufferList", + "WebKitTransitionEvent", + "WebSocket", + "WheelEvent", + "Window", + "Worker", + "XMLDocument", + "XMLHttpRequest", + "XMLHttpRequestEventTarget", + "XMLHttpRequestException", + "XMLHttpRequestProgressEvent", + "XMLHttpRequestUpload", + "XMLSerializer", + "XMLStylesheetProcessingInstruction", + "XPathEvaluator", + "XPathException", + "XPathExpression", + "XPathNSResolver", + "XPathResult", + "XSLTProcessor", + "ZERO", + "_XD0M_", + "_YD0M_", + "__defineGetter__", + "__defineSetter__", + "__lookupGetter__", + "__lookupSetter__", + "__opera", + "__proto__", + "_browserjsran", + "a", + "aLink", + "abbr", + "abort", + "abs", + "absolute", + "acceleration", + "accelerationIncludingGravity", + "accelerator", + "accept", + "acceptCharset", + "acceptNode", + "accessKey", + "accessKeyLabel", + "accuracy", + "acos", + "acosh", + "action", + "actionURL", + "active", + "activeCues", + "activeElement", + "activeSourceBuffers", + "activeSourceCount", + "activeTexture", + "add", + "addBehavior", + "addCandidate", + "addColorStop", + "addCue", + "addElement", + "addEventListener", + "addFilter", + "addFromString", + "addFromUri", + "addIceCandidate", + "addImport", + "addListener", + "addNamed", + "addPageRule", + "addPath", + "addPointer", + "addRange", + "addRegion", + "addRule", + "addSearchEngine", + "addSourceBuffer", + "addStream", + "addTextTrack", + "addTrack", + "addWakeLockListener", + "addedNodes", + "additionalName", + "additiveSymbols", + "addons", + "adoptNode", + "adr", + "advance", + "alert", + "algorithm", + "align", + "align-content", + "align-items", + "align-self", + "alignContent", + "alignItems", + "alignSelf", + "alignmentBaseline", + "alinkColor", + "all", + "allSettled", + "allowFullscreen", + "allowedDirections", + "alpha", + "alt", + "altGraphKey", + "altHtml", + "altKey", + "altLeft", + "altitude", + "altitudeAccuracy", + "amplitude", + "ancestorOrigins", + "anchor", + "anchorNode", + "anchorOffset", + "anchors", + "angle", + "animVal", + "animate", + "animatedInstanceRoot", + "animatedNormalizedPathSegList", + "animatedPathSegList", + "animatedPoints", + "animation", + "animation-delay", + "animation-direction", + "animation-duration", + "animation-fill-mode", + "animation-iteration-count", + "animation-name", + "animation-play-state", + "animation-timing-function", + "animationDelay", + "animationDirection", + "animationDuration", + "animationFillMode", + "animationIterationCount", + "animationName", + "animationPlayState", + "animationStartTime", + "animationTimingFunction", + "animationsPaused", + "anniversary", + "any", + "app", + "appCodeName", + "appMinorVersion", + "appName", + "appNotifications", + "appVersion", + "append", + "appendBuffer", + "appendChild", + "appendData", + "appendItem", + "appendMedium", + "appendNamed", + "appendRule", + "appendStream", + "appendWindowEnd", + "appendWindowStart", + "applets", + "applicationCache", + "apply", + "applyElement", + "arc", + "arcTo", + "archive", + "areas", + "arguments", + "arrayBuffer", + "asin", + "asinh", + "assert", + "assign", + "async", + "atEnd", + "atan", + "atan2", + "atanh", + "atob", + "attachEvent", + "attachShader", + "attachShadow", + "attachments", + "attack", + "attrChange", + "attrName", + "attributeFilter", + "attributeName", + "attributeNamespace", + "attributeOldValue", + "attributes", + "audioTracks", + "autoIncrement", + "autobuffer", + "autocapitalize", + "autocomplete", + "autocorrect", + "autofocus", + "autoplay", + "availHeight", + "availLeft", + "availTop", + "availWidth", + "availability", + "available", + "aversion", + "axes", + "axis", + "azimuth", + "b", + "back", + "backface-visibility", + "backfaceVisibility", + "background", + "background-attachment", + "background-blend-mode", + "background-clip", + "background-color", + "background-image", + "background-origin", + "background-position", + "background-repeat", + "background-size", + "backgroundAttachment", + "backgroundBlendMode", + "backgroundClip", + "backgroundColor", + "backgroundImage", + "backgroundOrigin", + "backgroundPosition", + "backgroundPositionX", + "backgroundPositionY", + "backgroundRepeat", + "backgroundSize", + "badInput", + "balance", + "baseFrequencyX", + "baseFrequencyY", + "baseNode", + "baseOffset", + "baseURI", + "baseVal", + "baselineShift", + "battery", + "bday", + "beginElement", + "beginElementAt", + "beginPath", + "behavior", + "behaviorCookie", + "behaviorPart", + "behaviorUrns", + "beta", + "bezierCurveTo", + "bgColor", + "bgProperties", + "bias", + "big", + "binaryType", + "bind", + "bindAttribLocation", + "bindBuffer", + "bindFramebuffer", + "bindRenderbuffer", + "bindTexture", + "blendColor", + "blendEquation", + "blendEquationSeparate", + "blendFunc", + "blendFuncSeparate", + "blink", + "blob", + "blockDirection", + "blue", + "blur", + "body", + "bodyUsed", + "bold", + "bookmarks", + "booleanValue", + "border", + "border-bottom", + "border-bottom-color", + "border-bottom-left-radius", + "border-bottom-right-radius", + "border-bottom-style", + "border-bottom-width", + "border-collapse", + "border-color", + "border-image", + "border-image-outset", + "border-image-repeat", + "border-image-slice", + "border-image-source", + "border-image-width", + "border-left", + "border-left-color", + "border-left-style", + "border-left-width", + "border-radius", + "border-right", + "border-right-color", + "border-right-style", + "border-right-width", + "border-spacing", + "border-style", + "border-top", + "border-top-color", + "border-top-left-radius", + "border-top-right-radius", + "border-top-style", + "border-top-width", + "border-width", + "borderBottom", + "borderBottomColor", + "borderBottomLeftRadius", + "borderBottomRightRadius", + "borderBottomStyle", + "borderBottomWidth", + "borderCollapse", + "borderColor", + "borderColorDark", + "borderColorLight", + "borderImage", + "borderImageOutset", + "borderImageRepeat", + "borderImageSlice", + "borderImageSource", + "borderImageWidth", + "borderLeft", + "borderLeftColor", + "borderLeftStyle", + "borderLeftWidth", + "borderRadius", + "borderRight", + "borderRightColor", + "borderRightStyle", + "borderRightWidth", + "borderSpacing", + "borderStyle", + "borderTop", + "borderTopColor", + "borderTopLeftRadius", + "borderTopRightRadius", + "borderTopStyle", + "borderTopWidth", + "borderWidth", + "bottom", + "bottomMargin", + "bound", + "boundElements", + "boundingClientRect", + "boundingHeight", + "boundingLeft", + "boundingTop", + "boundingWidth", + "bounds", + "box-decoration-break", + "box-shadow", + "box-sizing", + "boxDecorationBreak", + "boxShadow", + "boxSizing", + "breakAfter", + "breakBefore", + "breakInside", + "browserLanguage", + "btoa", + "bubbles", + "buffer", + "bufferData", + "bufferDepth", + "bufferSize", + "bufferSubData", + "buffered", + "bufferedAmount", + "buildID", + "buildNumber", + "button", + "buttonID", + "buttons", + "byteLength", + "byteOffset", + "c", + "call", + "caller", + "canBeFormatted", + "canBeMounted", + "canBeShared", + "canHaveChildren", + "canHaveHTML", + "canPlayType", + "cancel", + "cancelAnimationFrame", + "cancelBubble", + "cancelScheduledValues", + "cancelable", + "candidate", + "canvas", + "caption", + "caption-side", + "captionSide", + "capture", + "captureEvents", + "captureStackTrace", + "caretPositionFromPoint", + "caretRangeFromPoint", + "cast", + "catch", + "category", + "cbrt", + "cd", + "ceil", + "cellIndex", + "cellPadding", + "cellSpacing", + "cells", + "ch", + "chOff", + "chain", + "challenge", + "changedTouches", + "channel", + "channelCount", + "channelCountMode", + "channelInterpretation", + "char", + "charAt", + "charCode", + "charCodeAt", + "charIndex", + "characterSet", + "characterData", + "characterDataOldValue", + "charging", + "chargingTime", + "charset", + "checkEnclosure", + "checkFramebufferStatus", + "checkIntersection", + "checkValidity", + "checked", + "childElementCount", + "childList", + "childNodes", + "children", + "chrome", + "ciphertext", + "cite", + "classList", + "className", + "classid", + "clear", + "clearAttributes", + "clearColor", + "clearData", + "clearDepth", + "clearImmediate", + "clearInterval", + "clearMarks", + "clearMeasures", + "clearParameters", + "clearRect", + "clearResourceTimings", + "clearShadow", + "clearStencil", + "clearTimeout", + "clearWatch", + "click", + "clickCount", + "clientHeight", + "clientInformation", + "clientLeft", + "clientRect", + "clientRects", + "clientTop", + "clientWidth", + "clientX", + "clientY", + "clip", + "clip-path", + "clip-rule", + "clipBottom", + "clipLeft", + "clipPath", + "clipPathUnits", + "clipRight", + "clipRule", + "clipTop", + "clipboardData", + "clone", + "cloneContents", + "cloneNode", + "cloneRange", + "close", + "closePath", + "closed", + "closest", + "clz", + "clz32", + "cmp", + "code", + "codeBase", + "codePointAt", + "codeType", + "colSpan", + "collapse", + "collapseToEnd", + "collapseToStart", + "collapsed", + "collect", + "colno", + "color", + "color-interpolation", + "color-interpolation-filters", + "colorDepth", + "colorInterpolation", + "colorInterpolationFilters", + "colorMask", + "colorType", + "cols", + "columnCount", + "columnFill", + "columnGap", + "columnNumber", + "columnRule", + "columnRuleColor", + "columnRuleStyle", + "columnRuleWidth", + "columnSpan", + "columnWidth", + "columns", + "command", + "commitPreferences", + "commonAncestorContainer", + "compact", + "compareBoundaryPoints", + "compareDocumentPosition", + "compareEndPoints", + "compareNode", + "comparePoint", + "compatMode", + "compatible", + "compile", + "compileShader", + "complete", + "componentFromPoint", + "compositionEndOffset", + "compositionStartOffset", + "compressedTexImage2D", + "compressedTexSubImage2D", + "concat", + "conditionText", + "coneInnerAngle", + "coneOuterAngle", + "coneOuterGain", + "confirm", + "confirmComposition", + "confirmSiteSpecificTrackingException", + "confirmWebWideTrackingException", + "connect", + "connectEnd", + "connectStart", + "connected", + "connection", + "connectionSpeed", + "console", + "consolidate", + "constrictionActive", + "constructor", + "contactID", + "contains", + "containsNode", + "content", + "contentDocument", + "contentEditable", + "contentOverflow", + "contentScriptType", + "contentStyleType", + "contentType", + "contentWindow", + "context", + "contextMenu", + "contextmenu", + "continue", + "continuous", + "control", + "controller", + "controls", + "convertToSpecifiedUnits", + "cookie", + "cookieEnabled", + "coords", + "copyFromChannel", + "copyTexImage2D", + "copyTexSubImage2D", + "copyToChannel", + "copyWithin", + "correspondingElement", + "correspondingUseElement", + "cos", + "cosh", + "count", + "counter-increment", + "counter-reset", + "counterIncrement", + "counterReset", + "cpuClass", + "cpuSleepAllowed", + "create", + "createAnalyser", + "createAnswer", + "createAttribute", + "createAttributeNS", + "createBiquadFilter", + "createBuffer", + "createBufferSource", + "createCDATASection", + "createCSSStyleSheet", + "createCaption", + "createChannelMerger", + "createChannelSplitter", + "createComment", + "createContextualFragment", + "createControlRange", + "createConvolver", + "createDTMFSender", + "createDataChannel", + "createDelay", + "createDelayNode", + "createDocument", + "createDocumentFragment", + "createDocumentType", + "createDynamicsCompressor", + "createElement", + "createElementNS", + "createEntityReference", + "createEvent", + "createEventObject", + "createExpression", + "createFramebuffer", + "createFunction", + "createGain", + "createGainNode", + "createHTMLDocument", + "createImageBitmap", + "createImageData", + "createIndex", + "createJavaScriptNode", + "createLinearGradient", + "createMediaElementSource", + "createMediaKeys", + "createMediaStreamDestination", + "createMediaStreamSource", + "createMutableFile", + "createNSResolver", + "createNodeIterator", + "createNotification", + "createObjectStore", + "createObjectURL", + "createOffer", + "createOscillator", + "createPanner", + "createPattern", + "createPeriodicWave", + "createPopup", + "createProcessingInstruction", + "createProgram", + "createRadialGradient", + "createRange", + "createRangeCollection", + "createRenderbuffer", + "createSVGAngle", + "createSVGLength", + "createSVGMatrix", + "createSVGNumber", + "createSVGPathSegArcAbs", + "createSVGPathSegArcRel", + "createSVGPathSegClosePath", + "createSVGPathSegCurvetoCubicAbs", + "createSVGPathSegCurvetoCubicRel", + "createSVGPathSegCurvetoCubicSmoothAbs", + "createSVGPathSegCurvetoCubicSmoothRel", + "createSVGPathSegCurvetoQuadraticAbs", + "createSVGPathSegCurvetoQuadraticRel", + "createSVGPathSegCurvetoQuadraticSmoothAbs", + "createSVGPathSegCurvetoQuadraticSmoothRel", + "createSVGPathSegLinetoAbs", + "createSVGPathSegLinetoHorizontalAbs", + "createSVGPathSegLinetoHorizontalRel", + "createSVGPathSegLinetoRel", + "createSVGPathSegLinetoVerticalAbs", + "createSVGPathSegLinetoVerticalRel", + "createSVGPathSegMovetoAbs", + "createSVGPathSegMovetoRel", + "createSVGPoint", + "createSVGRect", + "createSVGTransform", + "createSVGTransformFromMatrix", + "createScriptProcessor", + "createSession", + "createShader", + "createShadowRoot", + "createStereoPanner", + "createStyleSheet", + "createTBody", + "createTFoot", + "createTHead", + "createTextNode", + "createTextRange", + "createTexture", + "createTouch", + "createTouchList", + "createTreeWalker", + "createWaveShaper", + "creationTime", + "crossOrigin", + "crypto", + "csi", + "cssFloat", + "cssRules", + "cssText", + "cssValueType", + "ctrlKey", + "ctrlLeft", + "cues", + "cullFace", + "currentNode", + "currentPage", + "currentScale", + "currentScript", + "currentSrc", + "currentState", + "currentStyle", + "currentTarget", + "currentTime", + "currentTranslate", + "currentView", + "cursor", + "curve", + "customError", + "cx", + "cy", + "d", + "data", + "dataFld", + "dataFormatAs", + "dataPageSize", + "dataSrc", + "dataTransfer", + "database", + "dataset", + "dateTime", + "db", + "debug", + "debuggerEnabled", + "declare", + "decode", + "decodeAudioData", + "decodingInfo", + "decodeURI", + "decodeURIComponent", + "decrypt", + "default", + "defaultCharset", + "defaultChecked", + "defaultMuted", + "defaultPlaybackRate", + "defaultPrevented", + "defaultSelected", + "defaultStatus", + "defaultURL", + "defaultValue", + "defaultView", + "defaultstatus", + "defer", + "defineMagicFunction", + "defineMagicVariable", + "defineProperties", + "defineProperty", + "delayTime", + "delete", + "deleteBuffer", + "deleteCaption", + "deleteCell", + "deleteContents", + "deleteData", + "deleteDatabase", + "deleteFramebuffer", + "deleteFromDocument", + "deleteIndex", + "deleteMedium", + "deleteObjectStore", + "deleteProgram", + "deleteRenderbuffer", + "deleteRow", + "deleteRule", + "deleteShader", + "deleteTFoot", + "deleteTHead", + "deleteTexture", + "deliverChangeRecords", + "delivery", + "deliveryInfo", + "deliveryStatus", + "deliveryTimestamp", + "delta", + "deltaMode", + "deltaX", + "deltaY", + "deltaZ", + "depthFunc", + "depthMask", + "depthRange", + "deriveBits", + "deriveKey", + "description", + "deselectAll", + "designMode", + "destination", + "destinationURL", + "detach", + "detachEvent", + "detachShader", + "detail", + "detune", + "devicePixelRatio", + "deviceXDPI", + "deviceYDPI", + "diffuseConstant", + "digest", + "dimensions", + "dir", + "dirName", + "direction", + "dirxml", + "disable", + "disableVertexAttribArray", + "disabled", + "dischargingTime", + "disconnect", + "dispatchEvent", + "display", + "distanceModel", + "divisor", + "djsapi", + "djsproxy", + "doImport", + "doNotTrack", + "doScroll", + "doctype", + "document", + "documentElement", + "documentMode", + "documentURI", + "dolphin", + "dolphinGameCenter", + "dolphininfo", + "dolphinmeta", + "domComplete", + "domContentLoadedEventEnd", + "domContentLoadedEventStart", + "domInteractive", + "domLoading", + "domain", + "domainLookupEnd", + "domainLookupStart", + "dominant-baseline", + "dominantBaseline", + "done", + "dopplerFactor", + "download", + "dragDrop", + "draggable", + "drawArrays", + "drawArraysInstancedANGLE", + "drawCustomFocusRing", + "drawElements", + "drawElementsInstancedANGLE", + "drawFocusIfNeeded", + "drawImage", + "drawImageFromRect", + "drawSystemFocusRing", + "drawingBufferHeight", + "drawingBufferWidth", + "dropEffect", + "droppedVideoFrames", + "dropzone", + "dump", + "duplicate", + "duration", + "dvname", + "dvnum", + "dx", + "dy", + "dynsrc", + "e", + "edgeMode", + "effectAllowed", + "elapsedTime", + "elementFromPoint", + "elements", + "elevation", + "ellipse", + "email", + "embeds", + "empty", + "empty-cells", + "emptyCells", + "enable", + "enableBackground", + "enableStyleSheetsForSet", + "enableVertexAttribArray", + "enabled", + "enabledPlugin", + "encode", + "encodeURI", + "encodeURIComponent", + "encoding", + "encrypt", + "enctype", + "end", + "endContainer", + "endElement", + "endElementAt", + "endOfStream", + "endOffset", + "endTime", + "ended", + "endsWith", + "entities", + "entries", + "entryType", + "enumerate", + "enumerateEditable", + "error", + "errorCode", + "escape", + "eval", + "evaluate", + "event", + "eventPhase", + "every", + "exception", + "exec", + "execCommand", + "execCommandShowHelp", + "execScript", + "exitFullscreen", + "exitPointerLock", + "exp", + "expand", + "expandEntityReferences", + "expando", + "expansion", + "expiryDate", + "explicitOriginalTarget", + "expm1", + "exponent", + "exponentialRampToValueAtTime", + "exportKey", + "extend", + "extensions", + "extentNode", + "extentOffset", + "external", + "externalResourcesRequired", + "extractContents", + "extractable", + "f", + "face", + "factoryReset", + "fallback", + "familyName", + "farthestViewportElement", + "fastSeek", + "fatal", + "fetch", + "fetchStart", + "fftSize", + "fgColor", + "fileCreatedDate", + "fileHandle", + "fileModifiedDate", + "fileName", + "fileSize", + "fileUpdatedDate", + "filename", + "files", + "fill", + "fill-opacity", + "fill-rule", + "fillOpacity", + "fillRect", + "fillRule", + "fillStyle", + "fillText", + "filter", + "filterResX", + "filterResY", + "filterUnits", + "filters", + "finally", + "find", + "findIndex", + "findRule", + "findText", + "finish", + "fireEvent", + "firstChild", + "firstElementChild", + "firstPage", + "fixed", + "flex", + "flex-basis", + "flex-direction", + "flex-flow", + "flex-grow", + "flex-shrink", + "flex-wrap", + "flexBasis", + "flexDirection", + "flexFlow", + "flexGrow", + "flexShrink", + "flexWrap", + "flipX", + "flipY", + "float", + "flood-color", + "flood-opacity", + "floodColor", + "floodOpacity", + "floor", + "flush", + "focus", + "focusNode", + "focusOffset", + "font", + "font-family", + "font-feature-settings", + "font-kerning", + "font-language-override", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-synthesis", + "font-variant", + "font-variant-alternates", + "font-variant-caps", + "font-variant-east-asian", + "font-variant-ligatures", + "font-variant-numeric", + "font-variant-position", + "font-weight", + "fontFamily", + "fontFeatureSettings", + "fontKerning", + "fontLanguageOverride", + "fontSize", + "fontSizeAdjust", + "fontSmoothingEnabled", + "fontStretch", + "fontStyle", + "fontSynthesis", + "fontVariant", + "fontVariantAlternates", + "fontVariantCaps", + "fontVariantEastAsian", + "fontVariantLigatures", + "fontVariantNumeric", + "fontVariantPosition", + "fontWeight", + "fontcolor", + "fonts", + "fontsize", + "for", + "forEach", + "forceRedraw", + "form", + "formAction", + "formEnctype", + "formMethod", + "formNoValidate", + "formTarget", + "format", + "formatToParts", + "forms", + "forward", + "fr", + "frame", + "frameBorder", + "frameElement", + "frameSpacing", + "framebufferRenderbuffer", + "framebufferTexture2D", + "frames", + "freeSpace", + "freeze", + "frequency", + "frequencyBinCount", + "from", + "fromCharCode", + "fromCodePoint", + "fromElement", + "frontFace", + "fround", + "fullScreen", + "fullscreenElement", + "fullscreenEnabled", + "fx", + "fy", + "gain", + "gamepad", + "gamma", + "genderIdentity", + "generateKey", + "generateMipmap", + "generateRequest", + "geolocation", + "gestureObject", + "get", + "getActiveAttrib", + "getActiveUniform", + "getAdjacentText", + "getAll", + "getAllResponseHeaders", + "getAsFile", + "getAsString", + "getAttachedShaders", + "getAttribLocation", + "getAttribute", + "getAttributeNS", + "getAttributeNode", + "getAttributeNodeNS", + "getAudioTracks", + "getBBox", + "getBattery", + "getBlob", + "getBookmark", + "getBoundingClientRect", + "getBufferParameter", + "getByteFrequencyData", + "getByteTimeDomainData", + "getCSSCanvasContext", + "getCTM", + "getCandidateWindowClientRect", + "getChannelData", + "getCharNumAtPosition", + "getClientRect", + "getClientRects", + "getCompositionAlternatives", + "getComputedStyle", + "getComputedTextLength", + "getConfiguration", + "getContext", + "getContextAttributes", + "getCounterValue", + "getCueAsHTML", + "getCueById", + "getCurrentPosition", + "getCurrentTime", + "getData", + "getDatabaseNames", + "getDate", + "getDay", + "getDefaultComputedStyle", + "getDestinationInsertionPoints", + "getDistributedNodes", + "getEditable", + "getElementById", + "getElementsByClassName", + "getElementsByName", + "getElementsByTagName", + "getElementsByTagNameNS", + "getEnclosureList", + "getEndPositionOfChar", + "getEntries", + "getEntriesByName", + "getEntriesByType", + "getError", + "getExtension", + "getExtentOfChar", + "getFeature", + "getFile", + "getFloat32", + "getFloat64", + "getFloatFrequencyData", + "getFloatTimeDomainData", + "getFloatValue", + "getFramebufferAttachmentParameter", + "getFrequencyResponse", + "getFullYear", + "getGamepads", + "getHours", + "getImageData", + "getInt16", + "getInt32", + "getInt8", + "getIntersectionList", + "getItem", + "getItems", + "getKey", + "getLineDash", + "getLocalStreams", + "getMarks", + "getMatchedCSSRules", + "getMeasures", + "getMetadata", + "getMilliseconds", + "getMinutes", + "getModifierState", + "getMonth", + "getNamedItem", + "getNamedItemNS", + "getNotifier", + "getNumberOfChars", + "getOverrideHistoryNavigationMode", + "getOverrideStyle", + "getOwnPropertyDescriptor", + "getOwnPropertyNames", + "getOwnPropertySymbols", + "getParameter", + "getPathSegAtLength", + "getPointAtLength", + "getPreference", + "getPreferenceDefault", + "getPresentationAttribute", + "getPreventDefault", + "getProgramInfoLog", + "getProgramParameter", + "getPropertyCSSValue", + "getPropertyPriority", + "getPropertyShorthand", + "getPropertyValue", + "getPrototypeOf", + "getRGBColorValue", + "getRandomValues", + "getRangeAt", + "getReceivers", + "getRectValue", + "getRegistration", + "getRemoteStreams", + "getRenderbufferParameter", + "getResponseHeader", + "getRoot", + "getRotationOfChar", + "getSVGDocument", + "getScreenCTM", + "getSeconds", + "getSelection", + "getSenders", + "getShaderInfoLog", + "getShaderParameter", + "getShaderPrecisionFormat", + "getShaderSource", + "getSimpleDuration", + "getSiteIcons", + "getSources", + "getSpeculativeParserUrls", + "getStartPositionOfChar", + "getStartTime", + "getStats", + "getStorageUpdates", + "getStreamById", + "getStringValue", + "getSubStringLength", + "getSubscription", + "getSupportedExtensions", + "getTexParameter", + "getTime", + "getTimezoneOffset", + "getTotalLength", + "getTrackById", + "getTracks", + "getTransformToElement", + "getUTCDate", + "getUTCDay", + "getUTCFullYear", + "getUTCHours", + "getUTCMilliseconds", + "getUTCMinutes", + "getUTCMonth", + "getUTCSeconds", + "getUint16", + "getUint32", + "getUint8", + "getUniform", + "getUniformLocation", + "getUserMedia", + "getValues", + "getVarDate", + "getVariableValue", + "getVertexAttrib", + "getVertexAttribOffset", + "getVideoPlaybackQuality", + "getVideoTracks", + "getWakeLockState", + "getYear", + "givenName", + "global", + "globalAlpha", + "globalCompositeOperation", + "glyphOrientationHorizontal", + "glyphOrientationVertical", + "glyphRef", + "go", + "gradientTransform", + "gradientUnits", + "grammars", + "green", + "group", + "groupCollapsed", + "groupEnd", + "hardwareConcurrency", + "has", + "hasAttribute", + "hasAttributeNS", + "hasAttributes", + "hasChildNodes", + "hasComposition", + "hasExtension", + "hasFeature", + "hasFocus", + "hasLayout", + "hasOwnProperty", + "hash", + "head", + "headers", + "heading", + "height", + "hidden", + "hide", + "hideFocus", + "high", + "hint", + "history", + "honorificPrefix", + "honorificSuffix", + "horizontalOverflow", + "host", + "hostname", + "href", + "hreflang", + "hspace", + "html5TagCheckInerface", + "htmlFor", + "htmlText", + "httpEquiv", + "hwTimestamp", + "hypot", + "iccId", + "iceConnectionState", + "iceGatheringState", + "icon", + "id", + "identifier", + "identity", + "ignoreBOM", + "ignoreCase", + "image-orientation", + "image-rendering", + "imageOrientation", + "imageRendering", + "images", + "ime-mode", + "imeMode", + "implementation", + "importKey", + "importNode", + "importStylesheet", + "imports", + "impp", + "imul", + "in1", + "in2", + "inBandMetadataTrackDispatchType", + "inRange", + "includes", + "incremental", + "indeterminate", + "index", + "indexNames", + "indexOf", + "indexedDB", + "inertiaDestinationX", + "inertiaDestinationY", + "info", + "init", + "initAnimationEvent", + "initBeforeLoadEvent", + "initClipboardEvent", + "initCloseEvent", + "initCommandEvent", + "initCompositionEvent", + "initCustomEvent", + "initData", + "initDeviceMotionEvent", + "initDeviceOrientationEvent", + "initDragEvent", + "initErrorEvent", + "initEvent", + "initFocusEvent", + "initGestureEvent", + "initHashChangeEvent", + "initKeyEvent", + "initKeyboardEvent", + "initMSManipulationEvent", + "initMessageEvent", + "initMouseEvent", + "initMouseScrollEvent", + "initMouseWheelEvent", + "initMutationEvent", + "initNSMouseEvent", + "initOverflowEvent", + "initPageEvent", + "initPageTransitionEvent", + "initPointerEvent", + "initPopStateEvent", + "initProgressEvent", + "initScrollAreaEvent", + "initSimpleGestureEvent", + "initStorageEvent", + "initTextEvent", + "initTimeEvent", + "initTouchEvent", + "initTransitionEvent", + "initUIEvent", + "initWebKitAnimationEvent", + "initWebKitTransitionEvent", + "initWebKitWheelEvent", + "initWheelEvent", + "initialTime", + "initialize", + "initiatorType", + "inner", + "innerHTML", + "innerHeight", + "innerText", + "innerWidth", + "input", + "inputBuffer", + "inputEncoding", + "inputMethod", + "insertAdjacentElement", + "insertAdjacentHTML", + "insertAdjacentText", + "insertBefore", + "insertCell", + "insertData", + "insertItemBefore", + "insertNode", + "insertRow", + "insertRule", + "instanceRoot", + "intercept", + "interimResults", + "internalSubset", + "intersectsNode", + "interval", + "invalidIteratorState", + "inverse", + "invertSelf", + "is", + "is2D", + "isAlternate", + "isArray", + "isBingCurrentSearchDefault", + "isBuffer", + "isCandidateWindowVisible", + "isChar", + "isCollapsed", + "isComposing", + "isContentEditable", + "isContentHandlerRegistered", + "isContextLost", + "isDefaultNamespace", + "isDisabled", + "isEnabled", + "isEqual", + "isEqualNode", + "isExtensible", + "isFinite", + "isFramebuffer", + "isFrozen", + "isGenerator", + "isId", + "isInjected", + "isInteger", + "isMap", + "isMultiLine", + "isNaN", + "isOpen", + "isPointInFill", + "isPointInPath", + "isPointInRange", + "isPointInStroke", + "isPrefAlternate", + "isPrimary", + "isProgram", + "isPropertyImplicit", + "isProtocolHandlerRegistered", + "isPrototypeOf", + "isRenderbuffer", + "isSafeInteger", + "isSameNode", + "isSealed", + "isShader", + "isSupported", + "isTextEdit", + "isTexture", + "isTrusted", + "isTypeSupported", + "isView", + "isolation", + "italics", + "item", + "itemId", + "itemProp", + "itemRef", + "itemScope", + "itemType", + "itemValue", + "iterateNext", + "iterator", + "javaEnabled", + "jobTitle", + "join", + "json", + "justify-content", + "justifyContent", + "k1", + "k2", + "k3", + "k4", + "kernelMatrix", + "kernelUnitLengthX", + "kernelUnitLengthY", + "kerning", + "key", + "keyCode", + "keyFor", + "keyIdentifier", + "keyLightEnabled", + "keyLocation", + "keyPath", + "keySystem", + "keyText", + "keyUsage", + "keys", + "keytype", + "kind", + "knee", + "label", + "labels", + "lang", + "language", + "languages", + "largeArcFlag", + "lastChild", + "lastElementChild", + "lastEventId", + "lastIndex", + "lastIndexOf", + "lastMatch", + "lastMessageSubject", + "lastMessageType", + "lastModified", + "lastModifiedDate", + "lastPage", + "lastParen", + "lastState", + "lastStyleSheetSet", + "latitude", + "layerX", + "layerY", + "layoutFlow", + "layoutGrid", + "layoutGridChar", + "layoutGridLine", + "layoutGridMode", + "layoutGridType", + "lbound", + "left", + "leftContext", + "leftMargin", + "length", + "lengthAdjust", + "lengthComputable", + "letter-spacing", + "letterSpacing", + "level", + "lighting-color", + "lightingColor", + "limitingConeAngle", + "line", + "line-height", + "lineAlign", + "lineBreak", + "lineCap", + "lineDashOffset", + "lineHeight", + "lineJoin", + "lineNumber", + "lineTo", + "lineWidth", + "linearRampToValueAtTime", + "lineno", + "link", + "linkColor", + "linkProgram", + "links", + "list", + "list-style", + "list-style-image", + "list-style-position", + "list-style-type", + "listStyle", + "listStyleImage", + "listStylePosition", + "listStyleType", + "listener", + "load", + "loadEventEnd", + "loadEventStart", + "loadTimes", + "loaded", + "localDescription", + "localName", + "localStorage", + "locale", + "localeCompare", + "location", + "locationbar", + "lock", + "lockedFile", + "log", + "log10", + "log1p", + "log2", + "logicalXDPI", + "logicalYDPI", + "longDesc", + "longitude", + "lookupNamespaceURI", + "lookupPrefix", + "loop", + "loopEnd", + "loopStart", + "looping", + "low", + "lower", + "lowerBound", + "lowerOpen", + "lowsrc", + "m11", + "m12", + "m13", + "m14", + "m21", + "m22", + "m23", + "m24", + "m31", + "m32", + "m33", + "m34", + "m41", + "m42", + "m43", + "m44", + "manifest", + "map", + "mapping", + "margin", + "margin-bottom", + "margin-left", + "margin-right", + "margin-top", + "marginBottom", + "marginHeight", + "marginLeft", + "marginRight", + "marginTop", + "marginWidth", + "mark", + "marker", + "marker-end", + "marker-mid", + "marker-offset", + "marker-start", + "markerEnd", + "markerHeight", + "markerMid", + "markerOffset", + "markerStart", + "markerUnits", + "markerWidth", + "marks", + "mask", + "mask-type", + "maskContentUnits", + "maskType", + "maskUnits", + "match", + "matchMedia", + "matchMedium", + "matches", + "matrix", + "matrixTransform", + "max", + "max-height", + "max-width", + "maxAlternatives", + "maxChannelCount", + "maxConnectionsPerServer", + "maxDecibels", + "maxDistance", + "maxHeight", + "maxLength", + "maxTouchPoints", + "maxValue", + "maxWidth", + "measure", + "measureText", + "media", + "mediaCapabilities", + "mediaDevices", + "mediaElement", + "mediaGroup", + "mediaKeys", + "mediaText", + "meetOrSlice", + "memory", + "menubar", + "mergeAttributes", + "message", + "messageClass", + "messageHandlers", + "metaKey", + "method", + "mimeType", + "mimeTypes", + "min", + "min-height", + "min-width", + "minDecibels", + "minHeight", + "minValue", + "minWidth", + "miterLimit", + "mix-blend-mode", + "mixBlendMode", + "mode", + "modify", + "mount", + "move", + "moveBy", + "moveEnd", + "moveFirst", + "moveFocusDown", + "moveFocusLeft", + "moveFocusRight", + "moveFocusUp", + "moveNext", + "moveRow", + "moveStart", + "moveTo", + "moveToBookmark", + "moveToElementText", + "moveToPoint", + "mozAdd", + "mozAnimationStartTime", + "mozAnon", + "mozApps", + "mozAudioCaptured", + "mozAudioChannelType", + "mozAutoplayEnabled", + "mozCancelAnimationFrame", + "mozCancelFullScreen", + "mozCancelRequestAnimationFrame", + "mozCaptureStream", + "mozCaptureStreamUntilEnded", + "mozClearDataAt", + "mozContact", + "mozContacts", + "mozCreateFileHandle", + "mozCurrentTransform", + "mozCurrentTransformInverse", + "mozCursor", + "mozDash", + "mozDashOffset", + "mozDecodedFrames", + "mozExitPointerLock", + "mozFillRule", + "mozFragmentEnd", + "mozFrameDelay", + "mozFullScreen", + "mozFullScreenElement", + "mozFullScreenEnabled", + "mozGetAll", + "mozGetAllKeys", + "mozGetAsFile", + "mozGetDataAt", + "mozGetMetadata", + "mozGetUserMedia", + "mozHasAudio", + "mozHasItem", + "mozHidden", + "mozImageSmoothingEnabled", + "mozIndexedDB", + "mozInnerScreenX", + "mozInnerScreenY", + "mozInputSource", + "mozIsTextField", + "mozItem", + "mozItemCount", + "mozItems", + "mozLength", + "mozLockOrientation", + "mozMatchesSelector", + "mozMovementX", + "mozMovementY", + "mozOpaque", + "mozOrientation", + "mozPaintCount", + "mozPaintedFrames", + "mozParsedFrames", + "mozPay", + "mozPointerLockElement", + "mozPresentedFrames", + "mozPreservesPitch", + "mozPressure", + "mozPrintCallback", + "mozRTCIceCandidate", + "mozRTCPeerConnection", + "mozRTCSessionDescription", + "mozRemove", + "mozRequestAnimationFrame", + "mozRequestFullScreen", + "mozRequestPointerLock", + "mozSetDataAt", + "mozSetImageElement", + "mozSourceNode", + "mozSrcObject", + "mozSystem", + "mozTCPSocket", + "mozTextStyle", + "mozTypesAt", + "mozUnlockOrientation", + "mozUserCancelled", + "mozVisibilityState", + "msAnimation", + "msAnimationDelay", + "msAnimationDirection", + "msAnimationDuration", + "msAnimationFillMode", + "msAnimationIterationCount", + "msAnimationName", + "msAnimationPlayState", + "msAnimationStartTime", + "msAnimationTimingFunction", + "msBackfaceVisibility", + "msBlockProgression", + "msCSSOMElementFloatMetrics", + "msCaching", + "msCachingEnabled", + "msCancelRequestAnimationFrame", + "msCapsLockWarningOff", + "msClearImmediate", + "msClose", + "msContentZoomChaining", + "msContentZoomFactor", + "msContentZoomLimit", + "msContentZoomLimitMax", + "msContentZoomLimitMin", + "msContentZoomSnap", + "msContentZoomSnapPoints", + "msContentZoomSnapType", + "msContentZooming", + "msConvertURL", + "msCrypto", + "msDoNotTrack", + "msElementsFromPoint", + "msElementsFromRect", + "msExitFullscreen", + "msExtendedCode", + "msFillRule", + "msFirstPaint", + "msFlex", + "msFlexAlign", + "msFlexDirection", + "msFlexFlow", + "msFlexItemAlign", + "msFlexLinePack", + "msFlexNegative", + "msFlexOrder", + "msFlexPack", + "msFlexPositive", + "msFlexPreferredSize", + "msFlexWrap", + "msFlowFrom", + "msFlowInto", + "msFontFeatureSettings", + "msFullscreenElement", + "msFullscreenEnabled", + "msGetInputContext", + "msGetRegionContent", + "msGetUntransformedBounds", + "msGraphicsTrustStatus", + "msGridColumn", + "msGridColumnAlign", + "msGridColumnSpan", + "msGridColumns", + "msGridRow", + "msGridRowAlign", + "msGridRowSpan", + "msGridRows", + "msHidden", + "msHighContrastAdjust", + "msHyphenateLimitChars", + "msHyphenateLimitLines", + "msHyphenateLimitZone", + "msHyphens", + "msImageSmoothingEnabled", + "msImeAlign", + "msIndexedDB", + "msInterpolationMode", + "msIsStaticHTML", + "msKeySystem", + "msKeys", + "msLaunchUri", + "msLockOrientation", + "msManipulationViewsEnabled", + "msMatchMedia", + "msMatchesSelector", + "msMaxTouchPoints", + "msOrientation", + "msOverflowStyle", + "msPerspective", + "msPerspectiveOrigin", + "msPlayToDisabled", + "msPlayToPreferredSourceUri", + "msPlayToPrimary", + "msPointerEnabled", + "msRegionOverflow", + "msReleasePointerCapture", + "msRequestAnimationFrame", + "msRequestFullscreen", + "msSaveBlob", + "msSaveOrOpenBlob", + "msScrollChaining", + "msScrollLimit", + "msScrollLimitXMax", + "msScrollLimitXMin", + "msScrollLimitYMax", + "msScrollLimitYMin", + "msScrollRails", + "msScrollSnapPointsX", + "msScrollSnapPointsY", + "msScrollSnapType", + "msScrollSnapX", + "msScrollSnapY", + "msScrollTranslation", + "msSetImmediate", + "msSetMediaKeys", + "msSetPointerCapture", + "msTextCombineHorizontal", + "msTextSizeAdjust", + "msToBlob", + "msTouchAction", + "msTouchSelect", + "msTraceAsyncCallbackCompleted", + "msTraceAsyncCallbackStarting", + "msTraceAsyncOperationCompleted", + "msTraceAsyncOperationStarting", + "msTransform", + "msTransformOrigin", + "msTransformStyle", + "msTransition", + "msTransitionDelay", + "msTransitionDuration", + "msTransitionProperty", + "msTransitionTimingFunction", + "msUnlockOrientation", + "msUpdateAsyncCallbackRelation", + "msUserSelect", + "msVisibilityState", + "msWrapFlow", + "msWrapMargin", + "msWrapThrough", + "msWriteProfilerMark", + "msZoom", + "msZoomTo", + "mt", + "multiEntry", + "multiSelectionObj", + "multiline", + "multiple", + "multiply", + "multiplySelf", + "mutableFile", + "muted", + "n", + "name", + "nameProp", + "namedItem", + "namedRecordset", + "names", + "namespaceURI", + "namespaces", + "naturalHeight", + "naturalWidth", + "navigate", + "navigation", + "navigationMode", + "navigationStart", + "navigator", + "near", + "nearestViewportElement", + "negative", + "netscape", + "networkState", + "newScale", + "newTranslate", + "newURL", + "newValue", + "newValueSpecifiedUnits", + "newVersion", + "newhome", + "next", + "nextElementSibling", + "nextNode", + "nextPage", + "nextSibling", + "nickname", + "noHref", + "noResize", + "noShade", + "noValidate", + "noWrap", + "nodeName", + "nodeType", + "nodeValue", + "normalize", + "normalizedPathSegList", + "notationName", + "notations", + "note", + "noteGrainOn", + "noteOff", + "noteOn", + "now", + "numOctaves", + "number", + "numberOfChannels", + "numberOfInputs", + "numberOfItems", + "numberOfOutputs", + "numberValue", + "oMatchesSelector", + "object", + "object-fit", + "object-position", + "objectFit", + "objectPosition", + "objectStore", + "objectStoreNames", + "observe", + "of", + "offscreenBuffering", + "offset", + "offsetHeight", + "offsetLeft", + "offsetNode", + "offsetParent", + "offsetTop", + "offsetWidth", + "offsetX", + "offsetY", + "ok", + "oldURL", + "oldValue", + "oldVersion", + "olderShadowRoot", + "onLine", + "onabort", + "onactivate", + "onactive", + "onaddstream", + "onaddtrack", + "onafterprint", + "onafterscriptexecute", + "onafterupdate", + "onaudioend", + "onaudioprocess", + "onaudiostart", + "onautocomplete", + "onautocompleteerror", + "onbeforeactivate", + "onbeforecopy", + "onbeforecut", + "onbeforedeactivate", + "onbeforeeditfocus", + "onbeforepaste", + "onbeforeprint", + "onbeforescriptexecute", + "onbeforeunload", + "onbeforeupdate", + "onblocked", + "onblur", + "onbounce", + "onboundary", + "oncached", + "oncancel", + "oncandidatewindowhide", + "oncandidatewindowshow", + "oncandidatewindowupdate", + "oncanplay", + "oncanplaythrough", + "once", + "oncellchange", + "onchange", + "onchargingchange", + "onchargingtimechange", + "onchecking", + "onclick", + "onclose", + "oncompassneedscalibration", + "oncomplete", + "oncontextmenu", + "oncontrolselect", + "oncopy", + "oncuechange", + "oncut", + "ondataavailable", + "ondatachannel", + "ondatasetchanged", + "ondatasetcomplete", + "ondblclick", + "ondeactivate", + "ondevicelight", + "ondevicemotion", + "ondeviceorientation", + "ondeviceproximity", + "ondischargingtimechange", + "ondisplay", + "ondownloading", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onencrypted", + "onend", + "onended", + "onenter", + "onerror", + "onerrorupdate", + "onexit", + "onfilterchange", + "onfinish", + "onfocus", + "onfocusin", + "onfocusout", + "onfullscreenchange", + "onfullscreenerror", + "ongesturechange", + "ongestureend", + "ongesturestart", + "ongotpointercapture", + "onhashchange", + "onhelp", + "onicecandidate", + "oniceconnectionstatechange", + "oninactive", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onlanguagechange", + "onlayoutcomplete", + "onlevelchange", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadend", + "onloadstart", + "onlosecapture", + "onlostpointercapture", + "only", + "onmark", + "onmessage", + "onmousedown", + "onmouseenter", + "onmouseleave", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onmove", + "onmoveend", + "onmovestart", + "onmozfullscreenchange", + "onmozfullscreenerror", + "onmozorientationchange", + "onmozpointerlockchange", + "onmozpointerlockerror", + "onmscontentzoom", + "onmsfullscreenchange", + "onmsfullscreenerror", + "onmsgesturechange", + "onmsgesturedoubletap", + "onmsgestureend", + "onmsgesturehold", + "onmsgesturestart", + "onmsgesturetap", + "onmsgotpointercapture", + "onmsinertiastart", + "onmslostpointercapture", + "onmsmanipulationstatechanged", + "onmsneedkey", + "onmsorientationchange", + "onmspointercancel", + "onmspointerdown", + "onmspointerenter", + "onmspointerhover", + "onmspointerleave", + "onmspointermove", + "onmspointerout", + "onmspointerover", + "onmspointerup", + "onmssitemodejumplistitemremoved", + "onmsthumbnailclick", + "onnegotiationneeded", + "onnomatch", + "onnoupdate", + "onobsolete", + "onoffline", + "ononline", + "onopen", + "onorientationchange", + "onpagechange", + "onpagehide", + "onpageshow", + "onpaste", + "onpause", + "onplay", + "onplaying", + "onpluginstreamstart", + "onpointercancel", + "onpointerdown", + "onpointerenter", + "onpointerleave", + "onpointerlockchange", + "onpointerlockerror", + "onpointermove", + "onpointerout", + "onpointerover", + "onpointerup", + "onpopstate", + "onprogress", + "onpropertychange", + "onratechange", + "onreadystatechange", + "onremovestream", + "onremovetrack", + "onreset", + "onresize", + "onresizeend", + "onresizestart", + "onresourcetimingbufferfull", + "onresult", + "onresume", + "onrowenter", + "onrowexit", + "onrowsdelete", + "onrowsinserted", + "onscroll", + "onsearch", + "onseeked", + "onseeking", + "onselect", + "onselectionchange", + "onselectstart", + "onshow", + "onsignalingstatechange", + "onsoundend", + "onsoundstart", + "onspeechend", + "onspeechstart", + "onstalled", + "onstart", + "onstatechange", + "onstop", + "onstorage", + "onstoragecommit", + "onsubmit", + "onsuccess", + "onsuspend", + "ontextinput", + "ontimeout", + "ontimeupdate", + "ontoggle", + "ontouchcancel", + "ontouchend", + "ontouchmove", + "ontouchstart", + "ontransitionend", + "onunload", + "onupdateready", + "onupgradeneeded", + "onuserproximity", + "onversionchange", + "onvoiceschanged", + "onvolumechange", + "onwaiting", + "onwarning", + "onwebkitanimationend", + "onwebkitanimationiteration", + "onwebkitanimationstart", + "onwebkitcurrentplaybacktargetiswirelesschanged", + "onwebkitfullscreenchange", + "onwebkitfullscreenerror", + "onwebkitkeyadded", + "onwebkitkeyerror", + "onwebkitkeymessage", + "onwebkitneedkey", + "onwebkitorientationchange", + "onwebkitplaybacktargetavailabilitychanged", + "onwebkitpointerlockchange", + "onwebkitpointerlockerror", + "onwebkitresourcetimingbufferfull", + "onwebkittransitionend", + "onwheel", + "onzoom", + "opacity", + "open", + "openCursor", + "openDatabase", + "openKeyCursor", + "opener", + "opera", + "operationType", + "operator", + "opr", + "optimum", + "options", + "order", + "orderX", + "orderY", + "ordered", + "org", + "orient", + "orientAngle", + "orientType", + "orientation", + "origin", + "originalTarget", + "orphans", + "oscpu", + "outerHTML", + "outerHeight", + "outerText", + "outerWidth", + "outline", + "outline-color", + "outline-offset", + "outline-style", + "outline-width", + "outlineColor", + "outlineOffset", + "outlineStyle", + "outlineWidth", + "outputBuffer", + "overflow", + "overflow-x", + "overflow-y", + "overflowX", + "overflowY", + "overrideMimeType", + "oversample", + "ownerDocument", + "ownerElement", + "ownerNode", + "ownerRule", + "ownerSVGElement", + "owningElement", + "p1", + "p2", + "p3", + "p4", + "pad", + "padding", + "padding-bottom", + "padding-left", + "padding-right", + "padding-top", + "paddingBottom", + "paddingLeft", + "paddingRight", + "paddingTop", + "page", + "page-break-after", + "page-break-before", + "page-break-inside", + "pageBreakAfter", + "pageBreakBefore", + "pageBreakInside", + "pageCount", + "pageX", + "pageXOffset", + "pageY", + "pageYOffset", + "pages", + "paint-order", + "paintOrder", + "paintRequests", + "paintType", + "palette", + "panningModel", + "parent", + "parentElement", + "parentNode", + "parentRule", + "parentStyleSheet", + "parentTextEdit", + "parentWindow", + "parse", + "parseFloat", + "parseFromString", + "parseInt", + "participants", + "passive", + "password", + "pasteHTML", + "path", + "pathLength", + "pathSegList", + "pathSegType", + "pathSegTypeAsLetter", + "pathname", + "pattern", + "patternContentUnits", + "patternMismatch", + "patternTransform", + "patternUnits", + "pause", + "pauseAnimations", + "pauseOnExit", + "paused", + "pending", + "performance", + "permission", + "persisted", + "personalbar", + "perspective", + "perspective-origin", + "perspectiveOrigin", + "phoneticFamilyName", + "phoneticGivenName", + "photo", + "ping", + "pitch", + "pixelBottom", + "pixelDepth", + "pixelHeight", + "pixelLeft", + "pixelRight", + "pixelStorei", + "pixelTop", + "pixelUnitToMillimeterX", + "pixelUnitToMillimeterY", + "pixelWidth", + "placeholder", + "platform", + "play", + "playbackRate", + "playbackState", + "playbackTime", + "played", + "plugins", + "pluginspage", + "pname", + "pointer-events", + "pointerBeforeReferenceNode", + "pointerEnabled", + "pointerEvents", + "pointerId", + "pointerLockElement", + "pointerType", + "points", + "pointsAtX", + "pointsAtY", + "pointsAtZ", + "polygonOffset", + "pop", + "popupWindowFeatures", + "popupWindowName", + "popupWindowURI", + "port", + "port1", + "port2", + "ports", + "posBottom", + "posHeight", + "posLeft", + "posRight", + "posTop", + "posWidth", + "position", + "positionAlign", + "postError", + "postMessage", + "poster", + "pow", + "powerOff", + "preMultiplySelf", + "precision", + "preferredStyleSheetSet", + "preferredStylesheetSet", + "prefix", + "preload", + "prepend", + "preserveAlpha", + "preserveAspectRatio", + "preserveAspectRatioString", + "pressed", + "pressure", + "prevValue", + "preventDefault", + "preventExtensions", + "previousElementSibling", + "previousNode", + "previousPage", + "previousScale", + "previousSibling", + "previousTranslate", + "primaryKey", + "primitiveType", + "primitiveUnits", + "principals", + "print", + "privateKey", + "probablySupportsContext", + "process", + "processIceMessage", + "product", + "productSub", + "profile", + "profileEnd", + "profiles", + "prompt", + "properties", + "propertyIsEnumerable", + "propertyName", + "protocol", + "protocolLong", + "prototype", + "pseudoClass", + "pseudoElement", + "publicId", + "publicKey", + "published", + "push", + "pushNotification", + "pushState", + "put", + "putImageData", + "quadraticCurveTo", + "qualifier", + "queryCommandEnabled", + "queryCommandIndeterm", + "queryCommandState", + "queryCommandSupported", + "queryCommandText", + "queryCommandValue", + "querySelector", + "querySelectorAll", + "quote", + "quotes", + "r", + "r1", + "r2", + "race", + "radiogroup", + "radiusX", + "radiusY", + "random", + "range", + "rangeCount", + "rangeMax", + "rangeMin", + "rangeOffset", + "rangeOverflow", + "rangeParent", + "rangeUnderflow", + "rate", + "ratio", + "raw", + "read", + "readAsArrayBuffer", + "readAsBinaryString", + "readAsBlob", + "readAsDataURL", + "readAsText", + "readOnly", + "readPixels", + "readReportRequested", + "readyState", + "reason", + "reboot", + "receiver", + "receivers", + "recordNumber", + "recordset", + "rect", + "red", + "redirectCount", + "redirectEnd", + "redirectStart", + "reduce", + "reduceRight", + "reduction", + "refDistance", + "refX", + "refY", + "referenceNode", + "referrer", + "refresh", + "region", + "regionAnchorX", + "regionAnchorY", + "regionId", + "regions", + "register", + "registerContentHandler", + "registerElement", + "registerProtocolHandler", + "reject", + "rel", + "relList", + "relatedNode", + "relatedTarget", + "release", + "releaseCapture", + "releaseEvents", + "releasePointerCapture", + "releaseShaderCompiler", + "reliable", + "reload", + "remainingSpace", + "remoteDescription", + "remove", + "removeAllRanges", + "removeAttribute", + "removeAttributeNS", + "removeAttributeNode", + "removeBehavior", + "removeChild", + "removeCue", + "removeEventListener", + "removeFilter", + "removeImport", + "removeItem", + "removeListener", + "removeNamedItem", + "removeNamedItemNS", + "removeNode", + "removeParameter", + "removeProperty", + "removeRange", + "removeRegion", + "removeRule", + "removeSiteSpecificTrackingException", + "removeSourceBuffer", + "removeStream", + "removeTrack", + "removeVariable", + "removeWakeLockListener", + "removeWebWideTrackingException", + "removedNodes", + "renderbufferStorage", + "renderedBuffer", + "renderingMode", + "repeat", + "replace", + "replaceAdjacentText", + "replaceChild", + "replaceData", + "replaceId", + "replaceItem", + "replaceNode", + "replaceState", + "replaceTrack", + "replaceWholeText", + "reportValidity", + "requestAnimationFrame", + "requestAutocomplete", + "requestData", + "requestFullscreen", + "requestMediaKeySystemAccess", + "requestPermission", + "requestPointerLock", + "requestStart", + "requestingWindow", + "required", + "requiredExtensions", + "requiredFeatures", + "reset", + "resetTransform", + "resize", + "resizeBy", + "resizeTo", + "resolve", + "response", + "responseBody", + "responseEnd", + "responseStart", + "responseText", + "responseType", + "responseURL", + "responseXML", + "restore", + "result", + "resultType", + "resume", + "returnValue", + "rev", + "reverse", + "reversed", + "revocable", + "revokeObjectURL", + "rgbColor", + "right", + "rightContext", + "rightMargin", + "rolloffFactor", + "root", + "rootElement", + "rotate", + "rotateAxisAngle", + "rotateAxisAngleSelf", + "rotateFromVector", + "rotateFromVectorSelf", + "rotateSelf", + "rotation", + "rotationRate", + "round", + "rowIndex", + "rowSpan", + "rows", + "rubyAlign", + "rubyOverhang", + "rubyPosition", + "rules", + "runtime", + "runtimeStyle", + "rx", + "ry", + "safari", + "sampleCoverage", + "sampleRate", + "sandbox", + "save", + "scale", + "scale3d", + "scale3dSelf", + "scaleNonUniform", + "scaleNonUniformSelf", + "scaleSelf", + "scheme", + "scissor", + "scope", + "scopeName", + "scoped", + "screen", + "screenBrightness", + "screenEnabled", + "screenLeft", + "screenPixelToMillimeterX", + "screenPixelToMillimeterY", + "screenTop", + "screenX", + "screenY", + "scripts", + "scroll", + "scroll-behavior", + "scrollAmount", + "scrollBehavior", + "scrollBy", + "scrollByLines", + "scrollByPages", + "scrollDelay", + "scrollHeight", + "scrollIntoView", + "scrollIntoViewIfNeeded", + "scrollLeft", + "scrollLeftMax", + "scrollMaxX", + "scrollMaxY", + "scrollTo", + "scrollTop", + "scrollTopMax", + "scrollWidth", + "scrollX", + "scrollY", + "scrollbar3dLightColor", + "scrollbarArrowColor", + "scrollbarBaseColor", + "scrollbarDarkShadowColor", + "scrollbarFaceColor", + "scrollbarHighlightColor", + "scrollbarShadowColor", + "scrollbarTrackColor", + "scrollbars", + "scrolling", + "sdp", + "sdpMLineIndex", + "sdpMid", + "seal", + "search", + "searchBox", + "searchBoxJavaBridge_", + "searchParams", + "sectionRowIndex", + "secureConnectionStart", + "security", + "seed", + "seekable", + "seeking", + "select", + "selectAllChildren", + "selectNode", + "selectNodeContents", + "selectNodes", + "selectSingleNode", + "selectSubString", + "selected", + "selectedIndex", + "selectedOptions", + "selectedStyleSheetSet", + "selectedStylesheetSet", + "selection", + "selectionDirection", + "selectionEnd", + "selectionStart", + "selector", + "selectorText", + "self", + "send", + "sendAsBinary", + "sendBeacon", + "sender", + "sentTimestamp", + "separator", + "serializeToString", + "serviceWorker", + "sessionId", + "sessionStorage", + "set", + "setActive", + "setAlpha", + "setAttribute", + "setAttributeNS", + "setAttributeNode", + "setAttributeNodeNS", + "setBaseAndExtent", + "setBingCurrentSearchDefault", + "setCapture", + "setColor", + "setCompositeOperation", + "setCurrentTime", + "setCustomValidity", + "setData", + "setDate", + "setDragImage", + "setEnd", + "setEndAfter", + "setEndBefore", + "setEndPoint", + "setFillColor", + "setFilterRes", + "setFloat32", + "setFloat64", + "setFloatValue", + "setFullYear", + "setHours", + "setImmediate", + "setInt16", + "setInt32", + "setInt8", + "setInterval", + "setItem", + "setLineCap", + "setLineDash", + "setLineJoin", + "setLineWidth", + "setLocalDescription", + "setMatrix", + "setMatrixValue", + "setMediaKeys", + "setMilliseconds", + "setMinutes", + "setMiterLimit", + "setMonth", + "setNamedItem", + "setNamedItemNS", + "setNonUserCodeExceptions", + "setOrientToAngle", + "setOrientToAuto", + "setOrientation", + "setOverrideHistoryNavigationMode", + "setPaint", + "setParameter", + "setPeriodicWave", + "setPointerCapture", + "setPosition", + "setPreference", + "setProperty", + "setPrototypeOf", + "setRGBColor", + "setRGBColorICCColor", + "setRadius", + "setRangeText", + "setRemoteDescription", + "setRequestHeader", + "setResizable", + "setResourceTimingBufferSize", + "setRotate", + "setScale", + "setSeconds", + "setSelectionRange", + "setServerCertificate", + "setShadow", + "setSkewX", + "setSkewY", + "setStart", + "setStartAfter", + "setStartBefore", + "setStdDeviation", + "setStringValue", + "setStrokeColor", + "setSuggestResult", + "setTargetAtTime", + "setTargetValueAtTime", + "setTime", + "setTimeout", + "setTransform", + "setTranslate", + "setUTCDate", + "setUTCFullYear", + "setUTCHours", + "setUTCMilliseconds", + "setUTCMinutes", + "setUTCMonth", + "setUTCSeconds", + "setUint16", + "setUint32", + "setUint8", + "setUri", + "setValueAtTime", + "setValueCurveAtTime", + "setVariable", + "setVelocity", + "setVersion", + "setYear", + "settingName", + "settingValue", + "sex", + "shaderSource", + "shadowBlur", + "shadowColor", + "shadowOffsetX", + "shadowOffsetY", + "shadowRoot", + "shape", + "shape-rendering", + "shapeRendering", + "sheet", + "shift", + "shiftKey", + "shiftLeft", + "show", + "showHelp", + "showModal", + "showModalDialog", + "showModelessDialog", + "showNotification", + "sidebar", + "sign", + "signalingState", + "sin", + "singleNodeValue", + "sinh", + "size", + "sizeToContent", + "sizes", + "skewX", + "skewXSelf", + "skewY", + "skewYSelf", + "slice", + "slope", + "small", + "smooth", + "smil", + "smoothingTimeConstant", + "snapToLines", + "snapshotItem", + "snapshotLength", + "some", + "sort", + "source", + "sourceBuffer", + "sourceBuffers", + "sourceIndex", + "spacing", + "span", + "speakAs", + "speaking", + "specified", + "specularConstant", + "specularExponent", + "speechSynthesis", + "speed", + "speedOfSound", + "spellcheck", + "splice", + "split", + "splitText", + "spreadMethod", + "sqrt", + "src", + "srcElement", + "srcFilter", + "srcUrn", + "srcdoc", + "srclang", + "srcset", + "stack", + "stackTraceLimit", + "stacktrace", + "standalone", + "standby", + "start", + "startContainer", + "startIce", + "startOffset", + "startRendering", + "startTime", + "startsWith", + "state", + "status", + "statusMessage", + "statusText", + "statusbar", + "stdDeviationX", + "stdDeviationY", + "stencilFunc", + "stencilFuncSeparate", + "stencilMask", + "stencilMaskSeparate", + "stencilOp", + "stencilOpSeparate", + "step", + "stepDown", + "stepMismatch", + "stepUp", + "sticky", + "stitchTiles", + "stop", + "stop-color", + "stop-opacity", + "stopColor", + "stopImmediatePropagation", + "stopOpacity", + "stopPropagation", + "storageArea", + "storageName", + "storageStatus", + "storeSiteSpecificTrackingException", + "storeWebWideTrackingException", + "stpVersion", + "stream", + "strike", + "stringValue", + "stringify", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "strokeDasharray", + "strokeDashoffset", + "strokeLinecap", + "strokeLinejoin", + "strokeMiterlimit", + "strokeOpacity", + "strokeRect", + "strokeStyle", + "strokeText", + "strokeWidth", + "style", + "styleFloat", + "styleMedia", + "styleSheet", + "styleSheetSets", + "styleSheets", + "sub", + "subarray", + "subject", + "submit", + "subscribe", + "substr", + "substring", + "substringData", + "subtle", + "subtree", + "suffix", + "suffixes", + "summary", + "sup", + "supports", + "surfaceScale", + "surroundContents", + "suspend", + "suspendRedraw", + "swapCache", + "swapNode", + "sweepFlag", + "symbols", + "system", + "systemCode", + "systemId", + "systemLanguage", + "systemXDPI", + "systemYDPI", + "tBodies", + "tFoot", + "tHead", + "tabIndex", + "table", + "table-layout", + "tableLayout", + "tableValues", + "tag", + "tagName", + "tagUrn", + "tags", + "taintEnabled", + "takeRecords", + "tan", + "tanh", + "target", + "targetElement", + "targetTouches", + "targetX", + "targetY", + "tel", + "terminate", + "test", + "texImage2D", + "texParameterf", + "texParameteri", + "texSubImage2D", + "text", + "text-align", + "text-anchor", + "text-decoration", + "text-decoration-color", + "text-decoration-line", + "text-decoration-style", + "text-indent", + "text-overflow", + "text-rendering", + "text-shadow", + "text-transform", + "textAlign", + "textAlignLast", + "textAnchor", + "textAutospace", + "textBaseline", + "textContent", + "textDecoration", + "textDecorationBlink", + "textDecorationColor", + "textDecorationLine", + "textDecorationLineThrough", + "textDecorationNone", + "textDecorationOverline", + "textDecorationStyle", + "textDecorationUnderline", + "textIndent", + "textJustify", + "textJustifyTrim", + "textKashida", + "textKashidaSpace", + "textLength", + "textOverflow", + "textRendering", + "textShadow", + "textTracks", + "textTransform", + "textUnderlinePosition", + "then", + "threadId", + "threshold", + "tiltX", + "tiltY", + "time", + "timeEnd", + "timeStamp", + "timeout", + "timestamp", + "timestampOffset", + "timing", + "title", + "toArray", + "toBlob", + "toDataURL", + "toDateString", + "toElement", + "toExponential", + "toFixed", + "toFloat32Array", + "toFloat64Array", + "toGMTString", + "toISOString", + "toJSON", + "toLocaleDateString", + "toLocaleFormat", + "toLocaleLowerCase", + "toLocaleString", + "toLocaleTimeString", + "toLocaleUpperCase", + "toLowerCase", + "toMethod", + "toPrecision", + "toSdp", + "toSource", + "toStaticHTML", + "toString", + "toStringTag", + "toTimeString", + "toUTCString", + "toUpperCase", + "toggle", + "toggleLongPressEnabled", + "tooLong", + "toolbar", + "top", + "topMargin", + "total", + "totalFrameDelay", + "totalVideoFrames", + "touchAction", + "touches", + "trace", + "track", + "transaction", + "transactions", + "transform", + "transform-origin", + "transform-style", + "transformOrigin", + "transformPoint", + "transformString", + "transformStyle", + "transformToDocument", + "transformToFragment", + "transition", + "transition-delay", + "transition-duration", + "transition-property", + "transition-timing-function", + "transitionDelay", + "transitionDuration", + "transitionProperty", + "transitionTimingFunction", + "translate", + "translateSelf", + "translationX", + "translationY", + "trim", + "trimLeft", + "trimRight", + "trueSpeed", + "trunc", + "truncate", + "type", + "typeDetail", + "typeMismatch", + "typeMustMatch", + "types", + "ubound", + "undefined", + "unescape", + "uneval", + "unicode-bidi", + "unicodeBidi", + "uniform1f", + "uniform1fv", + "uniform1i", + "uniform1iv", + "uniform2f", + "uniform2fv", + "uniform2i", + "uniform2iv", + "uniform3f", + "uniform3fv", + "uniform3i", + "uniform3iv", + "uniform4f", + "uniform4fv", + "uniform4i", + "uniform4iv", + "uniformMatrix2fv", + "uniformMatrix3fv", + "uniformMatrix4fv", + "unique", + "uniqueID", + "uniqueNumber", + "unitType", + "units", + "unloadEventEnd", + "unloadEventStart", + "unlock", + "unmount", + "unobserve", + "unpause", + "unpauseAnimations", + "unreadCount", + "unregister", + "unregisterContentHandler", + "unregisterProtocolHandler", + "unscopables", + "unselectable", + "unshift", + "unsubscribe", + "unsuspendRedraw", + "unsuspendRedrawAll", + "unwatch", + "unwrapKey", + "update", + "updateCommands", + "updateIce", + "updateInterval", + "updateSettings", + "updated", + "updating", + "upload", + "upper", + "upperBound", + "upperOpen", + "uri", + "url", + "urn", + "urns", + "usages", + "useCurrentView", + "useMap", + "useProgram", + "usedSpace", + "userAgent", + "userLanguage", + "username", + "v8BreakIterator", + "vAlign", + "vLink", + "valid", + "validateProgram", + "validationMessage", + "validity", + "value", + "valueAsDate", + "valueAsNumber", + "valueAsString", + "valueInSpecifiedUnits", + "valueMissing", + "valueOf", + "valueText", + "valueType", + "values", + "vector-effect", + "vectorEffect", + "velocityAngular", + "velocityExpansion", + "velocityX", + "velocityY", + "vendor", + "vendorSub", + "verify", + "version", + "vertexAttrib1f", + "vertexAttrib1fv", + "vertexAttrib2f", + "vertexAttrib2fv", + "vertexAttrib3f", + "vertexAttrib3fv", + "vertexAttrib4f", + "vertexAttrib4fv", + "vertexAttribDivisorANGLE", + "vertexAttribPointer", + "vertical", + "vertical-align", + "verticalAlign", + "verticalOverflow", + "vibrate", + "videoHeight", + "videoTracks", + "videoWidth", + "view", + "viewBox", + "viewBoxString", + "viewTarget", + "viewTargetString", + "viewport", + "viewportAnchorX", + "viewportAnchorY", + "viewportElement", + "visibility", + "visibilityState", + "visible", + "vlinkColor", + "voice", + "volume", + "vrml", + "vspace", + "w", + "wand", + "warn", + "wasClean", + "watch", + "watchPosition", + "webdriver", + "webkitAddKey", + "webkitAnimation", + "webkitAnimationDelay", + "webkitAnimationDirection", + "webkitAnimationDuration", + "webkitAnimationFillMode", + "webkitAnimationIterationCount", + "webkitAnimationName", + "webkitAnimationPlayState", + "webkitAnimationTimingFunction", + "webkitAppearance", + "webkitAudioContext", + "webkitAudioDecodedByteCount", + "webkitAudioPannerNode", + "webkitBackfaceVisibility", + "webkitBackground", + "webkitBackgroundAttachment", + "webkitBackgroundClip", + "webkitBackgroundColor", + "webkitBackgroundImage", + "webkitBackgroundOrigin", + "webkitBackgroundPosition", + "webkitBackgroundPositionX", + "webkitBackgroundPositionY", + "webkitBackgroundRepeat", + "webkitBackgroundSize", + "webkitBackingStorePixelRatio", + "webkitBorderImage", + "webkitBorderImageOutset", + "webkitBorderImageRepeat", + "webkitBorderImageSlice", + "webkitBorderImageSource", + "webkitBorderImageWidth", + "webkitBoxAlign", + "webkitBoxDirection", + "webkitBoxFlex", + "webkitBoxOrdinalGroup", + "webkitBoxOrient", + "webkitBoxPack", + "webkitBoxSizing", + "webkitCancelAnimationFrame", + "webkitCancelFullScreen", + "webkitCancelKeyRequest", + "webkitCancelRequestAnimationFrame", + "webkitClearResourceTimings", + "webkitClosedCaptionsVisible", + "webkitConvertPointFromNodeToPage", + "webkitConvertPointFromPageToNode", + "webkitCreateShadowRoot", + "webkitCurrentFullScreenElement", + "webkitCurrentPlaybackTargetIsWireless", + "webkitDirectionInvertedFromDevice", + "webkitDisplayingFullscreen", + "webkitEnterFullScreen", + "webkitEnterFullscreen", + "webkitExitFullScreen", + "webkitExitFullscreen", + "webkitExitPointerLock", + "webkitFullScreenKeyboardInputAllowed", + "webkitFullscreenElement", + "webkitFullscreenEnabled", + "webkitGenerateKeyRequest", + "webkitGetAsEntry", + "webkitGetDatabaseNames", + "webkitGetEntries", + "webkitGetEntriesByName", + "webkitGetEntriesByType", + "webkitGetFlowByName", + "webkitGetGamepads", + "webkitGetImageDataHD", + "webkitGetNamedFlows", + "webkitGetRegionFlowRanges", + "webkitGetUserMedia", + "webkitHasClosedCaptions", + "webkitHidden", + "webkitIDBCursor", + "webkitIDBDatabase", + "webkitIDBDatabaseError", + "webkitIDBDatabaseException", + "webkitIDBFactory", + "webkitIDBIndex", + "webkitIDBKeyRange", + "webkitIDBObjectStore", + "webkitIDBRequest", + "webkitIDBTransaction", + "webkitImageSmoothingEnabled", + "webkitIndexedDB", + "webkitInitMessageEvent", + "webkitIsFullScreen", + "webkitKeys", + "webkitLineDashOffset", + "webkitLockOrientation", + "webkitMatchesSelector", + "webkitMediaStream", + "webkitNotifications", + "webkitOfflineAudioContext", + "webkitOrientation", + "webkitPeerConnection00", + "webkitPersistentStorage", + "webkitPointerLockElement", + "webkitPostMessage", + "webkitPreservesPitch", + "webkitPutImageDataHD", + "webkitRTCPeerConnection", + "webkitRegionOverset", + "webkitRequestAnimationFrame", + "webkitRequestFileSystem", + "webkitRequestFullScreen", + "webkitRequestFullscreen", + "webkitRequestPointerLock", + "webkitResolveLocalFileSystemURL", + "webkitSetMediaKeys", + "webkitSetResourceTimingBufferSize", + "webkitShadowRoot", + "webkitShowPlaybackTargetPicker", + "webkitSlice", + "webkitSpeechGrammar", + "webkitSpeechGrammarList", + "webkitSpeechRecognition", + "webkitSpeechRecognitionError", + "webkitSpeechRecognitionEvent", + "webkitStorageInfo", + "webkitSupportsFullscreen", + "webkitTemporaryStorage", + "webkitTextSizeAdjust", + "webkitTransform", + "webkitTransformOrigin", + "webkitTransition", + "webkitTransitionDelay", + "webkitTransitionDuration", + "webkitTransitionProperty", + "webkitTransitionTimingFunction", + "webkitURL", + "webkitUnlockOrientation", + "webkitUserSelect", + "webkitVideoDecodedByteCount", + "webkitVisibilityState", + "webkitWirelessVideoPlaybackDisabled", + "webkitdropzone", + "webstore", + "weight", + "whatToShow", + "wheelDelta", + "wheelDeltaX", + "wheelDeltaY", + "which", + "white-space", + "whiteSpace", + "wholeText", + "widows", + "width", + "will-change", + "willChange", + "willValidate", + "window", + "withCredentials", + "word-break", + "word-spacing", + "word-wrap", + "wordBreak", + "wordSpacing", + "wordWrap", + "wrap", + "wrapKey", + "write", + "writeln", + "writingMode", + "x", + "x1", + "x2", + "xChannelSelector", + "xmlEncoding", + "xmlStandalone", + "xmlVersion", + "xmlbase", + "xmllang", + "xmlspace", + "y", + "y1", + "y2", + "yChannelSelector", + "yandex", + "z", + "z-index", + "zIndex", + "zoom", + "zoomAndPan", + "zoomRectScreen" +]; diff --git a/public/node_modules/_terser@4.5.1@terser/tools/exit.js b/public/node_modules/_terser@4.5.1@terser/tools/exit.js new file mode 100644 index 000000000..17048d8ef --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/tools/exit.js @@ -0,0 +1,15 @@ +// workaround for tty output truncation upon process.exit() +var exit = process.exit; +process.exit = function() { + var args = [].slice.call(arguments); + process.once("uncaughtException", function() { + (function callback() { + if (process.stdout.bufferSize || process.stderr.bufferSize) { + setImmediate(callback); + } else { + exit.apply(process, args); + } + })(); + }); + throw exit; +}; diff --git a/public/node_modules/_terser@4.5.1@terser/tools/node.js b/public/node_modules/_terser@4.5.1@terser/tools/node.js new file mode 100644 index 000000000..b14580da6 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/tools/node.js @@ -0,0 +1,19 @@ +import { minify } from "../lib/minify"; + +export function default_options() { + const defs = {}; + + Object.keys(infer_options({ 0: 0 })).forEach((component) => { + const options = infer_options({ + [component]: {0: 0} + }); + + if (options) defs[component] = options; + }); + return defs; +} + +function infer_options(options) { + var result = minify("", options); + return result.error && result.error.defs; +} diff --git a/public/node_modules/_terser@4.5.1@terser/tools/postinstall.js b/public/node_modules/_terser@4.5.1@terser/tools/postinstall.js new file mode 100644 index 000000000..0d594c39f --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/tools/postinstall.js @@ -0,0 +1,7 @@ +if (process.env.CI || process.env.ADBLOCK || process.env.DISABLE_OPENCOLLECTIVE) return; + +console.log( +`########################################################### +# contribute to Terser! https://opencollective.com/terser # +########################################################### +`) diff --git a/public/node_modules/_terser@4.5.1@terser/tools/props.html b/public/node_modules/_terser@4.5.1@terser/tools/props.html new file mode 100644 index 000000000..eeae8a625 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/tools/props.html @@ -0,0 +1,55 @@ + + + + + + + diff --git a/public/node_modules/_terser@4.5.1@terser/tools/terser.d.ts b/public/node_modules/_terser@4.5.1@terser/tools/terser.d.ts new file mode 100644 index 000000000..9ed5032c2 --- /dev/null +++ b/public/node_modules/_terser@4.5.1@terser/tools/terser.d.ts @@ -0,0 +1,784 @@ +/// + +import { RawSourceMap } from 'source-map'; + +/** @deprecated since this versions basically do not exist */ +type ECMA_UNOFFICIAL = 6 | 7 | 8 | 9; + +export type ECMA = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | ECMA_UNOFFICIAL; + +export interface ParseOptions { + bare_returns?: boolean; + ecma?: ECMA; + html5_comments?: boolean; + shebang?: boolean; +} + +export interface CompressOptions { + arguments?: boolean; + arrows?: boolean; + booleans_as_integers?: boolean; + booleans?: boolean; + collapse_vars?: boolean; + comparisons?: boolean; + computed_props?: boolean; + conditionals?: boolean; + dead_code?: boolean; + defaults?: boolean; + directives?: boolean; + drop_console?: boolean; + drop_debugger?: boolean; + ecma?: ECMA; + evaluate?: boolean; + expression?: boolean; + global_defs?: object; + hoist_funs?: boolean; + hoist_props?: boolean; + hoist_vars?: boolean; + ie8?: boolean; + if_return?: boolean; + inline?: boolean | InlineFunctions; + join_vars?: boolean; + keep_classnames?: boolean | RegExp; + keep_fargs?: boolean; + keep_fnames?: boolean | RegExp; + keep_infinity?: boolean; + loops?: boolean; + module?: boolean; + negate_iife?: boolean; + passes?: number; + properties?: boolean; + pure_funcs?: string[]; + pure_getters?: boolean | 'strict'; + reduce_funcs?: boolean; + reduce_vars?: boolean; + sequences?: boolean | number; + side_effects?: boolean; + switches?: boolean; + toplevel?: boolean; + top_retain?: null | string | string[] | RegExp; + typeofs?: boolean; + unsafe_arrows?: boolean; + unsafe?: boolean; + unsafe_comps?: boolean; + unsafe_Function?: boolean; + unsafe_math?: boolean; + unsafe_methods?: boolean; + unsafe_proto?: boolean; + unsafe_regexp?: boolean; + unsafe_undefined?: boolean; + unused?: boolean; + warnings?: boolean; +} + +export enum InlineFunctions { + Disabled = 0, + SimpleFunctions = 1, + WithArguments = 2, + WithArgumentsAndVariables = 3 +} + +export interface MangleOptions { + eval?: boolean; + keep_classnames?: boolean | RegExp; + keep_fnames?: boolean | RegExp; + module?: boolean; + properties?: boolean | ManglePropertiesOptions; + reserved?: string[]; + safari10?: boolean; + toplevel?: boolean; +} + +export interface ManglePropertiesOptions { + builtins?: boolean; + debug?: boolean; + keep_quoted?: boolean; + regex?: RegExp | string; + reserved?: string[]; +} + +export interface OutputOptions { + ascii_only?: boolean; + beautify?: boolean; + braces?: boolean; + comments?: boolean | 'all' | 'some' | RegExp | Function; + ecma?: ECMA; + ie8?: boolean; + indent_level?: number; + indent_start?: number; + inline_script?: boolean; + keep_quoted_props?: boolean; + max_line_len?: number | false; + preamble?: string; + quote_keys?: boolean; + quote_style?: OutputQuoteStyle; + safari10?: boolean; + semicolons?: boolean; + shebang?: boolean; + shorthand?: boolean; + source_map?: SourceMapOptions; + webkit?: boolean; + width?: number; + wrap_iife?: boolean; +} + +export enum OutputQuoteStyle { + PreferDouble = 0, + AlwaysSingle = 1, + AlwaysDouble = 2, + AlwaysOriginal = 3 +} + +export interface MinifyOptions { + compress?: boolean | CompressOptions; + ecma?: ECMA; + ie8?: boolean; + keep_classnames?: boolean | RegExp; + keep_fnames?: boolean | RegExp; + mangle?: boolean | MangleOptions; + module?: boolean; + nameCache?: object; + output?: OutputOptions; + parse?: ParseOptions; + safari10?: boolean; + sourceMap?: boolean | SourceMapOptions; + toplevel?: boolean; + warnings?: boolean | 'verbose'; +} + +export interface MinifyOutput { + ast?: AST_Node; + code?: string; + error?: Error; + map?: RawSourceMap | string; + warnings?: string[]; +} + +export interface SourceMapOptions { + content?: RawSourceMap; + includeSources?: boolean; + filename?: string; + root?: string; + url?: string | 'inline'; +} + +declare function parse(text: string, options?: ParseOptions): AST_Node; + +export class TreeWalker { + constructor(callback: (node: AST_Node, descend?: (node: AST_Node) => void) => boolean | undefined); + directives: object; + find_parent(type: AST_Node): AST_Node | undefined; + has_directive(type: string): boolean; + loopcontrol_target(node: AST_Node): AST_Node | undefined; + parent(n: number): AST_Node | undefined; + pop(): void; + push(node: AST_Node): void; + self(): AST_Node | undefined; + stack: AST_Node[]; + visit: (node: AST_Node, descend: boolean) => any; +} + +export class TreeTransformer extends TreeWalker { + constructor( + before: (node: AST_Node, descend?: (node: AST_Node, tw: TreeWalker) => void, in_list?: boolean) => AST_Node | undefined, + after?: (node: AST_Node, in_list?: boolean) => AST_Node | undefined + ); + before: (node: AST_Node) => AST_Node; + after?: (node: AST_Node) => AST_Node; +} + +export function push_uniq(array: T[], el: T): void; + +export function minify(files: string | string[] | { [file: string]: string } | AST_Node, options?: MinifyOptions): MinifyOutput; + +export class AST_Node { + constructor(props?: object); + static BASE?: AST_Node; + static PROPS: string[]; + static SELF_PROPS: string[]; + static SUBCLASSES: AST_Node[]; + static documentation: string; + static propdoc?: Record; + static expressions?: AST_Node[]; + static warn?: (text: string, props: any) => void; + static from_mozilla_ast?: (node: AST_Node) => any; + walk: (visitor: TreeWalker) => void; + print_to_string: (options?: OutputOptions) => string; + transform: (tt: TreeTransformer, in_list?: boolean) => AST_Node; + TYPE: string; + CTOR: typeof AST_Node; +} + +declare class SymbolDef { + constructor(scope?: AST_Scope, orig?: object, init?: object); + name: string; + orig: AST_SymbolRef[]; + init: AST_SymbolRef; + eliminated: number; + scope: AST_Scope; + references: AST_SymbolRef[]; + replaced: number; + global: boolean; + export: boolean; + mangled_name: null | string; + undeclared: boolean; + id: number; +} + +type ArgType = AST_SymbolFunarg | AST_DefaultAssign | AST_Destructuring | AST_Expansion; + +declare class AST_Statement extends AST_Node { + constructor(props?: object); +} + +declare class AST_Debugger extends AST_Statement { + constructor(props?: object); +} + +declare class AST_Directive extends AST_Statement { + constructor(props?: object); + value: string; + quote: string; +} + +declare class AST_SimpleStatement extends AST_Statement { + constructor(props?: object); + body: AST_Node[]; +} + +declare class AST_Block extends AST_Statement { + constructor(props?: object); + body: AST_Node[]; + block_scope: AST_Scope | null; +} + +declare class AST_BlockStatement extends AST_Block { + constructor(props?: object); +} + +declare class AST_Scope extends AST_Block { + constructor(props?: object); + variables: any; + functions: any; + uses_with: boolean; + uses_eval: boolean; + parent_scope: AST_Scope | null; + enclosed: any; + cname: any; +} + +declare class AST_Toplevel extends AST_Scope { + constructor(props?: object); + globals: any; +} + +declare class AST_Lambda extends AST_Scope { + constructor(props?: object); + name: AST_SymbolDeclaration | null; + argnames: ArgType[]; + uses_arguments: boolean; + is_generator: boolean; + async: boolean; +} + +declare class AST_Accessor extends AST_Lambda { + constructor(props?: object); +} + +declare class AST_Function extends AST_Lambda { + constructor(props?: object); +} + +declare class AST_Arrow extends AST_Lambda { + constructor(props?: object); +} + +declare class AST_Defun extends AST_Lambda { + constructor(props?: object); +} + +declare class AST_Class extends AST_Scope { + constructor(props?: object); + name: AST_SymbolClass | AST_SymbolDefClass | null; + extends: AST_Node | null; + properties: AST_ObjectProperty[]; +} + +declare class AST_DefClass extends AST_Class { + constructor(props?: object); +} + +declare class AST_ClassExpression extends AST_Class { + constructor(props?: object); +} + +declare class AST_Switch extends AST_Block { + constructor(props?: object); + expression: AST_Node; +} + +declare class AST_SwitchBranch extends AST_Block { + constructor(props?: object); +} + +declare class AST_Default extends AST_SwitchBranch { + constructor(props?: object); +} + +declare class AST_Case extends AST_SwitchBranch { + constructor(props?: object); + expression: AST_Node; +} + +declare class AST_Try extends AST_Block { + constructor(props?: object); + bcatch: AST_Catch; + bfinally: null | AST_Finally; +} + +declare class AST_Catch extends AST_Block { + constructor(props?: object); + argname: ArgType; +} + +declare class AST_Finally extends AST_Block { + constructor(props?: object); +} + +declare class AST_EmptyStatement extends AST_Statement { + constructor(props?: object); +} + +declare class AST_StatementWithBody extends AST_Statement { + constructor(props?: object); + body: AST_Node[]; +} + +declare class AST_LabeledStatement extends AST_StatementWithBody { + constructor(props?: object); + label: AST_Label; +} + +declare class AST_IterationStatement extends AST_StatementWithBody { + constructor(props?: object); + block_scope: AST_Scope | null; +} + +declare class AST_DWLoop extends AST_IterationStatement { + constructor(props?: object); + condition: AST_Node; +} + +declare class AST_Do extends AST_DWLoop { + constructor(props?: object); +} + +declare class AST_While extends AST_DWLoop { + constructor(props?: object); +} + +declare class AST_For extends AST_IterationStatement { + constructor(props?: object); + init: AST_Node | null; + condition: AST_Node | null; + step: AST_Node | null; +} + +declare class AST_ForIn extends AST_IterationStatement { + constructor(props?: object); + init: AST_Node | null; + object: AST_Node; +} + +declare class AST_ForOf extends AST_ForIn { + constructor(props?: object); + await: boolean; +} + +declare class AST_With extends AST_StatementWithBody { + constructor(props?: object); + expression: AST_Node; +} + +declare class AST_If extends AST_StatementWithBody { + constructor(props?: object); + condition: AST_Node; + alternative: AST_Node | null; +} + +declare class AST_Jump extends AST_Statement { + constructor(props?: object); +} + +declare class AST_Exit extends AST_Jump { + constructor(props?: object); + value: AST_Node | null; +} + +declare class AST_Return extends AST_Exit { + constructor(props?: object); +} + +declare class AST_Throw extends AST_Exit { + constructor(props?: object); +} + +declare class AST_LoopControl extends AST_Jump { + constructor(props?: object); + label: null | AST_LabelRef; +} + +declare class AST_Break extends AST_LoopControl { + constructor(props?: object); +} + +declare class AST_Continue extends AST_LoopControl { + constructor(props?: object); +} + +declare class AST_Definitions extends AST_Statement { + constructor(props?: object); + definitions: AST_VarDef[]; +} + +declare class AST_Var extends AST_Definitions { + constructor(props?: object); +} + +declare class AST_Let extends AST_Definitions { + constructor(props?: object); +} + +declare class AST_Const extends AST_Definitions { + constructor(props?: object); +} + +declare class AST_Export extends AST_Statement { + constructor(props?: object); + exported_definition: AST_Definitions | AST_Lambda | AST_DefClass | null; + exported_value: AST_Node | null; + is_default: boolean; + exported_names: AST_NameMapping[]; + module_name: AST_String; +} + +declare class AST_Expansion extends AST_Node { + constructor(props?: object); + expression: AST_Node; +} + +declare class AST_Destructuring extends AST_Node { + constructor(props?: object); + names: AST_Node[]; + is_array: boolean; +} + +declare class AST_PrefixedTemplateString extends AST_Node { + constructor(props?: object); + template_string: AST_TemplateString; + prefix: AST_Node; +} + +declare class AST_TemplateString extends AST_Node { + constructor(props?: object); + segments: AST_Node[]; +} + +declare class AST_TemplateSegment extends AST_Node { + constructor(props?: object); + value: string; + raw: string; +} + +declare class AST_NameMapping extends AST_Node { + constructor(props?: object); + foreign_name: AST_Symbol; + name: AST_SymbolExport | AST_SymbolImport; +} + +declare class AST_Import extends AST_Node { + constructor(props?: object); + imported_name: null | AST_SymbolImport; + imported_names: AST_NameMapping[]; + module_name: AST_String; +} + +declare class AST_VarDef extends AST_Node { + constructor(props?: object); + name: AST_Destructuring | AST_SymbolConst | AST_SymbolLet | AST_SymbolVar; + value: AST_Node | null; +} + +declare class AST_Call extends AST_Node { + constructor(props?: object); + expression: AST_Node; + args: AST_Node[]; +} + +declare class AST_New extends AST_Call { + constructor(props?: object); +} + +declare class AST_Sequence extends AST_Node { + constructor(props?: object); + expressions: AST_Node[]; +} + +declare class AST_PropAccess extends AST_Node { + constructor(props?: object); + expression: AST_Node; + property: AST_Node | string; +} + +declare class AST_Dot extends AST_PropAccess { + constructor(props?: object); +} + +declare class AST_Sub extends AST_PropAccess { + constructor(props?: object); +} + +declare class AST_Unary extends AST_Node { + constructor(props?: object); + operator: string; + expression: AST_Node; +} + +declare class AST_UnaryPrefix extends AST_Unary { + constructor(props?: object); +} + +declare class AST_UnaryPostfix extends AST_Unary { + constructor(props?: object); +} + +declare class AST_Binary extends AST_Node { + constructor(props?: object); + operator: string; + left: AST_Node; + right: AST_Node; +} + +declare class AST_Assign extends AST_Binary { + constructor(props?: object); +} + +declare class AST_DefaultAssign extends AST_Binary { + constructor(props?: object); +} + +declare class AST_Conditional extends AST_Node { + constructor(props?: object); + condition: AST_Node; + consequent: AST_Node; + alternative: AST_Node; +} + +declare class AST_Array extends AST_Node { + constructor(props?: object); + elements: AST_Node[]; +} + +declare class AST_Object extends AST_Node { + constructor(props?: object); + properties: AST_ObjectProperty[]; +} + +declare class AST_ObjectProperty extends AST_Node { + constructor(props?: object); + key: string | number | AST_Node; + value: AST_Node; +} + +declare class AST_ObjectKeyVal extends AST_ObjectProperty { + constructor(props?: object); + quote: string; +} + +declare class AST_ObjectSetter extends AST_ObjectProperty { + constructor(props?: object); + quote: string; + static: boolean; +} + +declare class AST_ObjectGetter extends AST_ObjectProperty { + constructor(props?: object); + quote: string; + static: boolean; +} + +declare class AST_ConciseMethod extends AST_ObjectProperty { + constructor(props?: object); + quote: string; + static: boolean; + is_generator: boolean; + async: boolean; +} + +declare class AST_Symbol extends AST_Node { + constructor(props?: object); + scope: AST_Scope; + name: string; + thedef: SymbolDef; +} + +declare class AST_SymbolDeclaration extends AST_Symbol { + constructor(props?: object); + init: AST_Node | null; +} + +declare class AST_SymbolVar extends AST_SymbolDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolFunarg extends AST_SymbolVar { + constructor(props?: object); +} + +declare class AST_SymbolBlockDeclaration extends AST_SymbolDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolConst extends AST_SymbolBlockDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolLet extends AST_SymbolBlockDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolDefClass extends AST_SymbolBlockDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolCatch extends AST_SymbolBlockDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolImport extends AST_SymbolBlockDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolDefun extends AST_SymbolDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolLambda extends AST_SymbolDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolClass extends AST_SymbolDeclaration { + constructor(props?: object); +} + +declare class AST_SymbolMethod extends AST_Symbol { + constructor(props?: object); +} + +declare class AST_SymbolImportForeign extends AST_Symbol { + constructor(props?: object); +} + +declare class AST_Label extends AST_Symbol { + constructor(props?: object); + references: AST_LoopControl | null; +} + +declare class AST_SymbolRef extends AST_Symbol { + constructor(props?: object); +} + +declare class AST_SymbolExport extends AST_SymbolRef { + constructor(props?: object); +} + +declare class AST_SymbolExportForeign extends AST_Symbol { + constructor(props?: object); +} + +declare class AST_LabelRef extends AST_Symbol { + constructor(props?: object); +} + +declare class AST_This extends AST_Symbol { + constructor(props?: object); +} + +declare class AST_Super extends AST_This { + constructor(props?: object); +} + +declare class AST_NewTarget extends AST_Node { + constructor(props?: object); +} + +declare class AST_Constant extends AST_Node { + constructor(props?: object); +} + +declare class AST_String extends AST_Constant { + constructor(props?: object); + value: string; + quote: string; +} + +declare class AST_Number extends AST_Constant { + constructor(props?: object); + value: number; + literal: string; +} + +declare class AST_RegExp extends AST_Constant { + constructor(props?: object); + value: { + source: string, + flags: string + }; +} + +declare class AST_Atom extends AST_Constant { + constructor(props?: object); +} + +declare class AST_Null extends AST_Atom { + constructor(props?: object); +} + +declare class AST_NaN extends AST_Atom { + constructor(props?: object); +} + +declare class AST_Undefined extends AST_Atom { + constructor(props?: object); +} + +declare class AST_Hole extends AST_Atom { + constructor(props?: object); +} + +declare class AST_Infinity extends AST_Atom { + constructor(props?: object); +} + +declare class AST_Boolean extends AST_Atom { + constructor(props?: object); +} + +declare class AST_False extends AST_Boolean { + constructor(props?: object); +} + +declare class AST_True extends AST_Boolean { + constructor(props?: object); +} + +declare class AST_Await extends AST_Node { + constructor(props?: object); + expression: AST_Node; +} + +declare class AST_Yield extends AST_Node { + constructor(props?: object); + expression: AST_Node; + is_star: boolean; +} diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/.nyc_output/54942.json b/public/node_modules/_unique-filename@1.1.1@unique-filename/.nyc_output/54942.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/.nyc_output/54942.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/.nyc_output/54944.json b/public/node_modules/_unique-filename@1.1.1@unique-filename/.nyc_output/54944.json new file mode 100644 index 000000000..3ce72e597 --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/.nyc_output/54944.json @@ -0,0 +1 @@ +{"./index.js":{"path":"./index.js","s":{"1":1,"2":1,"3":1,"4":6},"b":{"1":[4,2]},"f":{"1":6},"fnMap":{"1":{"name":"(anonymous_1)","line":6,"loc":{"start":{"line":6,"column":17},"end":{"line":6,"column":51}}}},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":26}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":39}},"3":{"start":{"line":6,"column":0},"end":{"line":8,"column":1}},"4":{"start":{"line":7,"column":2},"end":{"line":7,"column":77}}},"branchMap":{"1":{"line":7,"type":"cond-expr","locations":[{"start":{"line":7,"column":39},"end":{"line":7,"column":51}},{"start":{"line":7,"column":54},"end":{"line":7,"column":56}}]}}}} \ No newline at end of file diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/LICENSE b/public/node_modules/_unique-filename@1.1.1@unique-filename/LICENSE new file mode 100644 index 000000000..69619c125 --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/LICENSE @@ -0,0 +1,5 @@ +Copyright 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 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/public/node_modules/_unique-filename@1.1.1@unique-filename/README.md b/public/node_modules/_unique-filename@1.1.1@unique-filename/README.md new file mode 100644 index 000000000..74b62b2ab --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/README.md @@ -0,0 +1,33 @@ +unique-filename +=============== + +Generate a unique filename for use in temporary directories or caches. + +``` +var uniqueFilename = require('unique-filename') + +// returns something like: /tmp/912ec803b2ce49e4a541068d495ab570 +var randomTmpfile = uniqueFilename(os.tmpdir()) + +// returns something like: /tmp/my-test-912ec803b2ce49e4a541068d495ab570 +var randomPrefixedTmpfile = uniqueFilename(os.tmpdir(), 'my-test') + +var uniqueTmpfile = uniqueFilename('/tmp', 'testing', '/my/thing/to/uniq/on') +``` + +### uniqueFilename(*dir*, *fileprefix*, *uniqstr*) → String + +Returns the full path of a unique filename that looks like: +`dir/prefix-7ddd44c0` +or `dir/7ddd44c0` + +*dir* – The path you want the filename in. `os.tmpdir()` is a good choice for this. + +*fileprefix* – A string to append prior to the unique part of the filename. +The parameter is required if *uniqstr* is also passed in but is otherwise +optional and can be `undefined`/`null`/`''`. If present and not empty +then this string plus a hyphen are prepended to the unique part. + +*uniqstr* – Optional, if not passed the unique part of the resulting +filename will be random. If passed in it will be generated from this string +in a reproducable way. diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/__root__/index.html b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/__root__/index.html new file mode 100644 index 000000000..cd55391a6 --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/__root__/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for __root__/ + + + + + + +
+

Code coverage report for __root__/

+

+ Statements: 100% (4 / 4)      + Branches: 100% (2 / 2)      + Functions: 100% (1 / 1)      + Lines: 100% (4 / 4)      + Ignored: none      +

+
All files » __root__/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
+
+
+ + + + + + diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/__root__/index.js.html b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/__root__/index.js.html new file mode 100644 index 000000000..02e5768d3 --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/__root__/index.js.html @@ -0,0 +1,69 @@ + + + + Code coverage report for index.js + + + + + + +
+

Code coverage report for index.js

+

+ Statements: 100% (4 / 4)      + Branches: 100% (2 / 2)      + Functions: 100% (1 / 1)      + Lines: 100% (4 / 4)      + Ignored: none      +

+
All files » __root__/ » index.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9  +1 +  +1 +  +1 +6 +  + 
'use strict'
+var path = require('path')
+ 
+var uniqueSlug = require('unique-slug')
+ 
+module.exports = function (filepath, prefix, uniq) {
+  return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq))
+}
+ 
+ +
+ + + + + + diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/base.css b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/base.css new file mode 100644 index 000000000..a6a2f3284 --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/base.css @@ -0,0 +1,182 @@ +body, html { + margin:0; padding: 0; +} +body { + font-family: Helvetica Neue, Helvetica,Arial; + font-size: 10pt; +} +div.header, div.footer { + background: #eee; + padding: 1em; +} +div.header { + z-index: 100; + position: fixed; + top: 0; + border-bottom: 1px solid #666; + width: 100%; +} +div.footer { + border-top: 1px solid #666; +} +div.body { + margin-top: 10em; +} +div.meta { + font-size: 90%; + text-align: center; +} +h1, h2, h3 { + font-weight: normal; +} +h1 { + font-size: 12pt; +} +h2 { + font-size: 10pt; +} +pre { + font-family: Consolas, Menlo, Monaco, monospace; + margin: 0; + padding: 0; + line-height: 1.3; + font-size: 14px; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} + +div.path { font-size: 110%; } +div.path a:link, div.path a:visited { color: #000; } +table.coverage { border-collapse: collapse; margin:0; padding: 0 } + +table.coverage td { + margin: 0; + padding: 0; + color: #111; + vertical-align: top; +} +table.coverage td.line-count { + width: 50px; + text-align: right; + padding-right: 5px; +} +table.coverage td.line-coverage { + color: #777 !important; + text-align: right; + border-left: 1px solid #666; + border-right: 1px solid #666; +} + +table.coverage td.text { +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 40px; +} +table.coverage td span.cline-neutral { + background: #eee; +} +table.coverage td span.cline-yes { + background: #b5d592; + color: #999; +} +table.coverage td span.cline-no { + background: #fc8c84; +} + +.cstat-yes { color: #111; } +.cstat-no { background: #fc8c84; color: #111; } +.fstat-no { background: #ffc520; color: #111 !important; } +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +.missing-if-branch { + display: inline-block; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: black; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} + +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} + +.entity, .metric { font-weight: bold; } +.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; } +.metric small { font-size: 80%; font-weight: normal; color: #666; } + +div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; } +div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; } +div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; } +div.coverage-summary th.file { border-right: none !important; } +div.coverage-summary th.pic { border-left: none !important; text-align: right; } +div.coverage-summary th.pct { border-right: none !important; } +div.coverage-summary th.abs { border-left: none !important; text-align: right; } +div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; } +div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; } +div.coverage-summary td.file { border-left: 1px solid #666; white-space: nowrap; } +div.coverage-summary td.pic { min-width: 120px !important; } +div.coverage-summary a:link { text-decoration: none; color: #000; } +div.coverage-summary a:visited { text-decoration: none; color: #777; } +div.coverage-summary a:hover { text-decoration: underline; } +div.coverage-summary tfoot td { border-top: 1px solid #666; } + +div.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +div.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +div.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} + +.high { background: #b5d592 !important; } +.medium { background: #ffe87c !important; } +.low { background: #fc8c84 !important; } + +span.cover-fill, span.cover-empty { + display:inline-block; + border:1px solid #444; + background: white; + height: 12px; +} +span.cover-fill { + background: #ccc; + border-right: 1px solid #444; +} +span.cover-empty { + background: white; + border-left: none; +} +span.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/index.html b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/index.html new file mode 100644 index 000000000..b10d186cc --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for All files + + + + + + +
+

Code coverage report for All files

+

+ Statements: 100% (4 / 4)      + Branches: 100% (2 / 2)      + Functions: 100% (1 / 1)      + Lines: 100% (4 / 4)      + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
__root__/100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
+
+
+ + + + + + diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/prettify.css b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/prettify.css new file mode 100644 index 000000000..b317a7cda --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/prettify.js b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/prettify.js new file mode 100644 index 000000000..ef51e0386 --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/sort-arrow-sprite.png b/public/node_modules/_unique-filename@1.1.1@unique-filename/coverage/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + el = getNthColumn(i).querySelector('.sorter'); + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/index.js b/public/node_modules/_unique-filename@1.1.1@unique-filename/index.js new file mode 100644 index 000000000..02bf1e273 --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/index.js @@ -0,0 +1,8 @@ +'use strict' +var path = require('path') + +var uniqueSlug = require('unique-slug') + +module.exports = function (filepath, prefix, uniq) { + return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq)) +} diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/node_modules/unique-slug b/public/node_modules/_unique-filename@1.1.1@unique-filename/node_modules/unique-slug new file mode 120000 index 000000000..62a2633c2 --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/node_modules/unique-slug @@ -0,0 +1 @@ +../../_unique-slug@2.0.2@unique-slug \ No newline at end of file diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/package.json b/public/node_modules/_unique-filename@1.1.1@unique-filename/package.json new file mode 100644 index 000000000..bbc819bed --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/package.json @@ -0,0 +1,30 @@ +{ + "name": "unique-filename", + "version": "1.1.1", + "description": "Generate a unique filename for use in temporary directories or caches.", + "main": "index.js", + "scripts": { + "test": "standard && tap test" + }, + "repository": { + "type": "git", + "url": "https://github.com/iarna/unique-filename.git" + }, + "keywords": [], + "author": "Rebecca Turner (http://re-becca.org/)", + "license": "ISC", + "bugs": { + "url": "https://github.com/iarna/unique-filename/issues" + }, + "homepage": "https://github.com/iarna/unique-filename", + "devDependencies": { + "standard": "^5.4.1", + "tap": "^2.3.1" + }, + "dependencies": { + "unique-slug": "^2.0.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "unique-filename@1.1.1", + "_resolved": "https://registry.npm.taobao.org/unique-filename/download/unique-filename-1.1.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_unique-filename@1.1.1@unique-filename/test/index.js b/public/node_modules/_unique-filename@1.1.1@unique-filename/test/index.js new file mode 100644 index 000000000..105b4e52e --- /dev/null +++ b/public/node_modules/_unique-filename@1.1.1@unique-filename/test/index.js @@ -0,0 +1,23 @@ +'sue strict' +var t = require('tap') +var uniqueFilename = require('../index.js') + +t.plan(6) + +var randomTmpfile = uniqueFilename('tmp') +t.like(randomTmpfile, /^tmp.[a-f0-9]{8}$/, 'random tmp file') + +var randomAgain = uniqueFilename('tmp') +t.notEqual(randomAgain, randomTmpfile, 'random tmp files are not the same') + +var randomPrefixedTmpfile = uniqueFilename('tmp', 'my-test') +t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{8}$/, 'random prefixed tmp file') + +var randomPrefixedAgain = uniqueFilename('tmp', 'my-test') +t.notEqual(randomPrefixedAgain, randomPrefixedTmpfile, 'random prefixed tmp files are not the same') + +var uniqueTmpfile = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') +t.like(uniqueTmpfile, /^tmp.testing-7ddd44c0$/, 'unique filename') + +var uniqueAgain = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') +t.is(uniqueTmpfile, uniqueAgain, 'same unique string component produces same filename') diff --git a/public/node_modules/_unique-slug@2.0.2@unique-slug/.travis.yml b/public/node_modules/_unique-slug@2.0.2@unique-slug/.travis.yml new file mode 100644 index 000000000..5651fce24 --- /dev/null +++ b/public/node_modules/_unique-slug@2.0.2@unique-slug/.travis.yml @@ -0,0 +1,10 @@ +language: node_js +sudo: false +before_install: + - "npm -g install npm" +node_js: + - "6" + - "8" + - "10" + - "lts/*" + - "node" diff --git a/public/node_modules/_unique-slug@2.0.2@unique-slug/LICENSE b/public/node_modules/_unique-slug@2.0.2@unique-slug/LICENSE new file mode 100644 index 000000000..7953647e7 --- /dev/null +++ b/public/node_modules/_unique-slug@2.0.2@unique-slug/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright 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 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/public/node_modules/_unique-slug@2.0.2@unique-slug/README.md b/public/node_modules/_unique-slug@2.0.2@unique-slug/README.md new file mode 100644 index 000000000..87f92f1d1 --- /dev/null +++ b/public/node_modules/_unique-slug@2.0.2@unique-slug/README.md @@ -0,0 +1,19 @@ +unique-slug +=========== + +Generate a unique character string suitible for use in files and URLs. + +``` +var uniqueSlug = require('unique-slug') + +var randomSlug = uniqueSlug() +var fileSlug = uniqueSlug('/etc/passwd') +``` + +### uniqueSlug(*str*) → String (8 chars) + +If *str* is passed in then the return value will be its murmur hash in +hex. + +If *str* is not passed in, it will be 4 randomly generated bytes +converted into 8 hexadecimal characters. diff --git a/public/node_modules/_unique-slug@2.0.2@unique-slug/index.js b/public/node_modules/_unique-slug@2.0.2@unique-slug/index.js new file mode 100644 index 000000000..fa4761ad2 --- /dev/null +++ b/public/node_modules/_unique-slug@2.0.2@unique-slug/index.js @@ -0,0 +1,11 @@ +'use strict' +var MurmurHash3 = require('imurmurhash') + +module.exports = function (uniq) { + if (uniq) { + var hash = new MurmurHash3(uniq) + return ('00000000' + hash.result().toString(16)).substr(-8) + } else { + return (Math.random().toString(16) + '0000000').substr(2, 8) + } +} diff --git a/public/node_modules/_unique-slug@2.0.2@unique-slug/node_modules/imurmurhash b/public/node_modules/_unique-slug@2.0.2@unique-slug/node_modules/imurmurhash new file mode 120000 index 000000000..835a44388 --- /dev/null +++ b/public/node_modules/_unique-slug@2.0.2@unique-slug/node_modules/imurmurhash @@ -0,0 +1 @@ +../../_imurmurhash@0.1.4@imurmurhash \ No newline at end of file diff --git a/public/node_modules/_unique-slug@2.0.2@unique-slug/package.json b/public/node_modules/_unique-slug@2.0.2@unique-slug/package.json new file mode 100644 index 000000000..4651884ec --- /dev/null +++ b/public/node_modules/_unique-slug@2.0.2@unique-slug/package.json @@ -0,0 +1,26 @@ +{ + "name": "unique-slug", + "version": "2.0.2", + "description": "Generate a unique character string suitible for use in files and URLs.", + "main": "index.js", + "scripts": { + "test": "standard && tap --coverage test" + }, + "keywords": [], + "author": "Rebecca Turner (http://re-becca.org)", + "license": "ISC", + "devDependencies": { + "standard": "^12.0.1", + "tap": "^12.7.0" + }, + "repository": { + "type": "git", + "url": "git://github.com/iarna/unique-slug.git" + }, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "unique-slug@2.0.2", + "_resolved": "https://registry.npm.taobao.org/unique-slug/download/unique-slug-2.0.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_unique-slug@2.0.2@unique-slug/test/index.js b/public/node_modules/_unique-slug@2.0.2@unique-slug/test/index.js new file mode 100644 index 000000000..0f4ccad04 --- /dev/null +++ b/public/node_modules/_unique-slug@2.0.2@unique-slug/test/index.js @@ -0,0 +1,13 @@ +'use strict' +var t = require('tap') +var uniqueSlug = require('../index.js') + +t.plan(5) +var slugA = uniqueSlug() +t.is(slugA.length, 8, 'random slugs are 8 chars') +t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same") +var base = '/path/to/thingy' +var slugB = uniqueSlug(base) +t.is(slugB.length, 8, 'string based slugs are 8 chars') +t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same') +t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different') diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/README.md b/public/node_modules/_uri-js@4.2.2@uri-js/README.md new file mode 100644 index 000000000..3f225e745 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/README.md @@ -0,0 +1,199 @@ +# URI.js + +URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc). +It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications. + +URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.2kb (gzipped, 16kb deflated). + +## API + +### Parsing + + URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body"); + //returns: + //{ + // scheme : "uri", + // userinfo : "user:pass", + // host : "example.com", + // port : 123, + // path : "/one/two.three", + // query : "q1=a1&q2=a2", + // fragment : "body" + //} + +### Serializing + + URI.serialize({scheme : "http", host : "example.com", fragment : "footer"}) === "http://example.com/#footer" + +### Resolving + + URI.resolve("uri://a/b/c/d?q", "../../g") === "uri://a/g" + +### Normalizing + + URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html") === "http://abc.com/~smith/home.html" + +### Comparison + + URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d") === true + +### IP Support + + //IPv4 normalization + URI.normalize("//192.068.001.000") === "//192.68.1.0" + + //IPv6 normalization + URI.normalize("//[2001:0:0DB8::0:0001]") === "//[2001:0:db8::1]" + + //IPv6 zone identifier support + URI.parse("//[2001:db8::7%25en1]"); + //returns: + //{ + // host : "2001:db8::7%en1" + //} + +### IRI Support + + //convert IRI to URI + URI.serialize(URI.parse("http://examplé.org/rosé")) === "http://xn--exampl-gva.org/ros%C3%A9" + //convert URI to IRI + URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true}) === "http://examplé.org/rosé" + +### Options + +All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties: + +* `scheme` (string) + + Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior. + +* `reference` (string) + + If set to `"suffix"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme. + +* `tolerant` (boolean, false) + + If set to `true`, the parser will relax URI resolving rules. + +* `absolutePath` (boolean, false) + + If set to `true`, the serializer will not resolve a relative `path` component. + +* `iri` (boolean, false) + + If set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt). + +* `unicodeSupport` (boolean, false) + + If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt). + +* `domainHost` (boolean, false) + + If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt). + +## Scheme Extendable + +URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes: + +* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\] +* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\] +* mailto \[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\] +* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\] +* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\] + +### HTTP Support + + URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true + +### Mailto Support + + URI.parse("mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!"); + //returns: + //{ + // scheme : "mailto", + // to : ["alpha@example.com", "bravo@example.com"], + // subject : "SUBSCRIBE", + // body : "Sign me up!" + //} + + URI.serialize({ + scheme : "mailto", + to : ["alpha@example.com"], + subject : "REMOVE", + body : "Please remove me", + headers : { + cc : "charlie@example.com" + } + }) === "mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me" + +### URN Support + + URI.parse("urn:example:foo"); + //returns: + //{ + // scheme : "urn", + // nid : "example", + // nss : "foo", + //} + +#### URN UUID Support + + URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); + //returns: + //{ + // scheme : "urn", + // nid : "example", + // uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", + //} + +## Usage + +To load in a browser, use the following tag: + + + +To load in a CommonJS (Node.js) environment, first install with npm by running on the command line: + + npm install uri-js + +Then, in your code, load it using: + + const URI = require("uri-js"); + +If you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using: + + import * as URI from "uri-js"; + +Or you can load just what you need using named exports: + + import { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from "uri-js"; + +## Breaking changes + +### Breaking changes from 3.x + +URN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler. + +The UUID of a URN can now be found in the `uuid` property. + +### Breaking changes from 2.x + +URI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful. + +### Breaking changes from 1.x + +The `errors` array on parsed components is now an `error` string. + +## License ([Simplified BSD](http://en.wikipedia.org/wiki/BSD_licenses#2-clause)) + +Copyright 2011 Gary Court. All rights reserved. + +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 GARY COURT "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 GARY COURT 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. + +The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/bower.json b/public/node_modules/_uri-js@4.2.2@uri-js/bower.json new file mode 100644 index 000000000..7a4044017 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/bower.json @@ -0,0 +1,47 @@ +{ + "name": "uri-js", + "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", + "main": "dist/es5/uri.all.js", + "moduleType": [ + "globals", + "amd", + "node", + "es6" + ], + "authors": [ + "Gary Court " + ], + "license": "BSD-2-Clause", + "keywords": [ + "URI", + "IRI", + "IDN", + "URN", + "HTTP", + "HTTPS", + "MAILTO", + "RFC3986", + "RFC3987", + "RFC5891", + "RFC2616", + "RFC2818", + "RFC2141", + "RFC4122", + "RFC6068" + ], + "homepage": "https://github.com/garycourt/uri-js", + "repository": { + "type": "git", + "url": "http://github.com/garycourt/uri-js" + }, + "dependencies": { + "punycode": "^2.1.0" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.d.ts new file mode 100644 index 000000000..320f53417 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.d.ts @@ -0,0 +1,59 @@ +export interface URIComponents { + scheme?: string; + userinfo?: string; + host?: string; + port?: number | string; + path?: string; + query?: string; + fragment?: string; + reference?: string; + error?: string; +} +export interface URIOptions { + scheme?: string; + reference?: string; + tolerant?: boolean; + absolutePath?: boolean; + iri?: boolean; + unicodeSupport?: boolean; + domainHost?: boolean; +} +export interface URISchemeHandler { + scheme: string; + parse(components: ParentComponents, options: Options): Components; + serialize(components: Components, options: Options): ParentComponents; + unicodeSupport?: boolean; + domainHost?: boolean; + absolutePath?: boolean; +} +export interface URIRegExps { + NOT_SCHEME: RegExp; + NOT_USERINFO: RegExp; + NOT_HOST: RegExp; + NOT_PATH: RegExp; + NOT_PATH_NOSCHEME: RegExp; + NOT_QUERY: RegExp; + NOT_FRAGMENT: RegExp; + ESCAPE: RegExp; + UNRESERVED: RegExp; + OTHER_CHARS: RegExp; + PCT_ENCODED: RegExp; + IPV4ADDRESS: RegExp; + IPV6ADDRESS: RegExp; +} +export declare const SCHEMES: { + [scheme: string]: URISchemeHandler; +}; +export declare function pctEncChar(chr: string): string; +export declare function pctDecChars(str: string): string; +export declare function parse(uriString: string, options?: URIOptions): URIComponents; +export declare function removeDotSegments(input: string): string; +export declare function serialize(components: URIComponents, options?: URIOptions): string; +export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; +export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; +export declare function normalize(uri: string, options?: URIOptions): string; +export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; +export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; +export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; +export declare function escapeComponent(str: string, options?: URIOptions): string; +export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.js new file mode 100644 index 000000000..2df06091a --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.js @@ -0,0 +1,1389 @@ +/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.URI = global.URI || {}))); +}(this, (function (exports) { 'use strict'; + +function merge() { + for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { + sets[_key] = arguments[_key]; + } + + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } else { + return sets[0]; + } +} +function subexp(str) { + return "(?:" + str + ")"; +} +function typeOf(o) { + return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); +} +function toUpperCase(str) { + return str.toUpperCase(); +} +function toArray(obj) { + return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; +} +function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; +} + +function buildExps(isIRI) { + var ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), + //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), + //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", + //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", + //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), + //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), + // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), + // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), + //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), + //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), + //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), + //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), + //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), + //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), + //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), + //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), + //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), + //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), + //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), + //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), + //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), + //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +var URI_PROTOCOL = buildExps(false); + +var IRI_PROTOCOL = buildExps(true); + +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + + + + + + + + + + + + + +var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } +}; + +/** Highest positive signed 32-bit float value */ + +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' + +/** Regular expressions */ +var regexPunycode = /^xn--/; +var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error$1(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +var ucs2encode = function ucs2encode(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); +}; + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +var basicToDigit = function basicToDigit(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +var digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +var adapt = function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +var decode = function decode(input) { + // Don't use UCS-2. + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (var j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error$1('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + var oldi = i; + for (var w = 1, k = base;; /* no condition */k += base) { + + if (index >= inputLength) { + error$1('invalid-input'); + } + + var digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1('overflow'); + } + + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + + if (digit < t) { + break; + } + + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1('overflow'); + } + + w *= baseMinusT; + } + + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error$1('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + + return String.fromCodePoint.apply(String, output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +var encode = function encode(input) { + var output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + var inputLength = input.length; + + // Initialize the state. + var n = initialN; + var delta = 0; + var bias = initialBias; + + // Handle the basic code points. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + + if (_currentValue2 < 0x80) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var basicLength = output.length; + var handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + + if (_currentValue < n && ++delta > maxInt) { + error$1('overflow'); + } + if (_currentValue == n) { + // Represent delta as a generalized variable-length integer. + var q = delta; + for (var k = base;; /* no condition */k += base) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + ++delta; + ++n; + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +var toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +var toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * 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 GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +var SCHEMES = {}; +function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; +} +function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} + +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + + var _matches = slicedToArray(matches, 2), + address = _matches[1]; + + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + + var _matches2 = slicedToArray(matches, 3), + address = _matches2[1], + zone = _matches2[2]; + + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), + _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), + last = _address$toLowerCase$2[0], + first = _address$toLowerCase$2[1]; + + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function (acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index: index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function (a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } +} +var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; +function parse(uriString) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; + //fix port number + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} + +function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number") { + uriTokens.push(":"); + uriTokens.push(components.port.toString(10)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} + +var RDS1 = /^\.\.?\//; +var RDS2 = /^\/\.(\/|$)/; +var RDS3 = /^\/\.\.(\/|$)/; +var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} + +function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) {} + //TODO: normalize IPv6 address as per RFC 5952 + + //if host component is a domain name + else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + //convert IDN via punycode + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} + +function resolveComponents(base, relative) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var skipNormalization = arguments[3]; + + var target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} + +function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} + +function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} + +function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} + +function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); +} + +function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); +} + +var handler = { + scheme: "http", + domainHost: true, + parse: function parse(components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize(components, options) { + //normalize the default port + if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; + +var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize +}; + +var O = {}; +var isIRI = true; +//RFC 3986 +var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +var UNRESERVED = new RegExp(UNRESERVED$$, "g"); +var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +var NOT_HFVALUE = NOT_HFNAME; +function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; +} +var handler$2 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; + +var URN_PARSE = /^([^\:]+)\:(.*)/; +//RFC 2141 +var handler$3 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } +}; + +var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +//RFC 4122 +var handler$4 = { + scheme: "urn:uuid", + parse: function parse(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize(uuidComponents, options) { + var urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } +}; + +SCHEMES[handler.scheme] = handler; +SCHEMES[handler$1.scheme] = handler$1; +SCHEMES[handler$2.scheme] = handler$2; +SCHEMES[handler$3.scheme] = handler$3; +SCHEMES[handler$4.scheme] = handler$4; + +exports.SCHEMES = SCHEMES; +exports.pctEncChar = pctEncChar; +exports.pctDecChars = pctDecChars; +exports.parse = parse; +exports.removeDotSegments = removeDotSegments; +exports.serialize = serialize; +exports.resolveComponents = resolveComponents; +exports.resolve = resolve; +exports.normalize = normalize; +exports.equal = equal; +exports.escapeComponent = escapeComponent; +exports.unescapeComponent = unescapeComponent; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=uri.all.js.map diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.js.map new file mode 100644 index 000000000..536ffa881 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (components.port === (String(components.scheme).toLowerCase() !== \"https\" ? 80 : 443) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(components.port.toString(10));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","export function merge(...sets:Array):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}"],"names":["SCHEMES","uuid","scheme","urn","mailto","https","http","urnComponents","nss","uuidComponents","toLowerCase","options","error","tolerant","match","UUID","undefined","handler","uriComponents","path","nid","schemeHandler","serialize","urnScheme","parse","matches","components","URN_PARSE","query","fields","join","length","push","name","replace","PCT_ENCODED","decodeUnreserved","toUpperCase","NOT_HFNAME","pctEncChar","headers","NOT_HFVALUE","O","mailtoComponents","body","subject","to","x","localPart","domain","iri","e","punycode","toASCII","unescapeComponent","toUnicode","toAddr","slice","atIdx","NOT_LOCAL_PART","lastIndexOf","String","xl","toArray","addr","unicodeSupport","split","unknownHeaders","hfield","toAddrs","hfields","decStr","UNRESERVED","str","pctDecChars","RegExp","merge","UNRESERVED$$","SOME_DELIMS$$","ATEXT$$","VCHAR$$","PCT_ENCODED$","QTEXT$$","subexp","HEXDIG$$","isIRI","domainHost","port","host","toString","URI_PROTOCOL","IRI_PROTOCOL","ESCAPE","escapeComponent","uriA","uriB","typeOf","equal","uri","normalize","resolveComponents","baseURI","schemelessOptions","relativeURI","assign","resolve","target","fragment","relative","base","userinfo","removeDotSegments","charAt","skipNormalization","uriTokens","s","authority","absolutePath","reference","_recomposeAuthority","protocol","IPV6ADDRESS","test","output","Error","input","im","RDS5","pop","RDS3","RDS2","RDS1","$1","$2","_normalizeIPv6","_normalizeIPv4","_","uriString","isNaN","indexOf","parseInt","NO_MATCH_IS_UNDEFINED","URI_PARSE","newHost","zone","newFirst","newLast","longestZeroFields","index","b","a","allZeroFields","sort","acc","lastLongest","field","reduce","fieldCount","isLastFieldIPv4Address","firstFields","lastFields","lastFieldsStart","Array","IPV4ADDRESS","last","map","_stripLeadingZeros","first","address","reverse","NOT_FRAGMENT","NOT_QUERY","NOT_PATH","NOT_PATH_NOSCHEME","NOT_HOST","NOT_USERINFO","NOT_SCHEME","_normalizeComponentEncoding","newStr","substr","i","fromCharCode","c","c2","c3","il","chr","charCodeAt","encode","decode","ucs2encode","ucs2decode","regexNonASCII","string","mapDomain","regexPunycode","n","delta","handledCPCount","adapt","handledCPCountPlusOne","basicLength","stringFromCharCode","digitToBasic","q","floor","qMinusT","baseMinusT","t","k","bias","tMin","tMax","currentValue","maxInt","m","inputLength","delimiter","initialBias","initialN","fromCodePoint","splice","out","oldi","w","digit","basicToDigit","basic","j","baseMinusTMin","skew","numPoints","firstTime","damp","flag","codePoint","array","value","extra","counter","result","encoded","labels","fn","regexSeparators","parts","RangeError","errors","type","Math","buildExps","IPV6ADDRESS$","ZONEID$","IPV4ADDRESS$","RESERVED$$","SUB_DELIMS$$","IPRIVATE$$","ALPHA$$","DIGIT$$","AUTHORITY_REF$","USERINFO$","HOST$","PORT$","SAMEDOC_REF$","FRAGMENT$","ABSOLUTE_REF$","SCHEME$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","RELATIVE_REF$","PATH_NOSCHEME$","GENERIC_REF$","ABSOLUTE_URI$","HIER_PART$","URI_REFERENCE$","URI$","RELATIVE$","RELATIVE_PART$","AUTHORITY$","PCHAR$","PATH$","SEGMENT_NZ$","SEGMENT_NZ_NC$","SEGMENT$","IP_LITERAL$","REG_NAME$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","H16$","LS32$","DEC_OCTET_RELAXED$","DEC_OCTET$","UCSCHAR$$","GEN_DELIMS$$","SP$$","DQUOTE$$","CR$","obj","key","source","setInterval","call","prototype","o","Object","shift","sets"],"mappings":";;;;;;;AUAA,SAAA4E,KAAA,GAAA;sCAAyBkP,IAAzB;YAAA;;;QACKA,KAAK/R,MAAL,GAAc,CAAlB,EAAqB;aACf,CAAL,IAAU+R,KAAK,CAAL,EAAQrQ,KAAR,CAAc,CAAd,EAAiB,CAAC,CAAlB,CAAV;YACMK,KAAKgQ,KAAK/R,MAAL,GAAc,CAAzB;aACK,IAAIgB,IAAI,CAAb,EAAgBA,IAAIe,EAApB,EAAwB,EAAEf,CAA1B,EAA6B;iBACvBA,CAAL,IAAU+Q,KAAK/Q,CAAL,EAAQU,KAAR,CAAc,CAAd,EAAiB,CAAC,CAAlB,CAAV;;aAEIK,EAAL,IAAWgQ,KAAKhQ,EAAL,EAASL,KAAT,CAAe,CAAf,CAAX;eACOqQ,KAAKhS,IAAL,CAAU,EAAV,CAAP;KAPD,MAQO;eACCgS,KAAK,CAAL,CAAP;;;AAIF,AAAA,SAAA3O,MAAA,CAAuBV,GAAvB,EAAA;WACQ,QAAQA,GAAR,GAAc,GAArB;;AAGD,AAAA,SAAAuB,MAAA,CAAuB2N,CAAvB,EAAA;WACQA,MAAM3S,SAAN,GAAkB,WAAlB,GAAiC2S,MAAM,IAAN,GAAa,MAAb,GAAsBC,OAAOF,SAAP,CAAiBjO,QAAjB,CAA0BgO,IAA1B,CAA+BE,CAA/B,EAAkCzP,KAA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,EAAmB;4BACFA,cAAcC,SAAd,CAAwBf,aAAxB,EAAuCI,OAAvC,CAAhB;;YAGKO,gBAAgBX,aAAtB;YACMC,MAAMD,cAAcC,GAA1B;sBACcW,IAAd,IAAwBC,OAAOT,QAAQS,GAAvC,UAA8CZ,GAA9C;eAEOU,aAAP;;CA1CF,CA8CA;;AD5DA,IAAMH,OAAO,0DAAb;AACA,AAEA;AACA,IAAME,YAAsE;YAClE,UADkE;WAGnE,eAAUV,aAAV,EAAuCI,OAAvC,EAAT;YACQF,iBAAiBF,aAAvB;uBACeN,IAAf,GAAsBQ,eAAeD,GAArC;uBACeA,GAAf,GAAqBQ,SAArB;YAEI,CAACL,QAAQE,QAAT,KAAsB,CAACJ,eAAeR,IAAhB,IAAwB,CAACQ,eAAeR,IAAf,CAAoBa,KAApB,CAA0BC,IAA1B,CAA/C,CAAJ,EAAqF;2BACrEH,KAAf,GAAuBH,eAAeG,KAAf,IAAwB,oBAA/C;;eAGMH,cAAP;KAZ0E;eAe/D,mBAAUA,cAAV,EAAyCE,OAAzC,EAAb;YACQJ,gBAAgBE,cAAtB;;sBAEcD,GAAd,GAAoB,CAACC,eAAeR,IAAf,IAAuB,EAAxB,EAA4BS,WAA5B,EAApB;eACOH,aAAP;;CAnBF,CAuBA;;ADhCAP,QAAQM,QAAKJ,MAAb,IAAuBI,OAAvB;AAEA,AACAN,QAAQK,UAAMH,MAAd,IAAwBG,SAAxB;AAEA,AACAL,QAAQI,UAAOF,MAAf,IAAyBE,SAAzB;AAEA,AACAJ,QAAQG,UAAID,MAAZ,IAAsBC,SAAtB;AAEA,AACAH,QAAQC,UAAKC,MAAb,IAAuBD,SAAvB,CAEA;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.d.ts new file mode 100644 index 000000000..320f53417 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.d.ts @@ -0,0 +1,59 @@ +export interface URIComponents { + scheme?: string; + userinfo?: string; + host?: string; + port?: number | string; + path?: string; + query?: string; + fragment?: string; + reference?: string; + error?: string; +} +export interface URIOptions { + scheme?: string; + reference?: string; + tolerant?: boolean; + absolutePath?: boolean; + iri?: boolean; + unicodeSupport?: boolean; + domainHost?: boolean; +} +export interface URISchemeHandler { + scheme: string; + parse(components: ParentComponents, options: Options): Components; + serialize(components: Components, options: Options): ParentComponents; + unicodeSupport?: boolean; + domainHost?: boolean; + absolutePath?: boolean; +} +export interface URIRegExps { + NOT_SCHEME: RegExp; + NOT_USERINFO: RegExp; + NOT_HOST: RegExp; + NOT_PATH: RegExp; + NOT_PATH_NOSCHEME: RegExp; + NOT_QUERY: RegExp; + NOT_FRAGMENT: RegExp; + ESCAPE: RegExp; + UNRESERVED: RegExp; + OTHER_CHARS: RegExp; + PCT_ENCODED: RegExp; + IPV4ADDRESS: RegExp; + IPV6ADDRESS: RegExp; +} +export declare const SCHEMES: { + [scheme: string]: URISchemeHandler; +}; +export declare function pctEncChar(chr: string): string; +export declare function pctDecChars(str: string): string; +export declare function parse(uriString: string, options?: URIOptions): URIComponents; +export declare function removeDotSegments(input: string): string; +export declare function serialize(components: URIComponents, options?: URIOptions): string; +export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; +export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; +export declare function normalize(uri: string, options?: URIOptions): string; +export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; +export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; +export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; +export declare function escapeComponent(str: string, options?: URIOptions): string; +export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.js new file mode 100644 index 000000000..1b791ef72 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/es5/uri.all.min.js @@ -0,0 +1,3 @@ +/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),n=0;n1){r[0]=r[0].slice(0,-1);for(var t=r.length-1,o=1;o1&&(t=n[0]+"@",e=n[1]),e=e.replace(j,"."),t+f(e.split("."),r).join(".")}function p(e){for(var r=[],n=0,t=e.length;n=55296&&o<=56319&&n>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function d(e){for(var r="",n=0,t=e.length;n=194&&o<224){if(t-n>=6){var a=parseInt(e.substr(n+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(n,6);n+=6}else if(o>=224){if(t-n>=9){var i=parseInt(e.substr(n+4,2),16),u=parseInt(e.substr(n+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(n,9);n+=9}else r+=e.substr(n,3),n+=3}return r}function l(e,r){function n(e){var n=d(e);return n.match(r.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,n).replace(r.NOT_USERINFO,h).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_HOST,h).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,n).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,h).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,n).replace(r.NOT_QUERY,h).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,n).replace(r.NOT_FRAGMENT,h).replace(r.PCT_ENCODED,o)),e}function g(e){return e.replace(/^0*(.*)/,"$1")||"0"}function v(e,r){var n=e.match(r.IPV4ADDRESS)||[],t=R(n,2),o=t[1];return o?o.split(".").map(g).join("."):e}function m(e,r){var n=e.match(r.IPV6ADDRESS)||[],t=R(n,3),o=t[1],a=t[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),u=R(i,2),s=u[0],f=u[1],c=f?f.split(":").map(g):[],p=s.split(":").map(g),h=r.IPV4ADDRESS.test(p[p.length-1]),d=h?7:8,l=p.length-d,m=Array(d),E=0;E1){var A=m.slice(0,y.index),D=m.slice(y.index+y.length);S=A.join(":")+"::"+D.join(":")}else S=m.join(":");return a&&(S+="%"+a),S}return e}function E(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n={},t=!1!==r.iri?N:F;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){K?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||undefined,n.userinfo=-1!==e.indexOf("@")?o[3]:undefined,n.host=-1!==e.indexOf("//")?o[4]:undefined,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:undefined,n.fragment=-1!==e.indexOf("#")?o[8]:undefined,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),n.host&&(n.host=m(v(n.host,t),t)),n.scheme!==undefined||n.userinfo!==undefined||n.host!==undefined||n.port!==undefined||n.path||n.query!==undefined?n.scheme===undefined?n.reference="relative":n.fragment===undefined?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var a=B[(r.scheme||n.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)l(n,t);else{if(n.host&&(r.domainHost||a&&a.domainHost))try{n.host=Y.toASCII(n.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+i}l(n,F)}a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}function C(e,r){var n=!1!==r.iri?N:F,t=[];return e.userinfo!==undefined&&(t.push(e.userinfo),t.push("@")),e.host!==undefined&&t.push(m(v(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,r,n){return"["+r+(n?"%25"+n:"")+"]"})),"number"==typeof e.port&&(t.push(":"),t.push(e.port.toString(10))),t.length?t.join(""):undefined}function y(e){for(var r=[];e.length;)if(e.match(W))e=e.replace(W,"");else if(e.match(X))e=e.replace(X,"/");else if(e.match(ee))e=e.replace(ee,"/"),r.pop();else if("."===e||".."===e)e="";else{var n=e.match(re);if(!n)throw new Error("Unexpected dot segment condition");var t=n[0];e=e.slice(t.length),r.push(t)}return r.join("")}function S(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=r.iri?N:F,t=[],o=B[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(n.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?Y.toUnicode(e.host):Y.toASCII(e.host.replace(n.PCT_ENCODED,d).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}l(e,n),"suffix"!==r.reference&&e.scheme&&(t.push(e.scheme),t.push(":"));var a=C(e,r);if(a!==undefined&&("suffix"!==r.reference&&t.push("//"),t.push(a),e.path&&"/"!==e.path.charAt(0)&&t.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=y(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),t.push(i)}return e.query!==undefined&&(t.push("?"),t.push(e.query)),e.fragment!==undefined&&(t.push("#"),t.push(e.fragment)),t.join("")}function A(e,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},t=arguments[3],o={};return t||(e=E(S(e,n),n),r=E(S(r,n),n)),n=n||{},!n.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=y(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=y(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function D(e,r,n){var t=i({scheme:"null"},n);return S(A(E(e,t),E(r,t),t,!0),t)}function w(e,r){return"string"==typeof e?e=S(E(e,r),r):"object"===t(e)&&(e=E(S(e,r),r)),e}function b(e,r,n){return"string"==typeof e?e=S(E(e,n),n):"object"===t(e)&&(e=S(e,n)),"string"==typeof r?r=S(E(r,n),n):"object"===t(r)&&(r=S(r,n)),e===r}function x(e,r){return e&&e.toString().replace(r&&r.iri?N.ESCAPE:F.ESCAPE,h)}function O(e,r){return e&&e.toString().replace(r&&r.iri?N.PCT_ENCODED:F.PCT_ENCODED,d)}function I(e){var r=d(e);return r.match(fe)?r:e}var F=u(!1),N=u(!0),R=function(){function e(e,r){var n=[],t=!0,o=!1,a=undefined;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(s){o=!0,a=s}finally{try{!t&&u["return"]&&u["return"]()}finally{if(o)throw a}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=Math.floor,z=String.fromCharCode,L=function(e){return String.fromCodePoint.apply(String,T(e))},$=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},M=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},V=function(e,r,n){var t=0;for(e=n?H(e/700):e>>1,e+=H(e/r);e>455;t+=36)e=H(e/35);return H(t+36*e/(e+38))},k=function(e){var r=[],n=e.length,t=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u=128&&s("not-basic"),r.push(e.charCodeAt(u));for(var f=i>0?i+1:0;f=n&&s("invalid-input");var d=$(e.charCodeAt(f++));(d>=36||d>H((_-t)/p))&&s("overflow"),t+=d*p;var l=h<=a?1:h>=a+26?26:h-a;if(dH(_/g)&&s("overflow"),p*=g}var v=r.length+1;a=V(t-c,v,0==c),H(t/v)>_-o&&s("overflow"),o+=H(t/v),t%=v,r.splice(t++,0,o)}return String.fromCodePoint.apply(String,r)},Z=function(e){var r=[];e=p(e);var n=e.length,t=128,o=0,a=72,i=!0,u=!1,f=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(z(d))}}catch(j){u=!0,f=j}finally{try{!i&&h["return"]&&h["return"]()}finally{if(u)throw f}}var l=r.length,g=l;for(l&&r.push("-");g=t&&AH((_-o)/D)&&s("overflow"),o+=(v-t)*D,t=v;var w=!0,b=!1,x=undefined;try{for(var O,I=e[Symbol.iterator]();!(w=(O=I.next()).done);w=!0){var F=O.value;if(F_&&s("overflow"),F==t){for(var N=o,R=36;;R+=36){var T=R<=a?1:R>=a+26?26:R-a;if(NA-Z\\x5E-\\x7E]",'[\\"\\\\]'),fe=new RegExp(ae,"g"),ce=new RegExp(ue,"g"),pe=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',se),"g"),he=new RegExp(r("[^]",ae,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),de=he,le={scheme:"mailto",parse:function(e,r){var n=e,t=n.to=n.path?n.path.split(","):[];if(n.path=undefined,n.query){for(var o=!1,a={},i=n.query.split("&"),u=0,s=i.length;u):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(components.port.toString(10));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (components.port === (String(components.scheme).toLowerCase() !== \"https\" ? 80 : 443) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n"]} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.d.ts new file mode 100644 index 000000000..be95efb26 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.d.ts @@ -0,0 +1 @@ +export * from "./uri"; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.js new file mode 100644 index 000000000..de8868ff6 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.js @@ -0,0 +1,13 @@ +import { SCHEMES } from "./uri"; +import http from "./schemes/http"; +SCHEMES[http.scheme] = http; +import https from "./schemes/https"; +SCHEMES[https.scheme] = https; +import mailto from "./schemes/mailto"; +SCHEMES[mailto.scheme] = mailto; +import urn from "./schemes/urn"; +SCHEMES[urn.scheme] = urn; +import uuid from "./schemes/urn-uuid"; +SCHEMES[uuid.scheme] = uuid; +export * from "./uri"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.js.map new file mode 100644 index 000000000..e9e400876 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.d.ts new file mode 100644 index 000000000..6fc0f5dba --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.d.ts @@ -0,0 +1,3 @@ +import { URIRegExps } from "./uri"; +declare const _default: URIRegExps; +export default _default; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.js new file mode 100644 index 000000000..86239cf38 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.js @@ -0,0 +1,3 @@ +import { buildExps } from "./regexps-uri"; +export default buildExps(true); +//# sourceMappingURL=regexps-iri.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.js.map new file mode 100644 index 000000000..2269c580c --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-iri.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regexps-iri.js","sourceRoot":"","sources":["../../src/regexps-iri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.d.ts new file mode 100644 index 000000000..10ec87bdf --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.d.ts @@ -0,0 +1,4 @@ +import { URIRegExps } from "./uri"; +export declare function buildExps(isIRI: boolean): URIRegExps; +declare const _default: URIRegExps; +export default _default; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.js new file mode 100644 index 000000000..6e7e9a021 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.js @@ -0,0 +1,42 @@ +import { merge, subexp } from "./util"; +export function buildExps(isIRI) { + const ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive + LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +export default buildExps(false); +//# sourceMappingURL=regexps-uri.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.js.map new file mode 100644 index 000000000..cb028b804 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/regexps-uri.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regexps-uri.js","sourceRoot":"","sources":["../../src/regexps-uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,oBAAoB,KAAa;IACtC,MACC,OAAO,GAAG,UAAU,EACpB,GAAG,GAAG,SAAS,EACf,OAAO,GAAG,OAAO,EACjB,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,EAAG,kBAAkB;IAC1D,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EAChB,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,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AC,EAAE,GAAG,CAAC;QAC7F,MAAM,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC;QAClE,UAAU,EAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;QAC1C,WAAW,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC;QACxE,WAAW,EAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;QAC3C,WAAW,EAAG,IAAI,MAAM,CAAC,IAAI,GAAG,YAAY,GAAG,IAAI,CAAC;QACpD,WAAW,EAAG,IAAI,MAAM,CAAC,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAE,sCAAsC;KACrL,CAAC;AACH,CAAC;AAED,eAAe,SAAS,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.d.ts new file mode 100644 index 000000000..389995697 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.d.ts @@ -0,0 +1,3 @@ +import { URISchemeHandler } from "../uri"; +declare const handler: URISchemeHandler; +export default handler; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.js new file mode 100644 index 000000000..a28036988 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.js @@ -0,0 +1,27 @@ +const handler = { + scheme: "http", + domainHost: true, + parse: function (components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function (components, options) { + //normalize the default port + if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; +export default handler; +//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.js.map new file mode 100644 index 000000000..83e2ad54e --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/http.js.map @@ -0,0 +1 @@ +{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACnH,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.d.ts new file mode 100644 index 000000000..389995697 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.d.ts @@ -0,0 +1,3 @@ +import { URISchemeHandler } from "../uri"; +declare const handler: URISchemeHandler; +export default handler; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.js new file mode 100644 index 000000000..fc3c71a6c --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.js @@ -0,0 +1,9 @@ +import http from "./http"; +const handler = { + scheme: "https", + domainHost: http.domainHost, + parse: http.parse, + serialize: http.serialize +}; +export default handler; +//# sourceMappingURL=https.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.js.map new file mode 100644 index 000000000..385b8efea --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/https.js.map @@ -0,0 +1 @@ +{"version":3,"file":"https.js","sourceRoot":"","sources":["../../../src/schemes/https.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,OAAO;IAChB,UAAU,EAAG,IAAI,CAAC,UAAU;IAC5B,KAAK,EAAG,IAAI,CAAC,KAAK;IAClB,SAAS,EAAG,IAAI,CAAC,SAAS;CAC1B,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.d.ts new file mode 100644 index 000000000..b0db4bfc1 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.d.ts @@ -0,0 +1,12 @@ +import { URISchemeHandler, URIComponents } from "../uri"; +export interface MailtoHeaders { + [hfname: string]: string; +} +export interface MailtoComponents extends URIComponents { + to: Array; + headers?: MailtoHeaders; + subject?: string; + body?: string; +} +declare const handler: URISchemeHandler; +export default handler; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.js new file mode 100644 index 000000000..2553713cd --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.js @@ -0,0 +1,148 @@ +import { pctEncChar, pctDecChars, unescapeComponent } from "../uri"; +import punycode from "punycode"; +import { merge, subexp, toUpperCase, toArray } from "../util"; +const O = {}; +const isIRI = true; +//RFC 3986 +const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*"); +const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$); +const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$); +const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"'); +//RFC 6068 +const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126 +const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$); +const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]"); +const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$); +const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$); +const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*"); +const HFNAME$ = subexp(QCHAR$ + "*"); +const HFVALUE$ = HFNAME$; +const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$); +const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*"); +const HFIELDS$ = subexp("\\?" + HFIELDS2$); +const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$"); +const UNRESERVED = new RegExp(UNRESERVED$$, "g"); +const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g"); +const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +const NOT_HFVALUE = NOT_HFNAME; +const TO = new RegExp("^" + TO$ + "$"); +const HFIELDS = new RegExp("^" + HFIELDS2$ + "$"); +function decodeUnreserved(str) { + const decStr = pctDecChars(str); + return (!decStr.match(UNRESERVED) ? str : decStr); +} +const handler = { + scheme: "mailto", + parse: function (components, options) { + const mailtoComponents = components; + const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []); + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + let unknownHeaders = false; + const headers = {}; + const hfields = mailtoComponents.query.split("&"); + for (let x = 0, xl = hfields.length; x < xl; ++x) { + const hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + const toAddrs = hfield[1].split(","); + for (let x = 0, xl = toAddrs.length; x < xl; ++x) { + to.push(toAddrs[x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) + mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (let x = 0, xl = to.length; x < xl; ++x) { + const addr = to[x].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } + catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } + else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[x] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function (mailtoComponents, options) { + const components = mailtoComponents; + const to = toArray(mailtoComponents.to); + if (to) { + for (let x = 0, xl = to.length; x < xl; ++x) { + const toAddr = String(to[x]); + const atIdx = toAddr.lastIndexOf("@"); + const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + let domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain)); + } + catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + const headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) + headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) + headers["body"] = mailtoComponents.body; + const fields = []; + for (const name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + + "=" + + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; +export default handler; +//# sourceMappingURL=mailto.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.js.map new file mode 100644 index 000000000..82dba9a16 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/mailto.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mailto.js","sourceRoot":"","sources":["../../../src/schemes/mailto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAa9D,MAAM,CAAC,GAAiB,EAAE,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,CAAC;AAEnB,UAAU;AACV,MAAM,YAAY,GAAG,wBAAwB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,2EAA2E,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACjJ,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAE,kBAAkB;AACnD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,aAAa,G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AAU,EAAE,UAAU,CAAC;oBAC7G,GAAG;oBACH,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CACvH,CAAC;aACF;SACD;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YAClB,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.d.ts new file mode 100644 index 000000000..261ddcea6 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.d.ts @@ -0,0 +1,7 @@ +import { URISchemeHandler, URIOptions } from "../uri"; +import { URNComponents } from "./urn"; +export interface UUIDComponents extends URNComponents { + uuid?: string; +} +declare const handler: URISchemeHandler; +export default handler; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.js new file mode 100644 index 000000000..044c8a80d --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.js @@ -0,0 +1,23 @@ +const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/; +//RFC 4122 +const handler = { + scheme: "urn:uuid", + parse: function (urnComponents, options) { + const uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function (uuidComponents, options) { + const urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + }, +}; +export default handler; +//# sourceMappingURL=urn-uuid.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.js.map new file mode 100644 index 000000000..3b7a8b3ae --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn-uuid.js.map @@ -0,0 +1 @@ +{"version":3,"file":"urn-uuid.js","sourceRoot":"","sources":["../../../src/schemes/urn-uuid.ts"],"names":[],"mappings":"AAQA,MAAM,IAAI,GAAG,0DAA0D,CAAC;AACxE,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,UAAU;AACV,MAAM,OAAO,GAA+D;IAC3E,MAAM,EAAG,UAAU;IAEnB,KAAK,EAAG,UAAU,aAA2B,EAAE,OAAkB;QAChE,MAAM,cAAc,GAAG,aAA+B,CAAC;QACvD,cAAc,CAAC,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC;QACzC,cAAc,CAAC,GAAG,GAAG,SAAS,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;YACpF,cAAc,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,IAAI,oBAAoB,CAAC;SACpE;QAED,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,SAAS,EAAG,UAAU,cAA6B,EAAE,OAAkB;QACtE,MAAM,aAAa,GAAG,cAA+B,CAAC;QACtD,gBAAgB;QAChB,aAAa,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.d.ts new file mode 100644 index 000000000..49481055a --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.d.ts @@ -0,0 +1,10 @@ +import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; +export interface URNComponents extends URIComponents { + nid?: string; + nss?: string; +} +export interface URNOptions extends URIOptions { + nid?: string; +} +declare const handler: URISchemeHandler; +export default handler; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.js new file mode 100644 index 000000000..b53161c2e --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.js @@ -0,0 +1,49 @@ +import { SCHEMES } from "../uri"; +const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})"; +const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})"; +const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]"; +const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)"; +const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$"); +const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$"); +const URN_PARSE = /^([^\:]+)\:(.*)/; +const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g; +//RFC 2141 +const handler = { + scheme: "urn", + parse: function (components, options) { + const matches = components.path && components.path.match(URN_PARSE); + let urnComponents = components; + if (matches) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = matches[1].toLowerCase(); + const nss = matches[2]; + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } + else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function (urnComponents, options) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = urnComponents.nid; + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + const uriComponents = urnComponents; + const nss = urnComponents.nss; + uriComponents.path = `${nid || options.nid}:${nss}`; + return uriComponents; + }, +}; +export default handler; +//# sourceMappingURL=urn.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.js.map new file mode 100644 index 000000000..ea43b0beb --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/schemes/urn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../../src/schemes/urn.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,QAAQ,CAAC;AAW7C,MAAM,IAAI,GAAG,qCAAqC,CAAC;AACnD,MAAM,YAAY,GAAG,uBAAuB,CAAC;AAC7C,MAAM,OAAO,GAAG,mEAAmE,CAAC;AACpF,MAAM,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,OAAO,GAAG,KAAK,CAAC;AAC7D,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;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AAO,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC;QAC/D,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAEzC,IAAI,aAAa,EAAE;YAClB,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;SACjF;QAED,MAAM,aAAa,GAAG,aAA8B,CAAC;QACrD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,aAAa,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QAEpD,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.d.ts new file mode 100644 index 000000000..320f53417 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.d.ts @@ -0,0 +1,59 @@ +export interface URIComponents { + scheme?: string; + userinfo?: string; + host?: string; + port?: number | string; + path?: string; + query?: string; + fragment?: string; + reference?: string; + error?: string; +} +export interface URIOptions { + scheme?: string; + reference?: string; + tolerant?: boolean; + absolutePath?: boolean; + iri?: boolean; + unicodeSupport?: boolean; + domainHost?: boolean; +} +export interface URISchemeHandler { + scheme: string; + parse(components: ParentComponents, options: Options): Components; + serialize(components: Components, options: Options): ParentComponents; + unicodeSupport?: boolean; + domainHost?: boolean; + absolutePath?: boolean; +} +export interface URIRegExps { + NOT_SCHEME: RegExp; + NOT_USERINFO: RegExp; + NOT_HOST: RegExp; + NOT_PATH: RegExp; + NOT_PATH_NOSCHEME: RegExp; + NOT_QUERY: RegExp; + NOT_FRAGMENT: RegExp; + ESCAPE: RegExp; + UNRESERVED: RegExp; + OTHER_CHARS: RegExp; + PCT_ENCODED: RegExp; + IPV4ADDRESS: RegExp; + IPV6ADDRESS: RegExp; +} +export declare const SCHEMES: { + [scheme: string]: URISchemeHandler; +}; +export declare function pctEncChar(chr: string): string; +export declare function pctDecChars(str: string): string; +export declare function parse(uriString: string, options?: URIOptions): URIComponents; +export declare function removeDotSegments(input: string): string; +export declare function serialize(components: URIComponents, options?: URIOptions): string; +export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; +export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; +export declare function normalize(uri: string, options?: URIOptions): string; +export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; +export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; +export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; +export declare function escapeComponent(str: string, options?: URIOptions): string; +export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.js new file mode 100644 index 000000000..2fb6d713e --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.js @@ -0,0 +1,480 @@ +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * 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 GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +import URI_PROTOCOL from "./regexps-uri"; +import IRI_PROTOCOL from "./regexps-iri"; +import punycode from "punycode"; +import { toUpperCase, typeOf, assign } from "./util"; +export const SCHEMES = {}; +export function pctEncChar(chr) { + const c = chr.charCodeAt(0); + let e; + if (c < 16) + e = "%0" + c.toString(16).toUpperCase(); + else if (c < 128) + e = "%" + c.toString(16).toUpperCase(); + else if (c < 2048) + e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); + else + e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); + return e; +} +export function pctDecChars(str) { + let newStr = ""; + let i = 0; + const il = str.length; + while (i < il) { + const c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } + else if (c >= 194 && c < 224) { + if ((il - i) >= 6) { + const c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + } + else { + newStr += str.substr(i, 6); + } + i += 6; + } + else if (c >= 224) { + if ((il - i) >= 9) { + const c2 = parseInt(str.substr(i + 4, 2), 16); + const c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + } + else { + newStr += str.substr(i, 9); + } + i += 9; + } + else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + const decStr = pctDecChars(str); + return (!decStr.match(protocol.UNRESERVED) ? str : decStr); + } + if (components.scheme) + components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) + components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) + components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) + components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) + components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) + components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} +; +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + const matches = host.match(protocol.IPV4ADDRESS) || []; + const [, address] = matches; + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } + else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + const matches = host.match(protocol.IPV6ADDRESS) || []; + const [, address, zone] = matches; + if (address) { + const [last, first] = address.toLowerCase().split('::').reverse(); + const firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + const lastFields = last.split(":").map(_stripLeadingZeros); + const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + const fieldCount = isLastFieldIPv4Address ? 7 : 8; + const lastFieldsStart = lastFields.length - fieldCount; + const fields = Array(fieldCount); + for (let x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + const allZeroFields = fields.reduce((acc, field, index) => { + if (!field || field === "0") { + const lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } + else { + acc.push({ index, length: 1 }); + } + } + return acc; + }, []); + const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0]; + let newHost; + if (longestZeroFields && longestZeroFields.length > 1) { + const newFirst = fields.slice(0, longestZeroFields.index); + const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } + else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } + else { + return host; + } +} +const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +const NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined; +export function parse(uriString, options = {}) { + const components = {}; + const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); + if (options.reference === "suffix") + uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + const matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } + else { //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined); + components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined); + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined); + components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined); + //fix port number + if (isNaN(components.port)) { + components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined); + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } + else if (components.scheme === undefined) { + components.reference = "relative"; + } + else if (components.fragment === undefined) { + components.reference = "absolute"; + } + else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } + catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } + else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } + else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} +; +function _recomposeAuthority(components, options) { + const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); + const uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]")); + } + if (typeof components.port === "number") { + uriTokens.push(":"); + uriTokens.push(components.port.toString(10)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} +; +const RDS1 = /^\.\.?\//; +const RDS2 = /^\/\.(\/|$)/; +const RDS3 = /^\/\.\.(\/|$)/; +const RDS4 = /^\.\.?$/; +const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +export function removeDotSegments(input) { + const output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } + else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } + else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } + else if (input === "." || input === "..") { + input = ""; + } + else { + const im = input.match(RDS5); + if (im) { + const s = im[0]; + input = input.slice(s.length); + output.push(s); + } + else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} +; +export function serialize(components, options = {}) { + const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL); + const uriTokens = []; + //find scheme handler + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) + schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) { + //TODO: normalize IPv6 address as per RFC 5952 + } + //if host component is a domain name + else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) { + //convert IDN via punycode + try { + components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host)); + } + catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + const authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + let s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} +; +export function resolveComponents(base, relative, options = {}, skipNormalization) { + const target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } + else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } + else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } + else { + target.query = base.query; + } + } + else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } + else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } + else if (!base.path) { + target.path = relative.path; + } + else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} +; +export function resolve(baseURI, relativeURI, options) { + const schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} +; +export function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } + else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} +; +export function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } + else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } + else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} +; +export function escapeComponent(str, options) { + return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar); +} +; +export function unescapeComponent(str, options) { + return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars); +} +; +//# sourceMappingURL=uri.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.js.map new file mode 100644 index 000000000..e1d831cb2 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/uri.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAiDrD,MAAM,CAAC,MAAM,OAAO,GAAsC,EAAE,CAAC;AAE7D,MAAM,qBAAqB,GAAU;IACpC,MAAM,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAQ,CAAC;IAEb,IAAI,CAAC,GAAG,EAAE;QAAE,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;SAC/C,IAAI,CAAC,GAAG,GAAG;QAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;SACpD,IAAI,CAAC,GAAG,IAAI;QAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC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,SAAS,CAAgB,IAAI,EAAE,OAAO,CAAC,CAAC;KAC/C;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC7B,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;KAChD;SAAM,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,EAAE;QACrC,IAAI,GAAG,SAAS,CAAgB,IAAI,EAAE,OAAO,CAAC,CAAC;KAC/C;IAED,OAAO,IAAI,KAAK,IAAI,CAAC;AACtB,CAAC;AAAA,CAAC;AAEF,MAAM,0BAA0B,GAAU,EAAE,OAAmB;IAC9D,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;AAC1H,CAAC;AAAA,CAAC;AAEF,MAAM,4BAA4B,GAAU,EAAE,OAAmB;IAChE,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AACrI,CAAC;AAAA,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.d.ts new file mode 100644 index 000000000..8b484cd35 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.d.ts @@ -0,0 +1,6 @@ +export declare function merge(...sets: Array): string; +export declare function subexp(str: string): string; +export declare function typeOf(o: any): string; +export declare function toUpperCase(str: string): string; +export declare function toArray(obj: any): Array; +export declare function assign(target: object, source: any): any; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.js b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.js new file mode 100644 index 000000000..45af46fe5 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.js @@ -0,0 +1,36 @@ +export function merge(...sets) { + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + const xl = sets.length - 1; + for (let x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } + else { + return sets[0]; + } +} +export function subexp(str) { + return "(?:" + str + ")"; +} +export function typeOf(o) { + return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()); +} +export function toUpperCase(str) { + return str.toUpperCase(); +} +export function toArray(obj) { + return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : []; +} +export function assign(target, source) { + const obj = target; + if (source) { + for (const key in source) { + obj[key] = source[key]; + } + } + return obj; +} +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.js.map b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.js.map new file mode 100644 index 000000000..05d9df021 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/dist/esnext/util.js.map @@ -0,0 +1 @@ +{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,IAAkB;IAC1C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;Q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I,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvM,CAAC;AAGD,MAAM,iBAAiB,MAAc,EAAE,MAAW;IACjD,MAAM,GAAG,GAAG,MAAa,CAAC;IAC1B,IAAI,MAAM,EAAE;QACX,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACzB,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;SACvB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/node_modules/punycode b/public/node_modules/_uri-js@4.2.2@uri-js/node_modules/punycode new file mode 120000 index 000000000..b8ef16b25 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/node_modules/punycode @@ -0,0 +1 @@ +../../_punycode@2.1.1@punycode \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/package.json b/public/node_modules/_uri-js@4.2.2@uri-js/package.json new file mode 100644 index 000000000..35586f7b8 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/package.json @@ -0,0 +1,68 @@ +{ + "name": "uri-js", + "version": "4.2.2", + "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", + "main": "dist/es5/uri.all.js", + "types": "dist/es5/uri.all.d.ts", + "directories": { + "test": "tests" + }, + "scripts": { + "build:esnext": "node_modules/.bin/tsc", + "build:es5": "node_modules/.bin/rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap", + "build:es5:fix-sourcemap": "node_modules/.bin/sorcery -i dist/es5/uri.all.js", + "build:es5:min": "node_modules/.bin/uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", + "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min", + "test": "node_modules/.bin/mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js" + }, + "repository": { + "type": "git", + "url": "http://github.com/garycourt/uri-js" + }, + "keywords": [ + "URI", + "IRI", + "IDN", + "URN", + "UUID", + "HTTP", + "HTTPS", + "MAILTO", + "RFC3986", + "RFC3987", + "RFC5891", + "RFC2616", + "RFC2818", + "RFC2141", + "RFC4122", + "RFC4291", + "RFC5952", + "RFC6068", + "RFC6874" + ], + "author": "Gary Court ", + "license": "BSD-2-Clause", + "bugs": { + "url": "https://github.com/garycourt/uri-js/issues" + }, + "homepage": "https://github.com/garycourt/uri-js", + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-plugin-external-helpers": "^6.22.0", + "babel-preset-latest": "^6.24.1", + "mocha": "^3.2.0", + "mocha-qunit-ui": "^0.1.3", + "rollup": "^0.41.6", + "rollup-plugin-babel": "^2.7.1", + "rollup-plugin-node-resolve": "^2.0.0", + "sorcery": "^0.10.0", + "typescript": "^2.8.1", + "uglify-js": "^2.8.14" + }, + "dependencies": { + "punycode": "^2.1.0" + }, + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "uri-js@4.2.2", + "_resolved": "https://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/rollup.config.js b/public/node_modules/_uri-js@4.2.2@uri-js/rollup.config.js new file mode 100644 index 000000000..5bb8b0541 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/rollup.config.js @@ -0,0 +1,32 @@ +import resolve from 'rollup-plugin-node-resolve'; +import babel from 'rollup-plugin-babel'; +const packageJson = require('./package.json'); + +export default { + entry : "dist/esnext/index.js", + format : "umd", + moduleName : "URI", + plugins: [ + resolve({ + module: true, + jsnext: true, + preferBuiltins: false + }), + + babel({ + "presets": [ + ["latest", { + "es2015": { + "modules": false + } + }] + ], + "plugins": ["external-helpers"], + "externalHelpers": false + } +) + ], + dest : "dist/es5/uri.all.js", + sourceMap: true, + banner: "/** @license URI.js v" + packageJson.version + " (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */" +} diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/index.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/index.ts new file mode 100644 index 000000000..6532a1bcb --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/index.ts @@ -0,0 +1,18 @@ +import { SCHEMES } from "./uri"; + +import http from "./schemes/http"; +SCHEMES[http.scheme] = http; + +import https from "./schemes/https"; +SCHEMES[https.scheme] = https; + +import mailto from "./schemes/mailto"; +SCHEMES[mailto.scheme] = mailto; + +import urn from "./schemes/urn"; +SCHEMES[urn.scheme] = urn; + +import uuid from "./schemes/urn-uuid"; +SCHEMES[uuid.scheme] = uuid; + +export * from "./uri"; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/punycode.d.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/punycode.d.ts new file mode 100644 index 000000000..4ecbd3484 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/punycode.d.ts @@ -0,0 +1,24 @@ +declare module 'punycode' { + function ucs2decode(string:string):Array; + function ucs2encode(array:Array):string; + function decode(string:string):string; + function encode(string:string):string; + function toASCII(string:string):string; + function toUnicode(string:string):string; + + interface Punycode { + 'version': '2.2.0'; + 'ucs2': { + 'decode': typeof ucs2decode; + 'encode': typeof ucs2encode; + }, + 'decode': typeof decode; + 'encode': typeof encode; + 'toASCII': typeof toASCII; + 'toUnicode': typeof toUnicode; + } + + const punycode:Punycode; + + export default punycode; +} diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/regexps-iri.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/regexps-iri.ts new file mode 100644 index 000000000..8bd605b43 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/regexps-iri.ts @@ -0,0 +1,4 @@ +import { URIRegExps } from "./uri"; +import { buildExps } from "./regexps-uri"; + +export default buildExps(true); diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/regexps-uri.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/regexps-uri.ts new file mode 100644 index 000000000..8d6b54791 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/regexps-uri.ts @@ -0,0 +1,89 @@ +import { URIRegExps } from "./uri"; +import { merge, subexp } from "./util"; + +export function buildExps(isIRI:boolean):URIRegExps { + const + ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp( subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp( "\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp( H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$ ), //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:" ), //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$" + ; + + return { + NOT_SCHEME : new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO : new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST : new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH : new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME : new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY : new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT : new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE : new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED : new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS : new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED : new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS : new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS : new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} + +export default buildExps(false); diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/http.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/http.ts new file mode 100644 index 000000000..3e53145cc --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/http.ts @@ -0,0 +1,36 @@ +import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; + +const handler:URISchemeHandler = { + scheme : "http", + + domainHost : true, + + parse : function (components:URIComponents, options:URIOptions):URIComponents { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + + return components; + }, + + serialize : function (components:URIComponents, options:URIOptions):URIComponents { + //normalize the default port + if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { + components.port = undefined; + } + + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + + return components; + } +}; + +export default handler; \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/https.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/https.ts new file mode 100644 index 000000000..a19a49428 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/https.ts @@ -0,0 +1,11 @@ +import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; +import http from "./http"; + +const handler:URISchemeHandler = { + scheme : "https", + domainHost : http.domainHost, + parse : http.parse, + serialize : http.serialize +} + +export default handler; \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/mailto.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/mailto.ts new file mode 100644 index 000000000..3faf320d6 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/mailto.ts @@ -0,0 +1,182 @@ +import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; +import { pctEncChar, pctDecChars, unescapeComponent } from "../uri"; +import punycode from "punycode"; +import { merge, subexp, toUpperCase, toArray } from "../util"; + +export interface MailtoHeaders { + [hfname:string]:string +} + +export interface MailtoComponents extends URIComponents { + to:Array, + headers?:MailtoHeaders, + subject?:string, + body?:string +} + +const O:MailtoHeaders = {}; +const isIRI = true; + +//RFC 3986 +const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded + +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*"); +const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$); +const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$); +const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"'); + +//RFC 6068 +const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126 +const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$); +const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]"); +const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$); +const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$); +const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*"); +const HFNAME$ = subexp(QCHAR$ + "*"); +const HFVALUE$ = HFNAME$; +const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$); +const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*"); +const HFIELDS$ = subexp("\\?" + HFIELDS2$); +const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$"); + +const UNRESERVED = new RegExp(UNRESERVED$$, "g"); +const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g"); +const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +const NOT_HFVALUE = NOT_HFNAME; +const TO = new RegExp("^" + TO$ + "$"); +const HFIELDS = new RegExp("^" + HFIELDS2$ + "$"); + +function decodeUnreserved(str:string):string { + const decStr = pctDecChars(str); + return (!decStr.match(UNRESERVED) ? str : decStr); +} + +const handler:URISchemeHandler = { + scheme : "mailto", + + parse : function (components:URIComponents, options:URIOptions):MailtoComponents { + const mailtoComponents = components as MailtoComponents; + const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []); + mailtoComponents.path = undefined; + + if (mailtoComponents.query) { + let unknownHeaders = false + const headers:MailtoHeaders = {}; + const hfields = mailtoComponents.query.split("&"); + + for (let x = 0, xl = hfields.length; x < xl; ++x) { + const hfield = hfields[x].split("="); + + switch (hfield[0]) { + case "to": + const toAddrs = hfield[1].split(","); + for (let x = 0, xl = toAddrs.length; x < xl; ++x) { + to.push(toAddrs[x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + + if (unknownHeaders) mailtoComponents.headers = headers; + } + + mailtoComponents.query = undefined; + + for (let x = 0, xl = to.length; x < xl; ++x) { + const addr = to[x].split("@"); + + addr[0] = unescapeComponent(addr[0]); + + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + + to[x] = addr.join("@"); + } + + return mailtoComponents; + }, + + serialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents { + const components = mailtoComponents as URIComponents; + const to = toArray(mailtoComponents.to); + if (to) { + for (let x = 0, xl = to.length; x < xl; ++x) { + const toAddr = String(to[x]); + const atIdx = toAddr.lastIndexOf("@"); + const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + let domain = toAddr.slice(atIdx + 1); + + //convert IDN via punycode + try { + domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain)); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + + to[x] = localPart + "@" + domain; + } + + components.path = to.join(","); + } + + const headers = mailtoComponents.headers = mailtoComponents.headers || {}; + + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + + const fields = []; + for (const name in headers) { + if (headers[name] !== O[name]) { + fields.push( + name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + + "=" + + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar) + ); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + + return components; + } +} + +export default handler; \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/urn-uuid.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/urn-uuid.ts new file mode 100644 index 000000000..566532920 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/urn-uuid.ts @@ -0,0 +1,36 @@ +import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; +import { URNComponents } from "./urn"; +import { SCHEMES } from "../uri"; + +export interface UUIDComponents extends URNComponents { + uuid?: string; +} + +const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/; + +//RFC 4122 +const handler:URISchemeHandler = { + scheme : "urn:uuid", + + parse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents { + const uuidComponents = urnComponents as UUIDComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + + return uuidComponents; + }, + + serialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents { + const urnComponents = uuidComponents as URNComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + }, +}; + +export default handler; \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/urn.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/urn.ts new file mode 100644 index 000000000..590f9cce1 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/schemes/urn.ts @@ -0,0 +1,69 @@ +import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; +import { pctEncChar, SCHEMES } from "../uri"; + +export interface URNComponents extends URIComponents { + nid?:string; + nss?:string; +} + +export interface URNOptions extends URIOptions { + nid?:string; +} + +const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})"; +const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})"; +const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]"; +const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)"; +const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$"); +const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$"); +const URN_PARSE = /^([^\:]+)\:(.*)/; +const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g; + +//RFC 2141 +const handler:URISchemeHandler = { + scheme : "urn", + + parse : function (components:URIComponents, options:URNOptions):URNComponents { + const matches = components.path && components.path.match(URN_PARSE); + let urnComponents = components as URNComponents; + + if (matches) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = matches[1].toLowerCase(); + const nss = matches[2]; + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options) as URNComponents; + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + + return urnComponents; + }, + + serialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = urnComponents.nid; + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents; + } + + const uriComponents = urnComponents as URIComponents; + const nss = urnComponents.nss; + uriComponents.path = `${nid || options.nid}:${nss}`; + + return uriComponents; + }, +}; + +export default handler; \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/uri.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/uri.ts new file mode 100644 index 000000000..c282c3723 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/uri.ts @@ -0,0 +1,556 @@ +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ + +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * 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 GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ + +import URI_PROTOCOL from "./regexps-uri"; +import IRI_PROTOCOL from "./regexps-iri"; +import punycode from "punycode"; +import { toUpperCase, typeOf, assign } from "./util"; + +export interface URIComponents { + scheme?:string; + userinfo?:string; + host?:string; + port?:number|string; + path?:string; + query?:string; + fragment?:string; + reference?:string; + error?:string; +} + +export interface URIOptions { + scheme?:string; + reference?:string; + tolerant?:boolean; + absolutePath?:boolean; + iri?:boolean; + unicodeSupport?:boolean; + domainHost?:boolean; +} + +export interface URISchemeHandler { + scheme:string; + parse(components:ParentComponents, options:Options):Components; + serialize(components:Components, options:Options):ParentComponents; + unicodeSupport?:boolean; + domainHost?:boolean; + absolutePath?:boolean; +} + +export interface URIRegExps { + NOT_SCHEME : RegExp, + NOT_USERINFO : RegExp, + NOT_HOST : RegExp, + NOT_PATH : RegExp, + NOT_PATH_NOSCHEME : RegExp, + NOT_QUERY : RegExp, + NOT_FRAGMENT : RegExp, + ESCAPE : RegExp, + UNRESERVED : RegExp, + OTHER_CHARS : RegExp, + PCT_ENCODED : RegExp, + IPV4ADDRESS : RegExp, + IPV6ADDRESS : RegExp, +} + +export const SCHEMES:{[scheme:string]:URISchemeHandler} = {}; + +export function pctEncChar(chr:string):string { + const c = chr.charCodeAt(0); + let e:string; + + if (c < 16) e = "%0" + c.toString(16).toUpperCase(); + else if (c < 128) e = "%" + c.toString(16).toUpperCase(); + else if (c < 2048) e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); + else e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); + + return e; +} + +export function pctDecChars(str:string):string { + let newStr = ""; + let i = 0; + const il = str.length; + + while (i < il) { + const c = parseInt(str.substr(i + 1, 2), 16); + + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } + else if (c >= 194 && c < 224) { + if ((il - i) >= 6) { + const c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } + else if (c >= 224) { + if ((il - i) >= 9) { + const c2 = parseInt(str.substr(i + 4, 2), 16); + const c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } + else { + newStr += str.substr(i, 3); + i += 3; + } + } + + return newStr; +} + +function _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) { + function decodeUnreserved(str:string):string { + const decStr = pctDecChars(str); + return (!decStr.match(protocol.UNRESERVED) ? str : decStr); + } + + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + + return components; +}; + +function _stripLeadingZeros(str:string):string { + return str.replace(/^0*(.*)/, "$1") || "0"; +} + +function _normalizeIPv4(host:string, protocol:URIRegExps):string { + const matches = host.match(protocol.IPV4ADDRESS) || []; + const [, address] = matches; + + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } +} + +function _normalizeIPv6(host:string, protocol:URIRegExps):string { + const matches = host.match(protocol.IPV6ADDRESS) || []; + const [, address, zone] = matches; + + if (address) { + const [last, first] = address.toLowerCase().split('::').reverse(); + const firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + const lastFields = last.split(":").map(_stripLeadingZeros); + const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + const fieldCount = isLastFieldIPv4Address ? 7 : 8; + const lastFieldsStart = lastFields.length - fieldCount; + const fields = Array(fieldCount); + + for (let x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + + const allZeroFields = fields.reduce>((acc, field, index) => { + if (!field || field === "0") { + const lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index, length : 1 }); + } + } + return acc; + }, []); + + const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0]; + + let newHost:string; + if (longestZeroFields && longestZeroFields.length > 1) { + const newFirst = fields.slice(0, longestZeroFields.index) ; + const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + + if (zone) { + newHost += "%" + zone; + } + + return newHost; + } else { + return host; + } +} + +const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +const NO_MATCH_IS_UNDEFINED = (("").match(/(){0}/))[1] === undefined; + +export function parse(uriString:string, options:URIOptions = {}):URIComponents { + const components:URIComponents = {}; + const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); + + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + + const matches = uriString.match(URI_PARSE); + + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined); + components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined); + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined); + components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined); + + //fix port number + if (isNaN(components.port)) { + components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined); + } + } + + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + + //find scheme handler + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + + return components; +}; + +function _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined { + const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); + const uriTokens:Array = []; + + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]")); + } + + if (typeof components.port === "number") { + uriTokens.push(":"); + uriTokens.push(components.port.toString(10)); + } + + return uriTokens.length ? uriTokens.join("") : undefined; +}; + +const RDS1 = /^\.\.?\//; +const RDS2 = /^\/\.(\/|$)/; +const RDS3 = /^\/\.\.(\/|$)/; +const RDS4 = /^\.\.?$/; +const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; + +export function removeDotSegments(input:string):string { + const output:Array = []; + + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + const im = input.match(RDS5); + if (im) { + const s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + + return output.join(""); +}; + +export function serialize(components:URIComponents, options:URIOptions = {}):string { + const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL); + const uriTokens:Array = []; + + //find scheme handler + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) { + //TODO: normalize IPv6 address as per RFC 5952 + } + + //if host component is a domain name + else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) { + //convert IDN via punycode + try { + components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host)); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + + //normalize encoding + _normalizeComponentEncoding(components, protocol); + + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + + const authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + + uriTokens.push(authority); + + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + + if (components.path !== undefined) { + let s = components.path; + + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + + uriTokens.push(s); + } + + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + + return uriTokens.join(""); //merge tokens into a string +}; + +export function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents { + const target:URIComponents = {}; + + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + + target.fragment = relative.fragment; + + return target; +}; + +export function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string { + const schemelessOptions = assign({ scheme : 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +}; + +export function normalize(uri:string, options?:URIOptions):string; +export function normalize(uri:URIComponents, options?:URIOptions):URIComponents; +export function normalize(uri:any, options?:URIOptions):any { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + + return uri; +}; + +export function equal(uriA:string, uriB:string, options?: URIOptions):boolean; +export function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean; +export function equal(uriA:any, uriB:any, options?:URIOptions):boolean { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + + return uriA === uriB; +}; + +export function escapeComponent(str:string, options?:URIOptions):string { + return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar); +}; + +export function unescapeComponent(str:string, options?:URIOptions):string { + return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars); +}; diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/src/util.ts b/public/node_modules/_uri-js@4.2.2@uri-js/src/util.ts new file mode 100644 index 000000000..29c6d5d4d --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/src/util.ts @@ -0,0 +1,40 @@ +export function merge(...sets:Array):string { + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + const xl = sets.length - 1; + for (let x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } else { + return sets[0]; + } +} + +export function subexp(str:string):string { + return "(?:" + str + ")"; +} + +export function typeOf(o:any):string { + return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()); +} + +export function toUpperCase(str:string):string { + return str.toUpperCase(); +} + +export function toArray(obj:any):Array { + return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : []; +} + + +export function assign(target: object, source: any): any { + const obj = target as any; + if (source) { + for (const key in source) { + obj[key] = source[key]; + } + } + return obj; +} \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/tests/qunit.css b/public/node_modules/_uri-js@4.2.2@uri-js/tests/qunit.css new file mode 100644 index 000000000..a2e183d59 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/tests/qunit.css @@ -0,0 +1,118 @@ +ol#qunit-tests { + font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; + margin:0; + padding:0; + list-style-position:inside; + + font-size: smaller; +} +ol#qunit-tests li{ + padding:0.4em 0.5em 0.4em 2.5em; + border-bottom:1px solid #fff; + font-size:small; + list-style-position:inside; +} +ol#qunit-tests li ol{ + box-shadow: inset 0px 2px 13px #999; + -moz-box-shadow: inset 0px 2px 13px #999; + -webkit-box-shadow: inset 0px 2px 13px #999; + margin-top:0.5em; + margin-left:0; + padding:0.5em; + background-color:#fff; + border-radius:15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; +} +ol#qunit-tests li li{ + border-bottom:none; + margin:0.5em; + background-color:#fff; + list-style-position: inside; + padding:0.4em 0.5em 0.4em 0.5em; +} + +ol#qunit-tests li li.pass{ + border-left:26px solid #C6E746; + background-color:#fff; + color:#5E740B; + } +ol#qunit-tests li li.fail{ + border-left:26px solid #EE5757; + background-color:#fff; + color:#710909; +} +ol#qunit-tests li.pass{ + background-color:#D2E0E6; + color:#528CE0; +} +ol#qunit-tests li.fail{ + background-color:#EE5757; + color:#000; +} +ol#qunit-tests li strong { + cursor:pointer; +} +h1#qunit-header{ + background-color:#0d3349; + margin:0; + padding:0.5em 0 0.5em 1em; + color:#fff; + font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; + border-top-right-radius:15px; + border-top-left-radius:15px; + -moz-border-radius-topright:15px; + -moz-border-radius-topleft:15px; + -webkit-border-top-right-radius:15px; + -webkit-border-top-left-radius:15px; + text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px; +} +h2#qunit-banner{ + font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; + height:5px; + margin:0; + padding:0; +} +h2#qunit-banner.qunit-pass{ + background-color:#C6E746; +} +h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar { + background-color:#EE5757; +} +#qunit-testrunner-toolbar { + font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; + padding:0; + /*width:80%;*/ + padding:0em 0 0.5em 2em; + font-size: small; +} +h2#qunit-userAgent { + font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; + background-color:#2b81af; + margin:0; + padding:0; + color:#fff; + font-size: small; + padding:0.5em 0 0.5em 2.5em; + text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; +} +p#qunit-testresult{ + font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; + margin:0; + font-size: small; + color:#2b81af; + border-bottom-right-radius:15px; + border-bottom-left-radius:15px; + -moz-border-radius-bottomright:15px; + -moz-border-radius-bottomleft:15px; + -webkit-border-bottom-right-radius:15px; + -webkit-border-bottom-left-radius:15px; + background-color:#D2E0E6; + padding:0.5em 0.5em 0.5em 2.5em; +} +strong b.fail{ + color:#710909; + } +strong b.pass{ + color:#5E740B; + } \ No newline at end of file diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/tests/qunit.js b/public/node_modules/_uri-js@4.2.2@uri-js/tests/qunit.js new file mode 100644 index 000000000..e449fdf87 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/tests/qunit.js @@ -0,0 +1,1042 @@ +/* + * QUnit - A JavaScript Unit Testing Framework + * + * http://docs.jquery.com/QUnit + * + * Copyright (c) 2009 John Resig, Jörn Zaefferer + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + */ + +(function(window) { + +var QUnit = { + + // Initialize the configuration options + init: function() { + config = { + stats: { all: 0, bad: 0 }, + moduleStats: { all: 0, bad: 0 }, + started: +new Date, + blocking: false, + autorun: false, + assertions: [], + filters: [], + queue: [] + }; + + var tests = id("qunit-tests"), + banner = id("qunit-banner"), + result = id("qunit-testresult"); + + if ( tests ) { + tests.innerHTML = ""; + } + + if ( banner ) { + banner.className = ""; + } + + if ( result ) { + result.parentNode.removeChild( result ); + } + }, + + // call on start of module test to prepend name to all tests + module: function(name, testEnvironment) { + config.currentModule = name; + + synchronize(function() { + if ( config.currentModule ) { + QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); + } + + config.currentModule = name; + config.moduleTestEnvironment = testEnvironment; + config.moduleStats = { all: 0, bad: 0 }; + + QUnit.moduleStart( name, testEnvironment ); + }); + }, + + asyncTest: function(testName, expected, callback) { + if ( arguments.length === 2 ) { + callback = expected; + expected = 0; + } + + QUnit.test(testName, expected, callback, true); + }, + + test: function(testName, expected, callback, async) { + var name = testName, testEnvironment, testEnvironmentArg; + + if ( arguments.length === 2 ) { + callback = expected; + expected = null; + } + // is 2nd argument a testEnvironment? + if ( expected && typeof expected === 'object') { + testEnvironmentArg = expected; + expected = null; + } + + if ( config.currentModule ) { + name = config.currentModule + " module: " + name; + } + + if ( !validTest(name) ) { + return; + } + + synchronize(function() { + QUnit.testStart( testName ); + + testEnvironment = extend({ + setup: function() {}, + teardown: function() {} + }, config.moduleTestEnvironment); + if (testEnvironmentArg) { + extend(testEnvironment,testEnvironmentArg); + } + + // allow utility functions to access the current test environment + QUnit.current_testEnvironment = testEnvironment; + + config.assertions = []; + config.expected = expected; + + try { + if ( !config.pollution ) { + saveGlobal(); + } + + testEnvironment.setup.call(testEnvironment); + } catch(e) { + QUnit.ok( false, "Setup failed on " + name + ": " + e.message ); + } + + if ( async ) { + QUnit.stop(); + } + + try { + callback.call(testEnvironment); + } catch(e) { + fail("Test " + name + " died, exception and test follows", e, callback); + QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message ); + // else next test will carry the responsibility + saveGlobal(); + + // Restart the tests if they're blocking + if ( config.blocking ) { + start(); + } + } + }); + + synchronize(function() { + try { + checkPollution(); + testEnvironment.teardown.call(testEnvironment); + } catch(e) { + QUnit.ok( false, "Teardown failed on " + name + ": " + e.message ); + } + + try { + QUnit.reset(); + } catch(e) { + fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset); + } + + if ( config.expected && config.expected != config.assertions.length ) { + QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" ); + } + + var good = 0, bad = 0, + tests = id("qunit-tests"); + + config.stats.all += config.assertions.length; + config.moduleStats.all += config.assertions.length; + + if ( tests ) { + var ol = document.createElement("ol"); + ol.style.display = "none"; + + for ( var i = 0; i < config.assertions.length; i++ ) { + var assertion = config.assertions[i]; + + var li = document.createElement("li"); + li.className = assertion.result ? "pass" : "fail"; + li.appendChild(document.createTextNode(assertion.message || "(no message)")); + ol.appendChild( li ); + + if ( assertion.result ) { + good++; + } else { + bad++; + config.stats.bad++; + config.moduleStats.bad++; + } + } + + var b = document.createElement("strong"); + b.innerHTML = name + " (" + bad + ", " + good + ", " + config.assertions.length + ")"; + + addEvent(b, "click", function() { + var next = b.nextSibling, display = next.style.display; + next.style.display = display === "none" ? "block" : "none"; + }); + + addEvent(b, "dblclick", function(e) { + var target = e && e.target ? e.target : window.event.srcElement; + if ( target.nodeName.toLowerCase() === "strong" ) { + var text = "", node = target.firstChild; + + while ( node.nodeType === 3 ) { + text += node.nodeValue; + node = node.nextSibling; + } + + text = text.replace(/(^\s*|\s*$)/g, ""); + + if ( window.location ) { + window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text); + } + } + }); + + var li = document.createElement("li"); + li.className = bad ? "fail" : "pass"; + li.appendChild( b ); + li.appendChild( ol ); + tests.appendChild( li ); + + if ( bad ) { + var toolbar = id("qunit-testrunner-toolbar"); + if ( toolbar ) { + toolbar.style.display = "block"; + id("qunit-filter-pass").disabled = null; + id("qunit-filter-missing").disabled = null; + } + } + + } else { + for ( var i = 0; i < config.assertions.length; i++ ) { + if ( !config.assertions[i].result ) { + bad++; + config.stats.bad++; + config.moduleStats.bad++; + } + } + } + + QUnit.testDone( testName, bad, config.assertions.length ); + + if ( !window.setTimeout && !config.queue.length ) { + done(); + } + }); + + if ( window.setTimeout && !config.doneTimer ) { + config.doneTimer = window.setTimeout(function(){ + if ( !config.queue.length ) { + done(); + } else { + synchronize( done ); + } + }, 13); + } + }, + + /** + * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. + */ + expect: function(asserts) { + config.expected = asserts; + }, + + /** + * Asserts true. + * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); + */ + ok: function(a, msg) { + QUnit.log(a, msg); + + config.assertions.push({ + result: !!a, + message: msg + }); + }, + + /** + * Checks that the first two arguments are equal, with an optional message. + * Prints out both actual and expected values. + * + * Prefered to ok( actual == expected, message ) + * + * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); + * + * @param Object actual + * @param Object expected + * @param String message (optional) + */ + equal: function(actual, expected, message) { + push(expected == actual, actual, expected, message); + }, + + notEqual: function(actual, expected, message) { + push(expected != actual, actual, expected, message); + }, + + deepEqual: function(a, b, message) { + push(QUnit.equiv(a, b), a, b, message); + }, + + notDeepEqual: function(a, b, message) { + push(!QUnit.equiv(a, b), a, b, message); + }, + + strictEqual: function(actual, expected, message) { + push(expected === actual, actual, expected, message); + }, + + notStrictEqual: function(actual, expected, message) { + push(expected !== actual, actual, expected, message); + }, + + start: function() { + // A slight delay, to avoid any current callbacks + if ( window.setTimeout ) { + window.setTimeout(function() { + if ( config.timeout ) { + clearTimeout(config.timeout); + } + + config.blocking = false; + process(); + }, 13); + } else { + config.blocking = false; + process(); + } + }, + + stop: function(timeout) { + config.blocking = true; + + if ( timeout && window.setTimeout ) { + config.timeout = window.setTimeout(function() { + QUnit.ok( false, "Test timed out" ); + QUnit.start(); + }, timeout); + } + }, + + /** + * Resets the test setup. Useful for tests that modify the DOM. + */ + reset: function() { + if ( window.jQuery ) { + jQuery("#main").html( config.fixture ); + jQuery.event.global = {}; + jQuery.ajaxSettings = extend({}, config.ajaxSettings); + } + }, + + /** + * Trigger an event on an element. + * + * @example triggerEvent( document.body, "click" ); + * + * @param DOMElement elem + * @param String type + */ + triggerEvent: function( elem, type, event ) { + if ( document.createEvent ) { + event = document.createEvent("MouseEvents"); + event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, + 0, 0, 0, 0, 0, false, false, false, false, 0, null); + elem.dispatchEvent( event ); + + } else if ( elem.fireEvent ) { + elem.fireEvent("on"+type); + } + }, + + // Safe object type checking + is: function( type, obj ) { + return Object.prototype.toString.call( obj ) === "[object "+ type +"]"; + }, + + // Logging callbacks + done: function(failures, total) {}, + log: function(result, message) {}, + testStart: function(name) {}, + testDone: function(name, failures, total) {}, + moduleStart: function(name, testEnvironment) {}, + moduleDone: function(name, failures, total) {} +}; + +// Backwards compatibility, deprecated +QUnit.equals = QUnit.equal; +QUnit.same = QUnit.deepEqual; + +// Maintain internal state +var config = { + // The queue of tests to run + queue: [], + + // block until document ready + blocking: true +}; + +// Load paramaters +(function() { + var location = window.location || { search: "", protocol: "file:" }, + GETParams = location.search.slice(1).split('&'); + + for ( var i = 0; i < GETParams.length; i++ ) { + GETParams[i] = decodeURIComponent( GETParams[i] ); + if ( GETParams[i] === "noglobals" ) { + GETParams.splice( i, 1 ); + i--; + config.noglobals = true; + } else if ( GETParams[i].search('=') > -1 ) { + GETParams.splice( i, 1 ); + i--; + } + } + + // restrict modules/tests by get parameters + config.filters = GETParams; + + // Figure out if we're running the tests from a server or not + QUnit.isLocal = !!(location.protocol === 'file:'); +})(); + +// Expose the API as global variables, unless an 'exports' +// object exists, in that case we assume we're in CommonJS +if ( typeof exports === "undefined" || typeof require === "undefined" ) { + extend(window, QUnit); + window.QUnit = QUnit; +} else { + extend(exports, QUnit); + exports.QUnit = QUnit; +} + +if ( typeof document === "undefined" || document.readyState === "complete" ) { + config.autorun = true; +} + +addEvent(window, "load", function() { + // Initialize the config, saving the execution queue + var oldconfig = extend({}, config); + QUnit.init(); + extend(config, oldconfig); + + config.blocking = false; + + var userAgent = id("qunit-userAgent"); + if ( userAgent ) { + userAgent.innerHTML = navigator.userAgent; + } + + var toolbar = id("qunit-testrunner-toolbar"); + if ( toolbar ) { + toolbar.style.display = "none"; + + var filter = document.createElement("input"); + filter.type = "checkbox"; + filter.id = "qunit-filter-pass"; + filter.disabled = true; + addEvent( filter, "click", function() { + var li = document.getElementsByTagName("li"); + for ( var i = 0; i < li.length; i++ ) { + if ( li[i].className.indexOf("pass") > -1 ) { + li[i].style.display = filter.checked ? "none" : ""; + } + } + }); + toolbar.appendChild( filter ); + + var label = document.createElement("label"); + label.setAttribute("for", "qunit-filter-pass"); + label.innerHTML = "Hide passed tests"; + toolbar.appendChild( label ); + + var missing = document.createElement("input"); + missing.type = "checkbox"; + missing.id = "qunit-filter-missing"; + missing.disabled = true; + addEvent( missing, "click", function() { + var li = document.getElementsByTagName("li"); + for ( var i = 0; i < li.length; i++ ) { + if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) { + li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block"; + } + } + }); + toolbar.appendChild( missing ); + + label = document.createElement("label"); + label.setAttribute("for", "qunit-filter-missing"); + label.innerHTML = "Hide missing tests (untested code is broken code)"; + toolbar.appendChild( label ); + } + + var main = id('main'); + if ( main ) { + config.fixture = main.innerHTML; + } + + if ( window.jQuery ) { + config.ajaxSettings = window.jQuery.ajaxSettings; + } + + QUnit.start(); +}); + +function done() { + if ( config.doneTimer && window.clearTimeout ) { + window.clearTimeout( config.doneTimer ); + config.doneTimer = null; + } + + if ( config.queue.length ) { + config.doneTimer = window.setTimeout(function(){ + if ( !config.queue.length ) { + done(); + } else { + synchronize( done ); + } + }, 13); + + return; + } + + config.autorun = true; + + // Log the last module results + if ( config.currentModule ) { + QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); + } + + var banner = id("qunit-banner"), + tests = id("qunit-tests"), + html = ['Tests completed in ', + +new Date - config.started, ' milliseconds.
', + '', config.stats.all - config.stats.bad, ' tests of ', config.stats.all, ' passed, ', config.stats.bad,' failed.'].join(''); + + if ( banner ) { + banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); + } + + if ( tests ) { + var result = id("qunit-testresult"); + + if ( !result ) { + result = document.createElement("p"); + result.id = "qunit-testresult"; + result.className = "result"; + tests.parentNode.insertBefore( result, tests.nextSibling ); + } + + result.innerHTML = html; + } + + QUnit.done( config.stats.bad, config.stats.all ); +} + +function validTest( name ) { + var i = config.filters.length, + run = false; + + if ( !i ) { + return true; + } + + while ( i-- ) { + var filter = config.filters[i], + not = filter.charAt(0) == '!'; + + if ( not ) { + filter = filter.slice(1); + } + + if ( name.indexOf(filter) !== -1 ) { + return !not; + } + + if ( not ) { + run = true; + } + } + + return run; +} + +function push(result, actual, expected, message) { + message = message || (result ? "okay" : "failed"); + QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) ); +} + +function synchronize( callback ) { + config.queue.push( callback ); + + if ( config.autorun && !config.blocking ) { + process(); + } +} + +function process() { + while ( config.queue.length && !config.blocking ) { + config.queue.shift()(); + } +} + +function saveGlobal() { + config.pollution = []; + + if ( config.noglobals ) { + for ( var key in window ) { + config.pollution.push( key ); + } + } +} + +function checkPollution( name ) { + var old = config.pollution; + saveGlobal(); + + var newGlobals = diff( old, config.pollution ); + if ( newGlobals.length > 0 ) { + ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); + config.expected++; + } + + var deletedGlobals = diff( config.pollution, old ); + if ( deletedGlobals.length > 0 ) { + ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); + config.expected++; + } +} + +// returns a new Array with the elements that are in a but not in b +function diff( a, b ) { + var result = a.slice(); + for ( var i = 0; i < result.length; i++ ) { + for ( var j = 0; j < b.length; j++ ) { + if ( result[i] === b[j] ) { + result.splice(i, 1); + i--; + break; + } + } + } + return result; +} + +function fail(message, exception, callback) { + if ( typeof console !== "undefined" && console.error && console.warn ) { + console.error(message); + console.error(exception); + console.warn(callback.toString()); + + } else if ( window.opera && opera.postError ) { + opera.postError(message, exception, callback.toString); + } +} + +function extend(a, b) { + for ( var prop in b ) { + a[prop] = b[prop]; + } + + return a; +} + +function addEvent(elem, type, fn) { + if ( elem.addEventListener ) { + elem.addEventListener( type, fn, false ); + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, fn ); + } else { + fn(); + } +} + +function id(name) { + return !!(typeof document !== "undefined" && document && document.getElementById) && + document.getElementById( name ); +} + +// Test for equality any JavaScript type. +// Discussions and reference: http://philrathe.com/articles/equiv +// Test suites: http://philrathe.com/tests/equiv +// Author: Philippe Rathé +QUnit.equiv = function () { + + var innerEquiv; // the real equiv function + var callers = []; // stack to decide between skip/abort functions + + + // Determine what is o. + function hoozit(o) { + if (QUnit.is("String", o)) { + return "string"; + + } else if (QUnit.is("Boolean", o)) { + return "boolean"; + + } else if (QUnit.is("Number", o)) { + + if (isNaN(o)) { + return "nan"; + } else { + return "number"; + } + + } else if (typeof o === "undefined") { + return "undefined"; + + // consider: typeof null === object + } else if (o === null) { + return "null"; + + // consider: typeof [] === object + } else if (QUnit.is( "Array", o)) { + return "array"; + + // consider: typeof new Date() === object + } else if (QUnit.is( "Date", o)) { + return "date"; + + // consider: /./ instanceof Object; + // /./ instanceof RegExp; + // typeof /./ === "function"; // => false in IE and Opera, + // true in FF and Safari + } else if (QUnit.is( "RegExp", o)) { + return "regexp"; + + } else if (typeof o === "object") { + return "object"; + + } else if (QUnit.is( "Function", o)) { + return "function"; + } else { + return undefined; + } + } + + // Call the o related callback with the given arguments. + function bindCallbacks(o, callbacks, args) { + var prop = hoozit(o); + if (prop) { + if (hoozit(callbacks[prop]) === "function") { + return callbacks[prop].apply(callbacks, args); + } else { + return callbacks[prop]; // or undefined + } + } + } + + var callbacks = function () { + + // for string, boolean, number and null + function useStrictEquality(b, a) { + if (b instanceof a.constructor || a instanceof b.constructor) { + // to catch short annotaion VS 'new' annotation of a declaration + // e.g. var i = 1; + // var j = new Number(1); + return a == b; + } else { + return a === b; + } + } + + return { + "string": useStrictEquality, + "boolean": useStrictEquality, + "number": useStrictEquality, + "null": useStrictEquality, + "undefined": useStrictEquality, + + "nan": function (b) { + return isNaN(b); + }, + + "date": function (b, a) { + return hoozit(b) === "date" && a.valueOf() === b.valueOf(); + }, + + "regexp": function (b, a) { + return hoozit(b) === "regexp" && + a.source === b.source && // the regex itself + a.global === b.global && // and its modifers (gmi) ... + a.ignoreCase === b.ignoreCase && + a.multiline === b.multiline; + }, + + // - skip when the property is a method of an instance (OOP) + // - abort otherwise, + // initial === would have catch identical references anyway + "function": function () { + var caller = callers[callers.length - 1]; + return caller !== Object && + typeof caller !== "undefined"; + }, + + "array": function (b, a) { + var i; + var len; + + // b could be an object literal here + if ( ! (hoozit(b) === "array")) { + return false; + } + + len = a.length; + if (len !== b.length) { // safe and faster + return false; + } + for (i = 0; i < len; i++) { + if ( ! innerEquiv(a[i], b[i])) { + return false; + } + } + return true; + }, + + "object": function (b, a) { + var i; + var eq = true; // unless we can proove it + var aProperties = [], bProperties = []; // collection of strings + + // comparing constructors is more strict than using instanceof + if ( a.constructor !== b.constructor) { + return false; + } + + // stack constructor before traversing properties + callers.push(a.constructor); + + for (i in a) { // be strict: don't ensures hasOwnProperty and go deep + + aProperties.push(i); // collect a's properties + + if ( ! innerEquiv(a[i], b[i])) { + eq = false; + } + } + + callers.pop(); // unstack, we are done + + for (i in b) { + bProperties.push(i); // collect b's properties + } + + // Ensures identical properties name + return eq && innerEquiv(aProperties.sort(), bProperties.sort()); + } + }; + }(); + + innerEquiv = function () { // can take multiple arguments + var args = Array.prototype.slice.apply(arguments); + if (args.length < 2) { + return true; // end transition + } + + return (function (a, b) { + if (a === b) { + return true; // catch the most you can + } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || hoozit(a) !== hoozit(b)) { + return false; // don't lose time with error prone cases + } else { + return bindCallbacks(a, callbacks, [b, a]); + } + + // apply transition with (1..n) arguments + })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1)); + }; + + return innerEquiv; + +}(); + +/** + * jsDump + * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com + * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php) + * Date: 5/15/2008 + * @projectDescription Advanced and extensible data dumping for Javascript. + * @version 1.0.0 + * @author Ariel Flesler + * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} + */ +QUnit.jsDump = (function() { + function quote( str ) { + return '"' + str.toString().replace(/"/g, '\\"') + '"'; + }; + function literal( o ) { + return o + ''; + }; + function join( pre, arr, post ) { + var s = jsDump.separator(), + base = jsDump.indent(), + inner = jsDump.indent(1); + if ( arr.join ) + arr = arr.join( ',' + s + inner ); + if ( !arr ) + return pre + post; + return [ pre, inner + arr, base + post ].join(s); + }; + function array( arr ) { + var i = arr.length, ret = Array(i); + this.up(); + while ( i-- ) + ret[i] = this.parse( arr[i] ); + this.down(); + return join( '[', ret, ']' ); + }; + + var reName = /^function (\w+)/; + + var jsDump = { + parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance + var parser = this.parsers[ type || this.typeOf(obj) ]; + type = typeof parser; + + return type == 'function' ? parser.call( this, obj ) : + type == 'string' ? parser : + this.parsers.error; + }, + typeOf:function( obj ) { + var type; + if ( obj === null ) { + type = "null"; + } else if (typeof obj === "undefined") { + type = "undefined"; + } else if (QUnit.is("RegExp", obj)) { + type = "regexp"; + } else if (QUnit.is("Date", obj)) { + type = "date"; + } else if (QUnit.is("Function", obj)) { + type = "function"; + } else if (QUnit.is("Array", obj)) { + type = "array"; + } else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) { + type = "window"; + } else if (QUnit.is("HTMLDocument", obj)) { + type = "document"; + } else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) { + type = "nodelist"; + } else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) { + type = "node"; + } else { + type = typeof obj; + } + return type; + }, + separator:function() { + return this.multiline ? this.HTML ? '
' : '\n' : this.HTML ? ' ' : ' '; + }, + indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing + if ( !this.multiline ) + return ''; + var chr = this.indentChar; + if ( this.HTML ) + chr = chr.replace(/\t/g,' ').replace(/ /g,' '); + return Array( this._depth_ + (extra||0) ).join(chr); + }, + up:function( a ) { + this._depth_ += a || 1; + }, + down:function( a ) { + this._depth_ -= a || 1; + }, + setParser:function( name, parser ) { + this.parsers[name] = parser; + }, + // The next 3 are exposed so you can use them + quote:quote, + literal:literal, + join:join, + // + _depth_: 1, + // This is the list of parsers, to modify them, use jsDump.setParser + parsers:{ + window: '[Window]', + document: '[Document]', + error:'[ERROR]', //when no parser is found, shouldn't happen + unknown: '[Unknown]', + 'null':'null', + undefined:'undefined', + 'function':function( fn ) { + var ret = 'function', + name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE + if ( name ) + ret += ' ' + name; + ret += '('; + + ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join(''); + return join( ret, this.parse(fn,'functionCode'), '}' ); + }, + array: array, + nodelist: array, + arguments: array, + object:function( map ) { + var ret = [ ]; + this.up(); + for ( var key in map ) + ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) ); + this.down(); + return join( '{', ret, '}' ); + }, + node:function( node ) { + var open = this.HTML ? '<' : '<', + close = this.HTML ? '>' : '>'; + + var tag = node.nodeName.toLowerCase(), + ret = open + tag; + + for ( var a in this.DOMAttrs ) { + var val = node[this.DOMAttrs[a]]; + if ( val ) + ret += ' ' + a + '=' + this.parse( val, 'attribute' ); + } + return ret + close + open + '/' + tag + close; + }, + functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function + var l = fn.length; + if ( !l ) return ''; + + var args = Array(l); + while ( l-- ) + args[l] = String.fromCharCode(97+l);//97 is 'a' + return ' ' + args.join(', ') + ' '; + }, + key:quote, //object calls it internally, the key part of an item in a map + functionCode:'[code]', //function calls it internally, it's the content of the function + attribute:quote, //node calls it internally, it's an html attribute value + string:quote, + date:quote, + regexp:literal, //regex + number:literal, + 'boolean':literal + }, + DOMAttrs:{//attributes to dump from nodes, name=>realName + id:'id', + name:'name', + 'class':'className' + }, + HTML:true,//if true, entities are escaped ( <, >, \t, space and \n ) + indentChar:' ',//indentation unit + multiline:true //if true, items in a collection, are separated by a \n, else just a space. + }; + + return jsDump; +})(); + +})(this); diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/tests/test-es5-min.html b/public/node_modules/_uri-js@4.2.2@uri-js/tests/test-es5-min.html new file mode 100644 index 000000000..b841c7577 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/tests/test-es5-min.html @@ -0,0 +1,17 @@ + + + + + + + + + +

URI.js Test Suite

+

+
+

+
    + + diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/tests/test-es5.html b/public/node_modules/_uri-js@4.2.2@uri-js/tests/test-es5.html new file mode 100644 index 000000000..2d89c66b6 --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/tests/test-es5.html @@ -0,0 +1,17 @@ + + + + + + + + + +

    URI.js Test Suite

    +

    +
    +

    +
      + + diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/tests/tests.js b/public/node_modules/_uri-js@4.2.2@uri-js/tests/tests.js new file mode 100644 index 000000000..624191ced --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/tests/tests.js @@ -0,0 +1,774 @@ +// +// +// Tests +// +// + +if (typeof URI === "undefined") { + var URI = require("../dist/es5/uri.all"); +} + +test("Acquire URI", function () { + //URI = require("./uri").URI; + ok(URI); +}); + +test("URI Parsing", function () { + var components; + + //scheme + components = URI.parse("uri:"); + strictEqual(components.error, undefined, "scheme errors"); + strictEqual(components.scheme, "uri", "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //userinfo + components = URI.parse("//@"); + strictEqual(components.error, undefined, "userinfo errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, "@", "authority"); + strictEqual(components.userinfo, "", "userinfo"); + strictEqual(components.host, "", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //host + components = URI.parse("//"); + strictEqual(components.error, undefined, "host errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, "", "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //port + components = URI.parse("//:"); + strictEqual(components.error, undefined, "port errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, ":", "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "", "host"); + strictEqual(components.port, "", "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //path + components = URI.parse(""); + strictEqual(components.error, undefined, "path errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //query + components = URI.parse("?"); + strictEqual(components.error, undefined, "query errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, "", "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //fragment + components = URI.parse("#"); + strictEqual(components.error, undefined, "fragment errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, "", "fragment"); + + //fragment with character tabulation + components = URI.parse("#\t"); + strictEqual(components.error, undefined, "path errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, "%09", "fragment"); + + //fragment with line feed + components = URI.parse("#\n"); + strictEqual(components.error, undefined, "path errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, "%0A", "fragment"); + + //fragment with line tabulation + components = URI.parse("#\v"); + strictEqual(components.error, undefined, "path errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, "%0B", "fragment"); + + //fragment with form feed + components = URI.parse("#\f"); + strictEqual(components.error, undefined, "path errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, "%0C", "fragment"); + + //fragment with carriage return + components = URI.parse("#\r"); + strictEqual(components.error, undefined, "path errors"); + strictEqual(components.scheme, undefined, "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, "%0D", "fragment"); + + //all + components = URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body"); + strictEqual(components.error, undefined, "all errors"); + strictEqual(components.scheme, "uri", "scheme"); + //strictEqual(components.authority, "user:pass@example.com:123", "authority"); + strictEqual(components.userinfo, "user:pass", "userinfo"); + strictEqual(components.host, "example.com", "host"); + strictEqual(components.port, 123, "port"); + strictEqual(components.path, "/one/two.three", "path"); + strictEqual(components.query, "q1=a1&q2=a2", "query"); + strictEqual(components.fragment, "body", "fragment"); + + //IPv4address + components = URI.parse("//10.10.10.10"); + strictEqual(components.error, undefined, "IPv4address errors"); + strictEqual(components.scheme, undefined, "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "10.10.10.10", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //IPv6address + components = URI.parse("//[2001:db8::7]"); + strictEqual(components.error, undefined, "IPv4address errors"); + strictEqual(components.scheme, undefined, "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "2001:db8::7", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //mixed IPv4address & IPv6address + components = URI.parse("//[::ffff:129.144.52.38]"); + strictEqual(components.error, undefined, "IPv4address errors"); + strictEqual(components.scheme, undefined, "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "::ffff:129.144.52.38", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //mixed IPv4address & reg-name, example from terion-name (https://github.com/garycourt/uri-js/issues/4) + components = URI.parse("uri://10.10.10.10.example.com/en/process"); + strictEqual(components.error, undefined, "mixed errors"); + strictEqual(components.scheme, "uri", "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "10.10.10.10.example.com", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "/en/process", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //IPv6address, example from bkw (https://github.com/garycourt/uri-js/pull/16) + components = URI.parse("//[2606:2800:220:1:248:1893:25c8:1946]/test"); + strictEqual(components.error, undefined, "IPv6address errors"); + strictEqual(components.scheme, undefined, "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "2606:2800:220:1:248:1893:25c8:1946", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "/test", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //IPv6address, example from RFC 5952 + components = URI.parse("//[2001:db8::1]:80"); + strictEqual(components.error, undefined, "IPv6address errors"); + strictEqual(components.scheme, undefined, "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "2001:db8::1", "host"); + strictEqual(components.port, 80, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //IPv6address with zone identifier, RFC 6874 + components = URI.parse("//[fe80::a%25en1]"); + strictEqual(components.error, undefined, "IPv4address errors"); + strictEqual(components.scheme, undefined, "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "fe80::a%en1", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + + //IPv6address with an unescaped interface specifier, example from pekkanikander (https://github.com/garycourt/uri-js/pull/22) + components = URI.parse("//[2001:db8::7%en0]"); + strictEqual(components.error, undefined, "IPv6address interface errors"); + strictEqual(components.scheme, undefined, "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, "2001:db8::7%en0", "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, "", "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); +}); + +test("URI Serialization", function () { + var components = { + scheme : undefined, + userinfo : undefined, + host : undefined, + port : undefined, + path : undefined, + query : undefined, + fragment : undefined + }; + strictEqual(URI.serialize(components), "", "Undefined Components"); + + components = { + scheme : "", + userinfo : "", + host : "", + port : 0, + path : "", + query : "", + fragment : "" + }; + strictEqual(URI.serialize(components), "//@:0?#", "Empty Components"); + + components = { + scheme : "uri", + userinfo : "foo:bar", + host : "example.com", + port : 1, + path : "path", + query : "query", + fragment : "fragment" + }; + strictEqual(URI.serialize(components), "uri://foo:bar@example.com:1/path?query#fragment", "All Components"); + + strictEqual(URI.serialize({path:"//path"}), "/%2Fpath", "Double slash path"); + strictEqual(URI.serialize({path:"foo:bar"}), "foo%3Abar", "Colon path"); + strictEqual(URI.serialize({path:"?query"}), "%3Fquery", "Query path"); + + //mixed IPv4address & reg-name, example from terion-name (https://github.com/garycourt/uri-js/issues/4) + strictEqual(URI.serialize({host:"10.10.10.10.example.com"}), "//10.10.10.10.example.com", "Mixed IPv4address & reg-name"); + + //IPv6address + strictEqual(URI.serialize({host:"2001:db8::7"}), "//[2001:db8::7]", "IPv6 Host"); + strictEqual(URI.serialize({host:"::ffff:129.144.52.38"}), "//[::ffff:129.144.52.38]", "IPv6 Mixed Host"); + strictEqual(URI.serialize({host:"2606:2800:220:1:248:1893:25c8:1946"}), "//[2606:2800:220:1:248:1893:25c8:1946]", "IPv6 Full Host"); + + //IPv6address with zone identifier, RFC 6874 + strictEqual(URI.serialize({host:"fe80::a%en1"}), "//[fe80::a%25en1]", "IPv6 Zone Unescaped Host"); + strictEqual(URI.serialize({host:"fe80::a%25en1"}), "//[fe80::a%25en1]", "IPv6 Zone Escaped Host"); +}); + +test("URI Resolving", function () { + //normal examples from RFC 3986 + var base = "uri://a/b/c/d;p?q"; + strictEqual(URI.resolve(base, "g:h"), "g:h", "g:h"); + strictEqual(URI.resolve(base, "g:h"), "g:h", "g:h"); + strictEqual(URI.resolve(base, "g"), "uri://a/b/c/g", "g"); + strictEqual(URI.resolve(base, "./g"), "uri://a/b/c/g", "./g"); + strictEqual(URI.resolve(base, "g/"), "uri://a/b/c/g/", "g/"); + strictEqual(URI.resolve(base, "/g"), "uri://a/g", "/g"); + strictEqual(URI.resolve(base, "//g"), "uri://g", "//g"); + strictEqual(URI.resolve(base, "?y"), "uri://a/b/c/d;p?y", "?y"); + strictEqual(URI.resolve(base, "g?y"), "uri://a/b/c/g?y", "g?y"); + strictEqual(URI.resolve(base, "#s"), "uri://a/b/c/d;p?q#s", "#s"); + strictEqual(URI.resolve(base, "g#s"), "uri://a/b/c/g#s", "g#s"); + strictEqual(URI.resolve(base, "g?y#s"), "uri://a/b/c/g?y#s", "g?y#s"); + strictEqual(URI.resolve(base, ";x"), "uri://a/b/c/;x", ";x"); + strictEqual(URI.resolve(base, "g;x"), "uri://a/b/c/g;x", "g;x"); + strictEqual(URI.resolve(base, "g;x?y#s"), "uri://a/b/c/g;x?y#s", "g;x?y#s"); + strictEqual(URI.resolve(base, ""), "uri://a/b/c/d;p?q", ""); + strictEqual(URI.resolve(base, "."), "uri://a/b/c/", "."); + strictEqual(URI.resolve(base, "./"), "uri://a/b/c/", "./"); + strictEqual(URI.resolve(base, ".."), "uri://a/b/", ".."); + strictEqual(URI.resolve(base, "../"), "uri://a/b/", "../"); + strictEqual(URI.resolve(base, "../g"), "uri://a/b/g", "../g"); + strictEqual(URI.resolve(base, "../.."), "uri://a/", "../.."); + strictEqual(URI.resolve(base, "../../"), "uri://a/", "../../"); + strictEqual(URI.resolve(base, "../../g"), "uri://a/g", "../../g"); + + //abnormal examples from RFC 3986 + strictEqual(URI.resolve(base, "../../../g"), "uri://a/g", "../../../g"); + strictEqual(URI.resolve(base, "../../../../g"), "uri://a/g", "../../../../g"); + + strictEqual(URI.resolve(base, "/./g"), "uri://a/g", "/./g"); + strictEqual(URI.resolve(base, "/../g"), "uri://a/g", "/../g"); + strictEqual(URI.resolve(base, "g."), "uri://a/b/c/g.", "g."); + strictEqual(URI.resolve(base, ".g"), "uri://a/b/c/.g", ".g"); + strictEqual(URI.resolve(base, "g.."), "uri://a/b/c/g..", "g.."); + strictEqual(URI.resolve(base, "..g"), "uri://a/b/c/..g", "..g"); + + strictEqual(URI.resolve(base, "./../g"), "uri://a/b/g", "./../g"); + strictEqual(URI.resolve(base, "./g/."), "uri://a/b/c/g/", "./g/."); + strictEqual(URI.resolve(base, "g/./h"), "uri://a/b/c/g/h", "g/./h"); + strictEqual(URI.resolve(base, "g/../h"), "uri://a/b/c/h", "g/../h"); + strictEqual(URI.resolve(base, "g;x=1/./y"), "uri://a/b/c/g;x=1/y", "g;x=1/./y"); + strictEqual(URI.resolve(base, "g;x=1/../y"), "uri://a/b/c/y", "g;x=1/../y"); + + strictEqual(URI.resolve(base, "g?y/./x"), "uri://a/b/c/g?y/./x", "g?y/./x"); + strictEqual(URI.resolve(base, "g?y/../x"), "uri://a/b/c/g?y/../x", "g?y/../x"); + strictEqual(URI.resolve(base, "g#s/./x"), "uri://a/b/c/g#s/./x", "g#s/./x"); + strictEqual(URI.resolve(base, "g#s/../x"), "uri://a/b/c/g#s/../x", "g#s/../x"); + + strictEqual(URI.resolve(base, "uri:g"), "uri:g", "uri:g"); + strictEqual(URI.resolve(base, "uri:g", {tolerant:true}), "uri://a/b/c/g", "uri:g"); + + //examples by PAEz + strictEqual(URI.resolve("//www.g.com/","/adf\ngf"), "//www.g.com/adf%0Agf", "/adf\\ngf"); + strictEqual(URI.resolve("//www.g.com/error\n/bleh/bleh",".."), "//www.g.com/error%0A/", "//www.g.com/error\\n/bleh/bleh"); +}); + +test("URI Normalizing", function () { + //test from RFC 3987 + strictEqual(URI.normalize("uri://www.example.org/red%09ros\xE9#red"), "uri://www.example.org/red%09ros%C3%A9#red"); + + //IPv4address + strictEqual(URI.normalize("//192.068.001.000"), "//192.68.1.0"); + + //IPv6address, example from RFC 3513 + strictEqual(URI.normalize("http://[1080::8:800:200C:417A]/"), "http://[1080::8:800:200c:417a]/"); + + //IPv6address, examples from RFC 5952 + strictEqual(URI.normalize("//[2001:0db8::0001]/"), "//[2001:db8::1]/"); + strictEqual(URI.normalize("//[2001:db8::1:0000:1]/"), "//[2001:db8::1:0:1]/"); + strictEqual(URI.normalize("//[2001:db8:0:0:0:0:2:1]/"), "//[2001:db8::2:1]/"); + strictEqual(URI.normalize("//[2001:db8:0:1:1:1:1:1]/"), "//[2001:db8:0:1:1:1:1:1]/"); + strictEqual(URI.normalize("//[2001:0:0:1:0:0:0:1]/"), "//[2001:0:0:1::1]/"); + strictEqual(URI.normalize("//[2001:db8:0:0:1:0:0:1]/"), "//[2001:db8::1:0:0:1]/"); + strictEqual(URI.normalize("//[2001:DB8::1]/"), "//[2001:db8::1]/"); + strictEqual(URI.normalize("//[0:0:0:0:0:ffff:192.0.2.1]/"), "//[::ffff:192.0.2.1]/"); + + //Mixed IPv4 and IPv6 address + strictEqual(URI.normalize("//[1:2:3:4:5:6:192.0.2.1]/"), "//[1:2:3:4:5:6:192.0.2.1]/"); + strictEqual(URI.normalize("//[1:2:3:4:5:6:192.068.001.000]/"), "//[1:2:3:4:5:6:192.68.1.0]/"); +}); + +test("URI Equals", function () { + //test from RFC 3986 + strictEqual(URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d"), true); + + //test from RFC 3987 + strictEqual(URI.equal("http://example.org/~user", "http://example.org/%7euser"), true); +}); + +test("Escape Component", function () { + var chr; + for (var d = 0; d <= 129; ++d) { + chr = String.fromCharCode(d); + if (!chr.match(/[\$\&\+\,\;\=]/)) { + strictEqual(URI.escapeComponent(chr), encodeURIComponent(chr)); + } else { + strictEqual(URI.escapeComponent(chr), chr); + } + } + strictEqual(URI.escapeComponent("\u00c0"), encodeURIComponent("\u00c0")); + strictEqual(URI.escapeComponent("\u07ff"), encodeURIComponent("\u07ff")); + strictEqual(URI.escapeComponent("\u0800"), encodeURIComponent("\u0800")); + strictEqual(URI.escapeComponent("\u30a2"), encodeURIComponent("\u30a2")); +}); + +test("Unescape Component", function () { + var chr; + for (var d = 0; d <= 129; ++d) { + chr = String.fromCharCode(d); + strictEqual(URI.unescapeComponent(encodeURIComponent(chr)), chr); + } + strictEqual(URI.unescapeComponent(encodeURIComponent("\u00c0")), "\u00c0"); + strictEqual(URI.unescapeComponent(encodeURIComponent("\u07ff")), "\u07ff"); + strictEqual(URI.unescapeComponent(encodeURIComponent("\u0800")), "\u0800"); + strictEqual(URI.unescapeComponent(encodeURIComponent("\u30a2")), "\u30a2"); +}); + +// +// IRI +// + + + +var IRI_OPTION = { iri : true, unicodeSupport : true }; + +test("IRI Parsing", function () { + var components = URI.parse("uri://us\xA0er:pa\uD7FFss@example.com:123/o\uF900ne/t\uFDCFwo.t\uFDF0hree?q1=a1\uF8FF\uE000&q2=a2#bo\uFFEFdy", IRI_OPTION); + strictEqual(components.error, undefined, "all errors"); + strictEqual(components.scheme, "uri", "scheme"); + //strictEqual(components.authority, "us\xA0er:pa\uD7FFss@example.com:123", "authority"); + strictEqual(components.userinfo, "us\xA0er:pa\uD7FFss", "userinfo"); + strictEqual(components.host, "example.com", "host"); + strictEqual(components.port, 123, "port"); + strictEqual(components.path, "/o\uF900ne/t\uFDCFwo.t\uFDF0hree", "path"); + strictEqual(components.query, "q1=a1\uF8FF\uE000&q2=a2", "query"); + strictEqual(components.fragment, "bo\uFFEFdy", "fragment"); +}); + +test("IRI Serialization", function () { + var components = { + scheme : "uri", + userinfo : "us\xA0er:pa\uD7FFss", + host : "example.com", + port : 123, + path : "/o\uF900ne/t\uFDCFwo.t\uFDF0hree", + query : "q1=a1\uF8FF\uE000&q2=a2", + fragment : "bo\uFFEFdy\uE001" + }; + strictEqual(URI.serialize(components, IRI_OPTION), "uri://us\xA0er:pa\uD7FFss@example.com:123/o\uF900ne/t\uFDCFwo.t\uFDF0hree?q1=a1\uF8FF\uE000&q2=a2#bo\uFFEFdy%EE%80%81"); +}); + +test("IRI Normalizing", function () { + strictEqual(URI.normalize("uri://www.example.org/red%09ros\xE9#red", IRI_OPTION), "uri://www.example.org/red%09ros\xE9#red"); +}); + +test("IRI Equals", function () { + //example from RFC 3987 + strictEqual(URI.equal("example://a/b/c/%7Bfoo%7D/ros\xE9", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d/ros%C3%A9", IRI_OPTION), true); +}); + +test("Convert IRI to URI", function () { + //example from RFC 3987 + strictEqual(URI.serialize(URI.parse("uri://www.example.org/red%09ros\xE9#red", IRI_OPTION)), "uri://www.example.org/red%09ros%C3%A9#red"); + + //Internationalized Domain Name conversion via punycode example from RFC 3987 + strictEqual(URI.serialize(URI.parse("uri://r\xE9sum\xE9.example.org", {iri:true, domainHost:true}), {domainHost:true}), "uri://xn--rsum-bpad.example.org"); +}); + +test("Convert URI to IRI", function () { + //examples from RFC 3987 + strictEqual(URI.serialize(URI.parse("uri://www.example.org/D%C3%BCrst"), IRI_OPTION), "uri://www.example.org/D\xFCrst"); + strictEqual(URI.serialize(URI.parse("uri://www.example.org/D%FCrst"), IRI_OPTION), "uri://www.example.org/D%FCrst"); + strictEqual(URI.serialize(URI.parse("uri://xn--99zt52a.example.org/%e2%80%ae"), IRI_OPTION), "uri://xn--99zt52a.example.org/%E2%80%AE"); //or uri://\u7D0D\u8C46.example.org/%E2%80%AE + + //Internationalized Domain Name conversion via punycode example from RFC 3987 + strictEqual(URI.serialize(URI.parse("uri://xn--rsum-bpad.example.org", {domainHost:true}), {iri:true, domainHost:true}), "uri://r\xE9sum\xE9.example.org"); +}); + +// +// HTTP +// + +if (URI.SCHEMES["http"]) { + + //module("HTTP"); + + test("HTTP Equals", function () { + //test from RFC 2616 + strictEqual(URI.equal("http://abc.com:80/~smith/home.html", "http://abc.com/~smith/home.html"), true); + strictEqual(URI.equal("http://ABC.com/%7Esmith/home.html", "http://abc.com/~smith/home.html"), true); + strictEqual(URI.equal("http://ABC.com:/%7esmith/home.html", "http://abc.com/~smith/home.html"), true); + strictEqual(URI.equal("HTTP://ABC.COM", "http://abc.com/"), true); + //test from RFC 3986 + strictEqual(URI.equal("http://example.com:/", "http://example.com:80/"), true); + }); + +} + +if (URI.SCHEMES["https"]) { + + //module("HTTPS"); + + test("HTTPS Equals", function () { + strictEqual(URI.equal("https://example.com", "https://example.com:443/"), true); + strictEqual(URI.equal("https://example.com:/", "https://example.com:443/"), true); + }); + +} + +// +// URN +// + +if (URI.SCHEMES["urn"]) { + + //module("URN"); + + test("URN Parsing", function () { + //example from RFC 2141 + var components = URI.parse("urn:foo:a123,456"); + strictEqual(components.error, undefined, "errors"); + strictEqual(components.scheme, "urn", "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, undefined, "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + strictEqual(components.nid, "foo", "nid"); + strictEqual(components.nss, "a123,456", "nss"); + }); + + test("URN Serialization", function () { + //example from RFC 2141 + var components = { + scheme : "urn", + nid : "foo", + nss : "a123,456" + }; + strictEqual(URI.serialize(components), "urn:foo:a123,456"); + }); + + test("URN Equals", function () { + //test from RFC 2141 + strictEqual(URI.equal("urn:foo:a123,456", "urn:foo:a123,456"), true); + strictEqual(URI.equal("urn:foo:a123,456", "URN:foo:a123,456"), true); + strictEqual(URI.equal("urn:foo:a123,456", "urn:FOO:a123,456"), true); + strictEqual(URI.equal("urn:foo:a123,456", "urn:foo:A123,456"), false); + strictEqual(URI.equal("urn:foo:a123%2C456", "URN:FOO:a123%2c456"), true); + }); + + test("URN Resolving", function () { + //example from epoberezkin + strictEqual(URI.resolve('', 'urn:some:ip:prop'), 'urn:some:ip:prop'); + strictEqual(URI.resolve('#', 'urn:some:ip:prop'), 'urn:some:ip:prop'); + strictEqual(URI.resolve('urn:some:ip:prop', 'urn:some:ip:prop'), 'urn:some:ip:prop'); + strictEqual(URI.resolve('urn:some:other:prop', 'urn:some:ip:prop'), 'urn:some:ip:prop'); + }); + + // + // URN UUID + // + + test("UUID Parsing", function () { + //example from RFC 4122 + var components = URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); + strictEqual(components.error, undefined, "errors"); + strictEqual(components.scheme, "urn", "scheme"); + //strictEqual(components.authority, undefined, "authority"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, undefined, "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + strictEqual(components.nid, "uuid", "nid"); + strictEqual(components.nss, undefined, "nss"); + strictEqual(components.uuid, "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", "uuid"); + + components = URI.parse("urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6"); + notStrictEqual(components.error, undefined, "errors"); + }); + + test("UUID Serialization", function () { + //example from RFC 4122 + var components = { + scheme : "urn", + nid : "uuid", + uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" + }; + strictEqual(URI.serialize(components), "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); + + components = { + scheme : "urn", + nid : "uuid", + uuid : "notauuid-7dec-11d0-a765-00a0c91e6bf6" + }; + strictEqual(URI.serialize(components), "urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6"); + }); + + test("UUID Equals", function () { + strictEqual(URI.equal("URN:UUID:F81D4FAE-7DEC-11D0-A765-00A0C91E6BF6", "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"), true); + }); + + test("URN NID Override", function () { + var components = URI.parse("urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6", {nid:"uuid"}); + strictEqual(components.error, undefined, "errors"); + strictEqual(components.scheme, "urn", "scheme"); + strictEqual(components.path, undefined, "path"); + strictEqual(components.nid, "foo", "nid"); + strictEqual(components.nss, undefined, "nss"); + strictEqual(components.uuid, "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", "uuid"); + + var components = { + scheme : "urn", + nid : "foo", + uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" + }; + strictEqual(URI.serialize(components, {nid:"uuid"}), "urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); + }); +} + +// +// Mailto +// + +if (URI.SCHEMES["mailto"]) { + + //module("Mailto"); + + test("Mailto Parse", function () { + var components; + + //tests from RFC 6068 + + components = URI.parse("mailto:chris@example.com"); + strictEqual(components.error, undefined, "error"); + strictEqual(components.scheme, "mailto", "scheme"); + strictEqual(components.userinfo, undefined, "userinfo"); + strictEqual(components.host, undefined, "host"); + strictEqual(components.port, undefined, "port"); + strictEqual(components.path, undefined, "path"); + strictEqual(components.query, undefined, "query"); + strictEqual(components.fragment, undefined, "fragment"); + deepEqual(components.to, ["chris@example.com"], "to"); + strictEqual(components.subject, undefined, "subject"); + strictEqual(components.body, undefined, "body"); + strictEqual(components.headers, undefined, "headers"); + + components = URI.parse("mailto:infobot@example.com?subject=current-issue"); + deepEqual(components.to, ["infobot@example.com"], "to"); + strictEqual(components.subject, "current-issue", "subject"); + + components = URI.parse("mailto:infobot@example.com?body=send%20current-issue"); + deepEqual(components.to, ["infobot@example.com"], "to"); + strictEqual(components.body, "send current-issue", "body"); + + components = URI.parse("mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index"); + deepEqual(components.to, ["infobot@example.com"], "to"); + strictEqual(components.body, "send current-issue\x0D\x0Asend index", "body"); + + components = URI.parse("mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E"); + deepEqual(components.to, ["list@example.org"], "to"); + deepEqual(components.headers, {"In-Reply-To":"<3469A91.D10AF4C@example.com>"}, "headers"); + + components = URI.parse("mailto:majordomo@example.com?body=subscribe%20bamboo-l"); + deepEqual(components.to, ["majordomo@example.com"], "to"); + strictEqual(components.body, "subscribe bamboo-l", "body"); + + components = URI.parse("mailto:joe@example.com?cc=bob@example.com&body=hello"); + deepEqual(components.to, ["joe@example.com"], "to"); + strictEqual(components.body, "hello", "body"); + deepEqual(components.headers, {"cc":"bob@example.com"}, "headers"); + + components = URI.parse("mailto:joe@example.com?cc=bob@example.com?body=hello"); + if (URI.VALIDATE_SUPPORT) ok(components.error, "invalid header fields"); + + components = URI.parse("mailto:gorby%25kremvax@example.com"); + deepEqual(components.to, ["gorby%kremvax@example.com"], "to gorby%kremvax@example.com"); + + components = URI.parse("mailto:unlikely%3Faddress@example.com?blat=foop"); + deepEqual(components.to, ["unlikely?address@example.com"], "to unlikely?address@example.com"); + deepEqual(components.headers, {"blat":"foop"}, "headers"); + + components = URI.parse("mailto:Mike%26family@example.org"); + deepEqual(components.to, ["Mike&family@example.org"], "to Mike&family@example.org"); + + components = URI.parse("mailto:%22not%40me%22@example.org"); + deepEqual(components.to, ['"not@me"@example.org'], "to " + '"not@me"@example.org'); + + components = URI.parse("mailto:%22oh%5C%5Cno%22@example.org"); + deepEqual(components.to, ['"oh\\\\no"@example.org'], "to " + '"oh\\\\no"@example.org'); + + components = URI.parse("mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org"); + deepEqual(components.to, ['"\\\\\\"it\'s\\ ugly\\\\\\""@example.org'], "to " + '"\\\\\\"it\'s\\ ugly\\\\\\""@example.org'); + + components = URI.parse("mailto:user@example.org?subject=caf%C3%A9"); + deepEqual(components.to, ["user@example.org"], "to"); + strictEqual(components.subject, "caf\xE9", "subject"); + + components = URI.parse("mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D"); + deepEqual(components.to, ["user@example.org"], "to"); + strictEqual(components.subject, "=?utf-8?Q?caf=C3=A9?=", "subject"); //TODO: Verify this + + components = URI.parse("mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D"); + deepEqual(components.to, ["user@example.org"], "to"); + strictEqual(components.subject, "=?iso-8859-1?Q?caf=E9?=", "subject"); //TODO: Verify this + + components = URI.parse("mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9"); + deepEqual(components.to, ["user@example.org"], "to"); + strictEqual(components.subject, "caf\xE9", "subject"); + strictEqual(components.body, "caf\xE9", "body"); + + if (URI.IRI_SUPPORT) { + components = URI.parse("mailto:user@%E7%B4%8D%E8%B1%86.example.org?subject=Test&body=NATTO"); + deepEqual(components.to, ["user@xn--99zt52a.example.org"], "to"); + strictEqual(components.subject, "Test", "subject"); + strictEqual(components.body, "NATTO", "body"); + } + + }); + + test("Mailto Serialize", function () { + var components; + + //tests from RFC 6068 + strictEqual(URI.serialize({scheme : "mailto", to : ["chris@example.com"]}), "mailto:chris@example.com"); + strictEqual(URI.serialize({scheme : "mailto", to : ["infobot@example.com"], body : "current-issue"}), "mailto:infobot@example.com?body=current-issue"); + strictEqual(URI.serialize({scheme : "mailto", to : ["infobot@example.com"], body : "send current-issue"}), "mailto:infobot@example.com?body=send%20current-issue"); + strictEqual(URI.serialize({scheme : "mailto", to : ["infobot@example.com"], body : "send current-issue\x0D\x0Asend index"}), "mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index"); + strictEqual(URI.serialize({scheme : "mailto", to : ["list@example.org"], headers : {"In-Reply-To" : "<3469A91.D10AF4C@example.com>"}}), "mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E"); + strictEqual(URI.serialize({scheme : "mailto", to : ["majordomo@example.com"], body : "subscribe bamboo-l"}), "mailto:majordomo@example.com?body=subscribe%20bamboo-l"); + strictEqual(URI.serialize({scheme : "mailto", to : ["joe@example.com"], headers : {"cc" : "bob@example.com", "body" : "hello"}}), "mailto:joe@example.com?cc=bob@example.com&body=hello"); + strictEqual(URI.serialize({scheme : "mailto", to : ["gorby%25kremvax@example.com"]}), "mailto:gorby%25kremvax@example.com"); + strictEqual(URI.serialize({scheme : "mailto", to : ["unlikely%3Faddress@example.com"], headers : {"blat" : "foop"}}), "mailto:unlikely%3Faddress@example.com?blat=foop"); + strictEqual(URI.serialize({scheme : "mailto", to : ["Mike&family@example.org"]}), "mailto:Mike%26family@example.org"); + strictEqual(URI.serialize({scheme : "mailto", to : ['"not@me"@example.org']}), "mailto:%22not%40me%22@example.org"); + strictEqual(URI.serialize({scheme : "mailto", to : ['"oh\\\\no"@example.org']}), "mailto:%22oh%5C%5Cno%22@example.org"); + strictEqual(URI.serialize({scheme : "mailto", to : ['"\\\\\\"it\'s\\ ugly\\\\\\""@example.org']}), "mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org"); + strictEqual(URI.serialize({scheme : "mailto", to : ["user@example.org"], subject : "caf\xE9"}), "mailto:user@example.org?subject=caf%C3%A9"); + strictEqual(URI.serialize({scheme : "mailto", to : ["user@example.org"], subject : "=?utf-8?Q?caf=C3=A9?="}), "mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D"); + strictEqual(URI.serialize({scheme : "mailto", to : ["user@example.org"], subject : "=?iso-8859-1?Q?caf=E9?="}), "mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D"); + strictEqual(URI.serialize({scheme : "mailto", to : ["user@example.org"], subject : "caf\xE9", body : "caf\xE9"}), "mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9"); + if (URI.IRI_SUPPORT) { + strictEqual(URI.serialize({scheme : "mailto", to : ["us\xE9r@\u7d0d\u8c46.example.org"], subject : "Test", body : "NATTO"}), "mailto:us%C3%A9r@xn--99zt52a.example.org?subject=Test&body=NATTO"); + } + + }); + + test("Mailto Equals", function () { + //tests from RFC 6068 + strictEqual(URI.equal("mailto:addr1@an.example,addr2@an.example", "mailto:?to=addr1@an.example,addr2@an.example"), true); + strictEqual(URI.equal("mailto:?to=addr1@an.example,addr2@an.example", "mailto:addr1@an.example?to=addr2@an.example"), true); + }); + +} diff --git a/public/node_modules/_uri-js@4.2.2@uri-js/tsconfig.json b/public/node_modules/_uri-js@4.2.2@uri-js/tsconfig.json new file mode 100644 index 000000000..e2899857b --- /dev/null +++ b/public/node_modules/_uri-js@4.2.2@uri-js/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "es2015", + "target": "esnext", + "noImplicitAny": true, + "sourceMap": true, + "alwaysStrict": true, + "declaration": true, + "experimentalDecorators": true, + "forceConsistentCasingInFileNames": true, + "importHelpers": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "outDir": "dist/esnext", + "strictNullChecks": true + }, + "include": [ + "src/**/*" + ] +} diff --git a/public/node_modules/_util-deprecate@1.0.2@util-deprecate/History.md b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/History.md new file mode 100644 index 000000000..acc867537 --- /dev/null +++ b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/public/node_modules/_util-deprecate@1.0.2@util-deprecate/LICENSE b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/LICENSE new file mode 100644 index 000000000..6a60e8c22 --- /dev/null +++ b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +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/public/node_modules/_util-deprecate@1.0.2@util-deprecate/README.md b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/README.md new file mode 100644 index 000000000..75622fa7c --- /dev/null +++ b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +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/public/node_modules/_util-deprecate@1.0.2@util-deprecate/browser.js b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/browser.js new file mode 100644 index 000000000..549ae2f06 --- /dev/null +++ b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/public/node_modules/_util-deprecate@1.0.2@util-deprecate/node.js b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/node.js new file mode 100644 index 000000000..5e6fcff5d --- /dev/null +++ b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/public/node_modules/_util-deprecate@1.0.2@util-deprecate/package.json b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/package.json new file mode 100644 index 000000000..1e0c58d6e --- /dev/null +++ b/public/node_modules/_util-deprecate@1.0.2@util-deprecate/package.json @@ -0,0 +1,30 @@ +{ + "name": "util-deprecate", + "version": "1.0.2", + "description": "The Node.js `util.deprecate()` function with browser support", + "main": "node.js", + "browser": "browser.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "homepage": "https://github.com/TooTallNate/util-deprecate", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "util-deprecate@1.0.2", + "_resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/LICENSE b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/LICENSE new file mode 100644 index 000000000..7c6f8955d --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/README.md b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/README.md new file mode 100644 index 000000000..eabdb37dd --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/README.md @@ -0,0 +1,230 @@ +# webpack-sources + +Contains multiple classes which represent a `Source`. A `Source` can be asked for source code, size, source map and hash. + +## `Source` + +Base class for all sources. + +### Public methods + +All methods should be considered as expensive as they may need to do computations. + +#### `source` + +``` js +Source.prototype.source() -> String | ArrayBuffer +``` + +Returns the represented source code as string. + +#### `size` + +``` js +Source.prototype.size() -> Number +``` + +Returns the size in chars of the represented source code. + +#### `map` + +``` js +Source.prototype.map(options: Object) -> Object | null +``` + +Returns the SourceMap of the represented source code as JSON. May return `null` if no SourceMap is available. + +The `options` object can contain the following keys: + +* `columns: Boolean` (default `true`): If set to false the implementation may omit mappings for columns. +* `module: Boolean` (default `true`): If set to false the implementation may omit inner mappings for modules. + +#### `sourceAndMap` + +``` js +Source.prototype.sourceAndMap(options: Object) -> { + source: String, + map: Object +} +``` + +Returns both, source code (like `Source.prototype.source()` and SourceMap (like `Source.prototype.map()`). This method could have better performance than calling `source()` and `map()` separately. + +See `map()` for `options`. + +#### `updateHash` + +``` js +Source.prototype.updateHash(hash: Hash) -> void +``` + +Updates the provided `Hash` object with the content of the represented source code. (`Hash` is an object with an `update` method, which is called with string values) + +#### `node` (optional) + +``` js +Source.prototype.node(options: Object) -> SourceNode +``` + +This is an optional method. It may be `null` if not implemented. + +Returns a `SourceNode` (see source-map library) for the represented source code. + +See `map()` for `options`. + +#### `listNode` (optional) + +``` js +Source.prototype.listNode(options: Object) -> SourceNode +``` + +This is an optional method. It may be `null` if not implemented. + +Returns a `SourceListMap` (see source-list-map library) for the represented source code. + +See `map()` for `options`. + +## `RawSource` + +Represents source code without SourceMap. + +``` js +new RawSource(sourceCode: String) +``` + +## `OriginalSource` + +Represents source code, which is a copy of the original file. + +``` js +new OriginalSource( + sourceCode: String, + name: String +) +``` + +* `sourceCode`: The source code. +* `name`: The filename of the original source code. + +OriginalSource tries to create column mappings if requested, by splitting the source code at typical statement borders (`;`, `{`, `}`). + +## `SourceMapSource` + +Represents source code with SourceMap, optionally having an additional SourceMap for the original source. + +``` js +new SourceMapSource( + sourceCode: String, + name: String, + sourceMap: Object | String, + originalSource?: String, + innerSourceMap?: Object | String, + removeOriginalSource?: boolean +) +``` + +* `sourceCode`: The source code. +* `name`: The filename of the original source code. +* `sourceMap`: The SourceMap for the source code. +* `originalSource`: The source code of the original file. Can be omitted if the `sourceMap` already contains the original source code. +* `innerSourceMap`: The SourceMap for the `originalSource`/`name`. +* `removeOriginalSource`: Removes the source code for `name` from the final map, keeping only the deeper mappings for that file. + +The `SourceMapSource` supports "identity" mappings for the `innerSourceMap`. +When original source matches generated source for a mapping it's assumed to be mapped char by char allowing to keep finer mappings from `sourceMap`. + +## `LineToLineMappedSource` + +Represents source code, which is mapped line by line to the original file. + +``` js +new LineToLineMappedSource( + sourceCode: String, + name: String, + originalSource: String +) +``` + +* `sourceCode`: The source code. +* `name`: The filename of the original source code. +* `originalSource`: The original source code. + +## `CachedSource` + +Decorates a `Source` and caches returned results of `map`, `source`, `size` and `sourceAndMap` in memory. Every other operation is delegated to the wrapped `Source`. + +``` js +new CachedSource(source: Source) +``` + +## `PrefixSource` + +Prefix every line of the decorated `Source` with a provided string. + +``` js +new PrefixSource( + prefix: String, + source: Source +) +``` + +## `ConcatSource` + +Concatenate multiple `Source`s or strings to a single source. + +``` js +new ConcatSource( + ...items?: Source | String +) +``` + +### Public methods + +#### `add` + +``` js +ConcatSource.prototype.add(item: Source | String) +``` + +Adds an item to the source. + +## `ReplaceSource` + +Decorates a `Source` with replacements and insertions of source code. + +The `ReplaceSource` supports "identity" mappings for child source. +When original source matches generated source for a mapping it's assumed to be mapped char by char allowing to split mappings at replacements/insertions. + +### Public methods + +#### `replace` + +``` js +ReplaceSource.prototype.replace( + start: Number, + end: Number, + replacement: String +) +``` + +Replaces chars from `start` (0-indexed, inclusive) to `end` (0-indexed, inclusive) with `replacement`. + +Locations represents locations in the original source and are not influenced by other replacements or insertions. + +#### `insert` + +``` js +ReplaceSource.prototype.insert( + pos: Number, + insertion: String +) +``` + +Inserts the `insertion` before char `pos` (0-indexed). + +Location represents location in the original source and is not influenced by other replacements or insertions. + +#### `original` + +Get decorated `Source`. + diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/CachedSource.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/CachedSource.js new file mode 100644 index 000000000..08ca51048 --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/CachedSource.js @@ -0,0 +1,80 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Source = require("./Source"); + +class CachedSource extends Source { + constructor(source) { + super(); + this._source = source; + this._cachedSource = undefined; + this._cachedSize = undefined; + this._cachedMaps = {}; + + if(source.node) this.node = function(options) { + return this._source.node(options); + }; + + if(source.listMap) this.listMap = function(options) { + return this._source.listMap(options); + }; + } + + source() { + if(typeof this._cachedSource !== "undefined") return this._cachedSource; + return this._cachedSource = this._source.source(); + } + + size() { + if(typeof this._cachedSize !== "undefined") return this._cachedSize; + if(typeof this._cachedSource !== "undefined") { + if(Buffer.from.length === 1) return new Buffer(this._cachedSource).length; + return this._cachedSize = Buffer.byteLength(this._cachedSource); + } + return this._cachedSize = this._source.size(); + } + + sourceAndMap(options) { + const key = JSON.stringify(options); + if(typeof this._cachedSource !== "undefined" && key in this._cachedMaps) + return { + source: this._cachedSource, + map: this._cachedMaps[key] + }; + else if(typeof this._cachedSource !== "undefined") { + return { + source: this._cachedSource, + map: this._cachedMaps[key] = this._source.map(options) + }; + } else if(key in this._cachedMaps) { + return { + source: this._cachedSource = this._source.source(), + map: this._cachedMaps[key] + }; + } + const result = this._source.sourceAndMap(options); + this._cachedSource = result.source; + this._cachedMaps[key] = result.map; + return { + source: this._cachedSource, + map: this._cachedMaps[key] + }; + } + + map(options) { + if(!options) options = {}; + const key = JSON.stringify(options); + if(key in this._cachedMaps) + return this._cachedMaps[key]; + return this._cachedMaps[key] = this._source.map(); + } + + updateHash(hash) { + this._source.updateHash(hash); + } +} + +module.exports = CachedSource; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/ConcatSource.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/ConcatSource.js new file mode 100644 index 000000000..25167d6e4 --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/ConcatSource.js @@ -0,0 +1,91 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const SourceNode = require("source-map").SourceNode; +const SourceListMap = require("source-list-map").SourceListMap; +const Source = require("./Source"); + +class ConcatSource extends Source { + constructor() { + super(); + this.children = []; + for(var i = 0; i < arguments.length; i++) { + var item = arguments[i]; + if(item instanceof ConcatSource) { + var children = item.children; + for(var j = 0; j < children.length; j++) + this.children.push(children[j]); + } else { + this.children.push(item); + } + } + } + + add(item) { + if(item instanceof ConcatSource) { + var children = item.children; + for(var j = 0; j < children.length; j++) + this.children.push(children[j]); + } else { + this.children.push(item); + } + } + + source() { + let source = ""; + const children = this.children; + for(let i = 0; i < children.length; i++) { + const child = children[i]; + source += typeof child === "string" ? child : child.source(); + } + return source; + } + + size() { + let size = 0; + const children = this.children; + for(let i = 0; i < children.length; i++) { + const child = children[i]; + size += typeof child === "string" ? child.length : child.size(); + } + return size; + } + + node(options) { + const node = new SourceNode(null, null, null, this.children.map(function(item) { + return typeof item === "string" ? item : item.node(options); + })); + return node; + } + + listMap(options) { + const map = new SourceListMap(); + var children = this.children; + for(var i = 0; i < children.length; i++) { + var item = children[i]; + if(typeof item === "string") + map.add(item); + else + map.add(item.listMap(options)); + } + return map; + } + + updateHash(hash) { + var children = this.children; + for(var i = 0; i < children.length; i++) { + var item = children[i]; + if(typeof item === "string") + hash.update(item); + else + item.updateHash(hash); + } + } +} + +require("./SourceAndMapMixin")(ConcatSource.prototype); + +module.exports = ConcatSource; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/LineToLineMappedSource.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/LineToLineMappedSource.js new file mode 100644 index 000000000..a1a17bb4a --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/LineToLineMappedSource.js @@ -0,0 +1,49 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +var SourceNode = require("source-map").SourceNode; +var SourceMapConsumer = require("source-map").SourceMapConsumer; +var SourceListMap = require("source-list-map").SourceListMap; +var Source = require("./Source"); + +class LineToLineMappedSource extends Source { + constructor(value, name, originalSource) { + super(); + this._value = value; + this._name = name; + this._originalSource = originalSource; + } + + source() { + return this._value; + } + + node(options) { + var value = this._value; + var name = this._name; + var lines = value.split("\n"); + var node = new SourceNode(null, null, null, + lines.map(function(line, idx) { + return new SourceNode(idx + 1, 0, name, (line + (idx != lines.length - 1 ? "\n" : ""))); + }) + ); + node.setSourceContent(name, this._originalSource); + return node; + } + + listMap(options) { + return new SourceListMap(this._value, this._name, this._originalSource) + } + + updateHash(hash) { + hash.update(this._value); + hash.update(this._originalSource); + } +} + +require("./SourceAndMapMixin")(LineToLineMappedSource.prototype); + +module.exports = LineToLineMappedSource; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/OriginalSource.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/OriginalSource.js new file mode 100644 index 000000000..f3b522731 --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/OriginalSource.js @@ -0,0 +1,70 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +var SourceNode = require("source-map").SourceNode; +var SourceMapConsumer = require("source-map").SourceMapConsumer; +var SourceListMap = require("source-list-map").SourceListMap; +var Source = require("./Source"); + +var SPLIT_REGEX = /(?!$)[^\n\r;{}]*[\n\r;{}]*/g; + +function _splitCode(code) { + return code.match(SPLIT_REGEX) || []; +} + +class OriginalSource extends Source { + constructor(value, name) { + super(); + this._value = value; + this._name = name; + } + + source() { + return this._value; + } + + node(options) { + options = options || {}; + var sourceMap = this._sourceMap; + var value = this._value; + var name = this._name; + var lines = value.split("\n"); + var node = new SourceNode(null, null, null, + lines.map(function(line, idx) { + var pos = 0; + if(options.columns === false) { + var content = line + (idx != lines.length - 1 ? "\n" : ""); + return new SourceNode(idx + 1, 0, name, content); + } + return new SourceNode(null, null, null, + _splitCode(line + (idx != lines.length - 1 ? "\n" : "")).map(function(item) { + if(/^\s*$/.test(item)) { + pos += item.length; + return item; + } + var res = new SourceNode(idx + 1, pos, name, item); + pos += item.length; + return res; + }) + ); + }) + ); + node.setSourceContent(name, value); + return node; + } + + listMap(options) { + return new SourceListMap(this._value, this._name, this._value) + } + + updateHash(hash) { + hash.update(this._value); + } +} + +require("./SourceAndMapMixin")(OriginalSource.prototype); + +module.exports = OriginalSource; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/PrefixSource.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/PrefixSource.js new file mode 100644 index 000000000..50fabbe2d --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/PrefixSource.js @@ -0,0 +1,95 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +var Source = require("./Source"); +var SourceNode = require("source-map").SourceNode; + +var REPLACE_REGEX = /\n(?=.|\s)/g; + +function cloneAndPrefix(node, prefix, append) { + if(typeof node === "string") { + var result = node.replace(REPLACE_REGEX, "\n" + prefix); + if(append.length > 0) result = append.pop() + result; + if(/\n$/.test(node)) append.push(prefix); + return result; + } else { + var newNode = new SourceNode( + node.line, + node.column, + node.source, + node.children.map(function(node) { + return cloneAndPrefix(node, prefix, append); + }), + node.name + ); + newNode.sourceContents = node.sourceContents; + return newNode; + } +}; + +class PrefixSource extends Source { + constructor(prefix, source) { + super(); + this._source = source; + this._prefix = prefix; + } + + source() { + var node = typeof this._source === "string" ? this._source : this._source.source(); + var prefix = this._prefix; + return prefix + node.replace(REPLACE_REGEX, "\n" + prefix); + } + + node(options) { + var node = this._source.node(options); + var prefix = this._prefix; + var output = []; + var result = new SourceNode(); + node.walkSourceContents(function(source, content) { + result.setSourceContent(source, content); + }); + var needPrefix = true; + node.walk(function(chunk, mapping) { + var parts = chunk.split(/(\n)/); + for(var i = 0; i < parts.length; i += 2) { + var nl = i + 1 < parts.length; + var part = parts[i] + (nl ? "\n" : ""); + if(part) { + if(needPrefix) { + output.push(prefix); + } + output.push(new SourceNode(mapping.line, mapping.column, mapping.source, part, mapping.name)); + needPrefix = nl; + } + } + }); + result.add(output); + return result; + } + + listMap(options) { + var prefix = this._prefix; + var map = this._source.listMap(options); + return map.mapGeneratedCode(function(code) { + return prefix + code.replace(REPLACE_REGEX, "\n" + prefix); + }); + } + + updateHash(hash) { + if(typeof this._source === "string") + hash.update(this._source); + else + this._source.updateHash(hash); + if(typeof this._prefix === "string") + hash.update(this._prefix); + else + this._prefix.updateHash(hash); + } +} + +require("./SourceAndMapMixin")(PrefixSource.prototype); + +module.exports = PrefixSource; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/RawSource.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/RawSource.js new file mode 100644 index 000000000..c09b1cd9f --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/RawSource.js @@ -0,0 +1,38 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +var Source = require("./Source"); +var SourceNode = require("source-map").SourceNode; +var SourceListMap = require("source-list-map").SourceListMap; + +class RawSource extends Source { + constructor(value) { + super(); + this._value = value; + } + + source() { + return this._value; + } + + map(options) { + return null; + } + + node(options) { + return new SourceNode(null, null, null, this._value); + } + + listMap(options) { + return new SourceListMap(this._value); + } + + updateHash(hash) { + hash.update(this._value); + } +} + +module.exports = RawSource; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/ReplaceSource.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/ReplaceSource.js new file mode 100644 index 000000000..d7a7f2a40 --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/ReplaceSource.js @@ -0,0 +1,330 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +var Source = require("./Source"); +var SourceNode = require("source-map").SourceNode; + +class Replacement { + constructor(start, end, content, insertIndex, name) { + this.start = start; + this.end = end; + this.content = content; + this.insertIndex = insertIndex; + this.name = name; + } +} + +class ReplaceSource extends Source { + constructor(source, name) { + super(); + this._source = source; + this._name = name; + /** @type {Replacement[]} */ + this.replacements = []; + } + + replace(start, end, newValue, name) { + if(typeof newValue !== "string") + throw new Error("insertion must be a string, but is a " + typeof newValue); + this.replacements.push(new Replacement(start, end, newValue, this.replacements.length, name)); + } + + insert(pos, newValue, name) { + if(typeof newValue !== "string") + throw new Error("insertion must be a string, but is a " + typeof newValue + ": " + newValue); + this.replacements.push(new Replacement(pos, pos - 1, newValue, this.replacements.length, name)); + } + + source(options) { + return this._replaceString(this._source.source()); + } + + original() { + return this._source; + } + + _sortReplacements() { + this.replacements.sort(function(a, b) { + var diff = b.end - a.end; + if(diff !== 0) + return diff; + diff = b.start - a.start; + if(diff !== 0) + return diff; + return b.insertIndex - a.insertIndex; + }); + } + + _replaceString(str) { + if(typeof str !== "string") + throw new Error("str must be a string, but is a " + typeof str + ": " + str); + this._sortReplacements(); + var result = [str]; + this.replacements.forEach(function(repl) { + var remSource = result.pop(); + var splitted1 = this._splitString(remSource, Math.floor(repl.end + 1)); + var splitted2 = this._splitString(splitted1[0], Math.floor(repl.start)); + result.push(splitted1[1], repl.content, splitted2[0]); + }, this); + + // write out result array in reverse order + let resultStr = ""; + for(let i = result.length - 1; i >= 0; --i) { + resultStr += result[i]; + } + return resultStr; + } + + node(options) { + var node = this._source.node(options); + if(this.replacements.length === 0) { + return node; + } + this._sortReplacements(); + var replace = new ReplacementEnumerator(this.replacements); + var output = []; + var position = 0; + var sources = Object.create(null); + var sourcesInLines = Object.create(null); + + // We build a new list of SourceNodes in "output" + // from the original mapping data + + var result = new SourceNode(); + + // We need to add source contents manually + // because "walk" will not handle it + node.walkSourceContents(function(sourceFile, sourceContent) { + result.setSourceContent(sourceFile, sourceContent); + sources["$" + sourceFile] = sourceContent; + }); + + var replaceInStringNode = this._replaceInStringNode.bind(this, output, replace, function getOriginalSource(mapping) { + var key = "$" + mapping.source; + var lines = sourcesInLines[key]; + if(!lines) { + var source = sources[key]; + if(!source) return null; + lines = source.split("\n").map(function(line) { + return line + "\n"; + }); + sourcesInLines[key] = lines; + } + // line is 1-based + if(mapping.line > lines.length) return null; + var line = lines[mapping.line - 1]; + return line.substr(mapping.column); + }); + + node.walk(function(chunk, mapping) { + position = replaceInStringNode(chunk, position, mapping); + }); + + // If any replacements occur after the end of the original file, then we append them + // directly to the end of the output + var remaining = replace.footer(); + if(remaining) { + output.push(remaining); + } + + result.add(output); + + return result; + } + + listMap(options) { + this._sortReplacements(); + var map = this._source.listMap(options); + var currentIndex = 0; + var replacements = this.replacements; + var idxReplacement = replacements.length - 1; + var removeChars = 0; + map = map.mapGeneratedCode(function(str) { + var newCurrentIndex = currentIndex + str.length; + if(removeChars > str.length) { + removeChars -= str.length; + str = ""; + } else { + if(removeChars > 0) { + str = str.substr(removeChars); + currentIndex += removeChars; + removeChars = 0; + } + var finalStr = ""; + while(idxReplacement >= 0 && replacements[idxReplacement].start < newCurrentIndex) { + var repl = replacements[idxReplacement]; + var start = Math.floor(repl.start); + var end = Math.floor(repl.end + 1); + var before = str.substr(0, Math.max(0, start - currentIndex)); + if(end <= newCurrentIndex) { + var after = str.substr(Math.max(0, end - currentIndex)); + finalStr += before + repl.content; + str = after; + currentIndex = Math.max(currentIndex, end); + } else { + finalStr += before + repl.content; + str = ""; + removeChars = end - newCurrentIndex; + } + idxReplacement--; + } + str = finalStr + str; + } + currentIndex = newCurrentIndex; + return str; + }); + var extraCode = ""; + while(idxReplacement >= 0) { + extraCode += replacements[idxReplacement].content; + idxReplacement--; + } + if(extraCode) { + map.add(extraCode); + } + return map; + } + + _splitString(str, position) { + return position <= 0 ? ["", str] : [str.substr(0, position), str.substr(position)]; + } + + _replaceInStringNode(output, replace, getOriginalSource, node, position, mapping) { + var original = undefined; + + do { + var splitPosition = replace.position - position; + // If multiple replaces occur in the same location then the splitPosition may be + // before the current position for the subsequent splits. Ensure it is >= 0 + if(splitPosition < 0) { + splitPosition = 0; + } + if(splitPosition >= node.length || replace.done) { + if(replace.emit) { + var nodeEnd = new SourceNode( + mapping.line, + mapping.column, + mapping.source, + node, + mapping.name + ); + output.push(nodeEnd); + } + return position + node.length; + } + + var originalColumn = mapping.column; + + // Try to figure out if generated code matches original code of this segement + // If this is the case we assume that it's allowed to move mapping.column + // Because getOriginalSource can be expensive we only do it when neccessary + + var nodePart; + if(splitPosition > 0) { + nodePart = node.slice(0, splitPosition); + if(original === undefined) { + original = getOriginalSource(mapping); + } + if(original && original.length >= splitPosition && original.startsWith(nodePart)) { + mapping.column += splitPosition; + original = original.substr(splitPosition); + } + } + + var emit = replace.next(); + if(!emit) { + // Stop emitting when we have found the beginning of the string to replace. + // Emit the part of the string before splitPosition + if(splitPosition > 0) { + var nodeStart = new SourceNode( + mapping.line, + originalColumn, + mapping.source, + nodePart, + mapping.name + ); + output.push(nodeStart); + } + + // Emit the replacement value + if(replace.value) { + output.push(new SourceNode( + mapping.line, + mapping.column, + mapping.source, + replace.value, + mapping.name || replace.name + )); + } + } + + // Recurse with remainder of the string as there may be multiple replaces within a single node + node = node.substr(splitPosition); + position += splitPosition; + } while (true); + } +} + +class ReplacementEnumerator { + /** + * @param {Replacement[]} replacements list of replacements + */ + constructor(replacements) { + this.replacements = replacements || []; + this.index = this.replacements.length; + this.done = false; + this.emit = false; + // Set initial start position + this.next(); + } + + next() { + if(this.done) + return true; + if(this.emit) { + // Start point found. stop emitting. set position to find end + var repl = this.replacements[this.index]; + var end = Math.floor(repl.end + 1); + this.position = end; + this.value = repl.content; + this.name = repl.name; + } else { + // End point found. start emitting. set position to find next start + this.index--; + if(this.index < 0) { + this.done = true; + } else { + var nextRepl = this.replacements[this.index]; + var start = Math.floor(nextRepl.start); + this.position = start; + } + } + if(this.position < 0) + this.position = 0; + this.emit = !this.emit; + return this.emit; + } + + footer() { + if(!this.done && !this.emit) + this.next(); // If we finished _replaceInNode mid emit we advance to next entry + if(this.done) { + return []; + } else { + var resultStr = ""; + for(var i = this.index; i >= 0; i--) { + var repl = this.replacements[i]; + // this doesn't need to handle repl.name, because in SourceMaps generated code + // without pointer to original source can't have a name + resultStr += repl.content; + } + return resultStr; + } + } +} + +require("./SourceAndMapMixin")(ReplaceSource.prototype); + +module.exports = ReplaceSource; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/Source.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/Source.js new file mode 100644 index 000000000..f9b8f6b5a --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/Source.js @@ -0,0 +1,46 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +var SourceNode = require("source-map").SourceNode; +var SourceMapConsumer = require("source-map").SourceMapConsumer; + +class Source { + + source() { + throw new Error("Abstract"); + } + + size() { + if(Buffer.from.length === 1) return new Buffer(this.source()).length; + return Buffer.byteLength(this.source()) + } + + map(options) { + return null; + } + + sourceAndMap(options) { + return { + source: this.source(), + map: this.map() + }; + } + + node() { + throw new Error("Abstract"); + } + + listNode() { + throw new Error("Abstract"); + } + + updateHash(hash) { + var source = this.source(); + hash.update(source || ""); + } +} + +module.exports = Source; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/SourceAndMapMixin.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/SourceAndMapMixin.js new file mode 100644 index 000000000..cf1aa5854 --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/SourceAndMapMixin.js @@ -0,0 +1,37 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +module.exports = function mixinSourceAndMap(proto) { + proto.map = function(options) { + options = options || {}; + if(options.columns === false) { + return this.listMap(options).toStringWithSourceMap({ + file: "x" + }).map; + } + + return this.node(options).toStringWithSourceMap({ + file: "x" + }).map.toJSON(); + }; + + proto.sourceAndMap = function(options) { + options = options || {}; + if(options.columns === false) { + return this.listMap(options).toStringWithSourceMap({ + file: "x" + }); + } + + var res = this.node(options).toStringWithSourceMap({ + file: "x" + }); + return { + source: res.code, + map: res.map.toJSON() + }; + }; +} diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/SourceMapSource.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/SourceMapSource.js new file mode 100644 index 000000000..cabf7c8af --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/SourceMapSource.js @@ -0,0 +1,57 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +var SourceNode = require("source-map").SourceNode; +var SourceMapConsumer = require("source-map").SourceMapConsumer; +var SourceMapGenerator = require("source-map").SourceMapGenerator; +var SourceListMap = require("source-list-map").SourceListMap; +var fromStringWithSourceMap = require("source-list-map").fromStringWithSourceMap; +var Source = require("./Source"); +var applySourceMap = require("./applySourceMap"); + +class SourceMapSource extends Source { + constructor(value, name, sourceMap, originalSource, innerSourceMap, removeOriginalSource) { + super(); + this._value = value; + this._name = name; + this._sourceMap = sourceMap; + this._originalSource = originalSource; + this._innerSourceMap = innerSourceMap; + this._removeOriginalSource = removeOriginalSource; + } + + source() { + return this._value; + } + + node(options) { + var sourceMap = this._sourceMap; + var node = SourceNode.fromStringWithSourceMap(this._value, new SourceMapConsumer(sourceMap)); + node.setSourceContent(this._name, this._originalSource); + var innerSourceMap = this._innerSourceMap; + if(innerSourceMap) { + node = applySourceMap(node, new SourceMapConsumer(innerSourceMap), this._name, this._removeOriginalSource); + } + return node; + } + + listMap(options) { + options = options || {}; + if(options.module === false) + return new SourceListMap(this._value, this._name, this._value); + return fromStringWithSourceMap(this._value, typeof this._sourceMap === "string" ? JSON.parse(this._sourceMap) : this._sourceMap); + } + + updateHash(hash) { + hash.update(this._value); + if(this._originalSource) + hash.update(this._originalSource); + } +} + +require("./SourceAndMapMixin")(SourceMapSource.prototype); + +module.exports = SourceMapSource; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/applySourceMap.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/applySourceMap.js new file mode 100644 index 000000000..9696f4beb --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/applySourceMap.js @@ -0,0 +1,185 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +var SourceNode = require("source-map").SourceNode; +var SourceMapConsumer = require("source-map").SourceMapConsumer; + +var applySourceMap = function( + sourceNode, + sourceMapConsumer, + sourceFile, + removeGeneratedCodeForSourceFile +) { + // The following notations are used to name stuff: + // Left <------------> Middle <-------------------> Right + // Input arguments: + // sourceNode - Code mapping from Left to Middle + // sourceFile - Name of a Middle file + // sourceMapConsumer - Code mapping from Middle to Right + // Variables: + // l2m m2r + // Left <-----------------------------------------> Right + // Variables: + // l2r + + var l2rResult = new SourceNode(); + var l2rOutput = []; + + var middleSourceContents = {}; + + var m2rMappingsByLine = {}; + + var rightSourceContentsSet = {}; + var rightSourceContentsLines = {}; + + // Store all mappings by generated line + sourceMapConsumer.eachMapping( + function(mapping) { + (m2rMappingsByLine[mapping.generatedLine] = + m2rMappingsByLine[mapping.generatedLine] || []).push(mapping); + }, + null, + SourceMapConsumer.GENERATED_ORDER + ); + + // Store all source contents + sourceNode.walkSourceContents(function(source, content) { + middleSourceContents["$" + source] = content; + }); + + var middleSource = middleSourceContents["$" + sourceFile]; + var middleSourceLines = middleSource ? middleSource.split("\n") : undefined; + + // Walk all left to middle mappings + sourceNode.walk(function(chunk, middleMapping) { + var source; + + // Find a mapping from middle to right + if( + middleMapping.source === sourceFile && + middleMapping.line && + m2rMappingsByLine[middleMapping.line] + ) { + var m2rBestFit; + var m2rMappings = m2rMappingsByLine[middleMapping.line]; + // Note: if this becomes a performance problem, use binary search + for(var i = 0; i < m2rMappings.length; i++) { + if(m2rMappings[i].generatedColumn <= middleMapping.column) { + m2rBestFit = m2rMappings[i]; + } + } + if(m2rBestFit) { + var allowMiddleName = false; + var middleLine; + var rightSourceContent; + var rightSourceContentLines; + var rightSource = m2rBestFit.source; + // Check if we have middle and right source for this mapping + // Then we could have an "identify" mapping + if( + middleSourceLines && + rightSource && + (middleLine = middleSourceLines[m2rBestFit.generatedLine - 1]) && + ((rightSourceContentLines = rightSourceContentsLines[rightSource]) || + (rightSourceContent = sourceMapConsumer.sourceContentFor( + rightSource, + true + ))) + ) { + if(!rightSourceContentLines) { + rightSourceContentLines = rightSourceContentsLines[ + rightSource + ] = rightSourceContent.split("\n"); + } + var rightLine = rightSourceContentLines[m2rBestFit.originalLine - 1]; + if(rightLine) { + var offset = middleMapping.column - m2rBestFit.generatedColumn; + if(offset > 0) { + var middlePart = middleLine.slice( + m2rBestFit.generatedColumn, + middleMapping.column + ); + var rightPart = rightLine.slice( + m2rBestFit.originalColumn, + m2rBestFit.originalColumn + offset + ); + if(middlePart === rightPart) { + // When original and generated code is equal we assume we have an "identity" mapping + // In this case we can offset the original position + m2rBestFit = Object.assign({}, m2rBestFit, { + originalColumn: m2rBestFit.originalColumn + offset, + generatedColumn: middleMapping.column + }); + } + } + if(!m2rBestFit.name && middleMapping.name) { + allowMiddleName = + rightLine.slice( + m2rBestFit.originalColumn, + m2rBestFit.originalColumn + middleMapping.name.length + ) === middleMapping.name; + } + } + } + + // Construct a left to right node from the found middle to right mapping + source = m2rBestFit.source; + l2rOutput.push( + new SourceNode( + m2rBestFit.originalLine, + m2rBestFit.originalColumn, + source, + chunk, + allowMiddleName ? middleMapping.name : m2rBestFit.name + ) + ); + + // Set the source contents once + if(!("$" + source in rightSourceContentsSet)) { + rightSourceContentsSet["$" + source] = true; + var sourceContent = sourceMapConsumer.sourceContentFor(source, true); + if(sourceContent) { + l2rResult.setSourceContent(source, sourceContent); + } + } + return; + } + } + + if((removeGeneratedCodeForSourceFile && middleMapping.source === sourceFile) || !middleMapping.source) { + // Construct a left to middle node with only generated code + // Because user do not want mappings to middle sources + // Or this chunk has no mapping + l2rOutput.push(chunk); + return; + } + + // Construct a left to middle node + source = middleMapping.source; + l2rOutput.push( + new SourceNode( + middleMapping.line, + middleMapping.column, + source, + chunk, + middleMapping.name + ) + ); + if("$" + source in middleSourceContents) { + if(!("$" + source in rightSourceContentsSet)) { + l2rResult.setSourceContent(source, middleSourceContents["$" + source]); + delete middleSourceContents["$" + source]; + } + } + }); + + // Put output into the resulting SourceNode + l2rResult.add(l2rOutput); + return l2rResult; +}; + +module.exports = applySourceMap; diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/index.js b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/index.js new file mode 100644 index 000000000..f404c29d8 --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/lib/index.js @@ -0,0 +1,15 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +exports.Source = require("./Source"); + +exports.RawSource = require("./RawSource"); +exports.OriginalSource = require("./OriginalSource"); +exports.SourceMapSource = require("./SourceMapSource"); +exports.LineToLineMappedSource = require("./LineToLineMappedSource"); + +exports.CachedSource = require("./CachedSource"); +exports.ConcatSource = require("./ConcatSource"); +exports.ReplaceSource = require("./ReplaceSource"); +exports.PrefixSource = require("./PrefixSource"); diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/node_modules/source-list-map b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/node_modules/source-list-map new file mode 120000 index 000000000..1cb220c94 --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/node_modules/source-list-map @@ -0,0 +1 @@ +../../_source-list-map@2.0.1@source-list-map \ No newline at end of file diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/node_modules/source-map b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/node_modules/source-map new file mode 120000 index 000000000..891e694ba --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/node_modules/source-map @@ -0,0 +1 @@ +../../_source-map@0.6.1@source-map \ No newline at end of file diff --git a/public/node_modules/_webpack-sources@1.4.3@webpack-sources/package.json b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/package.json new file mode 100644 index 000000000..aab98bc3c --- /dev/null +++ b/public/node_modules/_webpack-sources@1.4.3@webpack-sources/package.json @@ -0,0 +1,53 @@ +{ + "name": "webpack-sources", + "version": "1.4.3", + "description": "Source code handling classes for webpack", + "main": "./lib/index.js", + "scripts": { + "pretest": "npm run lint && npm run beautify-lint", + "test": "mocha --full-trace --check-leaks", + "travis": "npm run cover -- --report lcovonly", + "lint": "eslint lib test", + "beautify-lint": "beautify-lint lib/**.js test/**.js", + "beautify": "beautify-rewrite lib/**.js test/**.js", + "precover": "npm run lint && npm run beautify-lint", + "cover": "istanbul cover node_modules/mocha/bin/_mocha", + "publish-patch": "npm test && npm version patch && git push && git push --tags && npm publish" + }, + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "devDependencies": { + "beautify-lint": "^1.0.3", + "codecov.io": "^0.1.6", + "coveralls": "^2.11.6", + "eslint": "^4.18.2", + "eslint-plugin-nodeca": "^1.0.3", + "istanbul": "^0.4.1", + "js-beautify": "^1.5.10", + "mocha": "^3.4.2", + "should": "^11.2.1", + "sourcemap-validator": "^1.1.0" + }, + "files": [ + "lib/" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/webpack/webpack-sources.git" + }, + "keywords": [ + "webpack", + "source-map" + ], + "author": "Tobias Koppers @sokra", + "license": "MIT", + "bugs": { + "url": "https://github.com/webpack/webpack-sources/issues" + }, + "homepage": "https://github.com/webpack/webpack-sources#readme", + "__npminstall_done": "Fri Jan 03 2020 18:02:08 GMT+0800 (GMT+08:00)", + "_from": "webpack-sources@1.4.3", + "_resolved": "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.4.3.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_wrappy@1.0.2@wrappy/LICENSE b/public/node_modules/_wrappy@1.0.2@wrappy/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_wrappy@1.0.2@wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_wrappy@1.0.2@wrappy/README.md b/public/node_modules/_wrappy@1.0.2@wrappy/README.md new file mode 100644 index 000000000..98eab2522 --- /dev/null +++ b/public/node_modules/_wrappy@1.0.2@wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/public/node_modules/_wrappy@1.0.2@wrappy/package.json b/public/node_modules/_wrappy@1.0.2@wrappy/package.json new file mode 100644 index 000000000..07c1fcb92 --- /dev/null +++ b/public/node_modules/_wrappy@1.0.2@wrappy/package.json @@ -0,0 +1,32 @@ +{ + "name": "wrappy", + "version": "1.0.2", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "files": [ + "wrappy.js" + ], + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^2.3.1" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/wrappy" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "wrappy@1.0.2", + "_resolved": "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_wrappy@1.0.2@wrappy/wrappy.js b/public/node_modules/_wrappy@1.0.2@wrappy/wrappy.js new file mode 100644 index 000000000..bb7e7d6fc --- /dev/null +++ b/public/node_modules/_wrappy@1.0.2@wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/public/node_modules/_yallist@3.1.1@yallist/LICENSE b/public/node_modules/_yallist@3.1.1@yallist/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_yallist@3.1.1@yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_yallist@3.1.1@yallist/README.md b/public/node_modules/_yallist@3.1.1@yallist/README.md new file mode 100644 index 000000000..f58610186 --- /dev/null +++ b/public/node_modules/_yallist@3.1.1@yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/public/node_modules/_yallist@3.1.1@yallist/iterator.js b/public/node_modules/_yallist@3.1.1@yallist/iterator.js new file mode 100644 index 000000000..d41c97a19 --- /dev/null +++ b/public/node_modules/_yallist@3.1.1@yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/public/node_modules/_yallist@3.1.1@yallist/package.json b/public/node_modules/_yallist@3.1.1@yallist/package.json new file mode 100644 index 000000000..d1b7371fe --- /dev/null +++ b/public/node_modules/_yallist@3.1.1@yallist/package.json @@ -0,0 +1,32 @@ +{ + "name": "yallist", + "version": "3.1.1", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "yallist@3.1.1", + "_resolved": "https://registry.npm.taobao.org/yallist/download/yallist-3.1.1.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_yallist@3.1.1@yallist/yallist.js b/public/node_modules/_yallist@3.1.1@yallist/yallist.js new file mode 100644 index 000000000..ed4e7303a --- /dev/null +++ b/public/node_modules/_yallist@3.1.1@yallist/yallist.js @@ -0,0 +1,426 @@ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 2; i < arguments.length; i++) { + walker = insert(this, walker, arguments[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/public/node_modules/_yallist@4.0.0@yallist/LICENSE b/public/node_modules/_yallist@4.0.0@yallist/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/public/node_modules/_yallist@4.0.0@yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/public/node_modules/_yallist@4.0.0@yallist/README.md b/public/node_modules/_yallist@4.0.0@yallist/README.md new file mode 100644 index 000000000..f58610186 --- /dev/null +++ b/public/node_modules/_yallist@4.0.0@yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/public/node_modules/_yallist@4.0.0@yallist/iterator.js b/public/node_modules/_yallist@4.0.0@yallist/iterator.js new file mode 100644 index 000000000..d41c97a19 --- /dev/null +++ b/public/node_modules/_yallist@4.0.0@yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/public/node_modules/_yallist@4.0.0@yallist/package.json b/public/node_modules/_yallist@4.0.0@yallist/package.json new file mode 100644 index 000000000..fb23e6f39 --- /dev/null +++ b/public/node_modules/_yallist@4.0.0@yallist/package.json @@ -0,0 +1,32 @@ +{ + "name": "yallist", + "version": "4.0.0", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "__npminstall_done": "Fri Jan 03 2020 18:02:10 GMT+0800 (GMT+08:00)", + "_from": "yallist@4.0.0", + "_resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz" +} \ No newline at end of file diff --git a/public/node_modules/_yallist@4.0.0@yallist/yallist.js b/public/node_modules/_yallist@4.0.0@yallist/yallist.js new file mode 100644 index 000000000..4e83ab1c5 --- /dev/null +++ b/public/node_modules/_yallist@4.0.0@yallist/yallist.js @@ -0,0 +1,426 @@ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/public/node_modules/aggregate-error b/public/node_modules/aggregate-error new file mode 120000 index 000000000..81645a169 --- /dev/null +++ b/public/node_modules/aggregate-error @@ -0,0 +1 @@ +_aggregate-error@3.0.1@aggregate-error \ No newline at end of file diff --git a/public/node_modules/ajv b/public/node_modules/ajv new file mode 120000 index 000000000..3b1892220 --- /dev/null +++ b/public/node_modules/ajv @@ -0,0 +1 @@ +_ajv@6.10.2@ajv \ No newline at end of file diff --git a/public/node_modules/ajv-keywords b/public/node_modules/ajv-keywords new file mode 120000 index 000000000..b178c4a25 --- /dev/null +++ b/public/node_modules/ajv-keywords @@ -0,0 +1 @@ +_ajv-keywords@3.4.1@ajv-keywords \ No newline at end of file diff --git a/public/node_modules/aproba b/public/node_modules/aproba new file mode 120000 index 000000000..a39906254 --- /dev/null +++ b/public/node_modules/aproba @@ -0,0 +1 @@ +_aproba@1.2.0@aproba \ No newline at end of file diff --git a/public/node_modules/balanced-match b/public/node_modules/balanced-match new file mode 120000 index 000000000..7cdd8f217 --- /dev/null +++ b/public/node_modules/balanced-match @@ -0,0 +1 @@ +_balanced-match@1.0.0@balanced-match \ No newline at end of file diff --git a/public/node_modules/brace-expansion b/public/node_modules/brace-expansion new file mode 120000 index 000000000..2dcb1532d --- /dev/null +++ b/public/node_modules/brace-expansion @@ -0,0 +1 @@ +_brace-expansion@1.1.11@brace-expansion \ No newline at end of file diff --git a/public/node_modules/buffer-from b/public/node_modules/buffer-from new file mode 120000 index 000000000..3d0c5fee9 --- /dev/null +++ b/public/node_modules/buffer-from @@ -0,0 +1 @@ +_buffer-from@1.1.1@buffer-from \ No newline at end of file diff --git a/public/node_modules/cacache b/public/node_modules/cacache new file mode 120000 index 000000000..fe2e5422d --- /dev/null +++ b/public/node_modules/cacache @@ -0,0 +1 @@ +_cacache@13.0.1@cacache \ No newline at end of file diff --git a/public/node_modules/chownr b/public/node_modules/chownr new file mode 120000 index 000000000..7c66a784b --- /dev/null +++ b/public/node_modules/chownr @@ -0,0 +1 @@ +_chownr@1.1.3@chownr \ No newline at end of file diff --git a/public/node_modules/clean-stack b/public/node_modules/clean-stack new file mode 120000 index 000000000..2aa52ea8b --- /dev/null +++ b/public/node_modules/clean-stack @@ -0,0 +1 @@ +_clean-stack@2.2.0@clean-stack \ No newline at end of file diff --git a/public/node_modules/commander b/public/node_modules/commander new file mode 120000 index 000000000..3dc5428e9 --- /dev/null +++ b/public/node_modules/commander @@ -0,0 +1 @@ +_commander@2.20.3@commander \ No newline at end of file diff --git a/public/node_modules/commondir b/public/node_modules/commondir new file mode 120000 index 000000000..59941afb8 --- /dev/null +++ b/public/node_modules/commondir @@ -0,0 +1 @@ +_commondir@1.0.1@commondir \ No newline at end of file diff --git a/public/node_modules/concat-map b/public/node_modules/concat-map new file mode 120000 index 000000000..5886dbfc2 --- /dev/null +++ b/public/node_modules/concat-map @@ -0,0 +1 @@ +_concat-map@0.0.1@concat-map \ No newline at end of file diff --git a/public/node_modules/copy-concurrently b/public/node_modules/copy-concurrently new file mode 120000 index 000000000..b0241052d --- /dev/null +++ b/public/node_modules/copy-concurrently @@ -0,0 +1 @@ +_copy-concurrently@1.0.5@copy-concurrently \ No newline at end of file diff --git a/public/node_modules/core-util-is b/public/node_modules/core-util-is new file mode 120000 index 000000000..a3b02f719 --- /dev/null +++ b/public/node_modules/core-util-is @@ -0,0 +1 @@ +_core-util-is@1.0.2@core-util-is \ No newline at end of file diff --git a/public/node_modules/fast-deep-equal b/public/node_modules/fast-deep-equal new file mode 120000 index 000000000..8e0996db0 --- /dev/null +++ b/public/node_modules/fast-deep-equal @@ -0,0 +1 @@ +_fast-deep-equal@2.0.1@fast-deep-equal \ No newline at end of file diff --git a/public/node_modules/fast-json-stable-stringify b/public/node_modules/fast-json-stable-stringify new file mode 120000 index 000000000..c86565062 --- /dev/null +++ b/public/node_modules/fast-json-stable-stringify @@ -0,0 +1 @@ +_fast-json-stable-stringify@2.1.0@fast-json-stable-stringify \ No newline at end of file diff --git a/public/node_modules/figgy-pudding b/public/node_modules/figgy-pudding new file mode 120000 index 000000000..3ad9a6fb2 --- /dev/null +++ b/public/node_modules/figgy-pudding @@ -0,0 +1 @@ +_figgy-pudding@3.5.1@figgy-pudding \ No newline at end of file diff --git a/public/node_modules/find-cache-dir b/public/node_modules/find-cache-dir new file mode 120000 index 000000000..8d62adc88 --- /dev/null +++ b/public/node_modules/find-cache-dir @@ -0,0 +1 @@ +_find-cache-dir@3.2.0@find-cache-dir \ No newline at end of file diff --git a/public/node_modules/find-up b/public/node_modules/find-up new file mode 120000 index 000000000..0b54d0c4a --- /dev/null +++ b/public/node_modules/find-up @@ -0,0 +1 @@ +_find-up@4.1.0@find-up \ No newline at end of file diff --git a/public/node_modules/fs-minipass b/public/node_modules/fs-minipass new file mode 120000 index 000000000..c8850945a --- /dev/null +++ b/public/node_modules/fs-minipass @@ -0,0 +1 @@ +_fs-minipass@2.0.0@fs-minipass \ No newline at end of file diff --git a/public/node_modules/fs-write-stream-atomic b/public/node_modules/fs-write-stream-atomic new file mode 120000 index 000000000..d6271074c --- /dev/null +++ b/public/node_modules/fs-write-stream-atomic @@ -0,0 +1 @@ +_fs-write-stream-atomic@1.0.10@fs-write-stream-atomic \ No newline at end of file diff --git a/public/node_modules/fs.realpath b/public/node_modules/fs.realpath new file mode 120000 index 000000000..57730457b --- /dev/null +++ b/public/node_modules/fs.realpath @@ -0,0 +1 @@ +_fs.realpath@1.0.0@fs.realpath \ No newline at end of file diff --git a/public/node_modules/glob b/public/node_modules/glob new file mode 120000 index 000000000..4bde64ac7 --- /dev/null +++ b/public/node_modules/glob @@ -0,0 +1 @@ +_glob@7.1.6@glob \ No newline at end of file diff --git a/public/node_modules/graceful-fs b/public/node_modules/graceful-fs new file mode 120000 index 000000000..e32c6d14d --- /dev/null +++ b/public/node_modules/graceful-fs @@ -0,0 +1 @@ +_graceful-fs@4.2.3@graceful-fs \ No newline at end of file diff --git a/public/node_modules/has-flag b/public/node_modules/has-flag new file mode 120000 index 000000000..a5a82ca9f --- /dev/null +++ b/public/node_modules/has-flag @@ -0,0 +1 @@ +_has-flag@3.0.0@has-flag \ No newline at end of file diff --git a/public/node_modules/iferr b/public/node_modules/iferr new file mode 120000 index 000000000..d1b0bb737 --- /dev/null +++ b/public/node_modules/iferr @@ -0,0 +1 @@ +_iferr@0.1.5@iferr \ No newline at end of file diff --git a/public/node_modules/imurmurhash b/public/node_modules/imurmurhash new file mode 120000 index 000000000..6d3d833c9 --- /dev/null +++ b/public/node_modules/imurmurhash @@ -0,0 +1 @@ +_imurmurhash@0.1.4@imurmurhash \ No newline at end of file diff --git a/public/node_modules/indent-string b/public/node_modules/indent-string new file mode 120000 index 000000000..9c0352a15 --- /dev/null +++ b/public/node_modules/indent-string @@ -0,0 +1 @@ +_indent-string@4.0.0@indent-string \ No newline at end of file diff --git a/public/node_modules/infer-owner b/public/node_modules/infer-owner new file mode 120000 index 000000000..ec774937a --- /dev/null +++ b/public/node_modules/infer-owner @@ -0,0 +1 @@ +_infer-owner@1.0.4@infer-owner \ No newline at end of file diff --git a/public/node_modules/inflight b/public/node_modules/inflight new file mode 120000 index 000000000..5128a399e --- /dev/null +++ b/public/node_modules/inflight @@ -0,0 +1 @@ +_inflight@1.0.6@inflight \ No newline at end of file diff --git a/public/node_modules/inherits b/public/node_modules/inherits new file mode 120000 index 000000000..1fd2d4a27 --- /dev/null +++ b/public/node_modules/inherits @@ -0,0 +1 @@ +_inherits@2.0.4@inherits \ No newline at end of file diff --git a/public/node_modules/isarray b/public/node_modules/isarray new file mode 120000 index 000000000..8392d3acd --- /dev/null +++ b/public/node_modules/isarray @@ -0,0 +1 @@ +_isarray@1.0.0@isarray \ No newline at end of file diff --git a/public/node_modules/jest-worker b/public/node_modules/jest-worker new file mode 120000 index 000000000..4077b9fa6 --- /dev/null +++ b/public/node_modules/jest-worker @@ -0,0 +1 @@ +_jest-worker@24.9.0@jest-worker \ No newline at end of file diff --git a/public/node_modules/json-schema-traverse b/public/node_modules/json-schema-traverse new file mode 120000 index 000000000..86e19102f --- /dev/null +++ b/public/node_modules/json-schema-traverse @@ -0,0 +1 @@ +_json-schema-traverse@0.4.1@json-schema-traverse \ No newline at end of file diff --git a/public/node_modules/locate-path b/public/node_modules/locate-path new file mode 120000 index 000000000..5841692d6 --- /dev/null +++ b/public/node_modules/locate-path @@ -0,0 +1 @@ +_locate-path@5.0.0@locate-path \ No newline at end of file diff --git a/public/node_modules/lru-cache b/public/node_modules/lru-cache new file mode 120000 index 000000000..c0ecfdcb4 --- /dev/null +++ b/public/node_modules/lru-cache @@ -0,0 +1 @@ +_lru-cache@5.1.1@lru-cache \ No newline at end of file diff --git a/public/node_modules/make-dir b/public/node_modules/make-dir new file mode 120000 index 000000000..f4c35bd73 --- /dev/null +++ b/public/node_modules/make-dir @@ -0,0 +1 @@ +_make-dir@3.0.0@make-dir \ No newline at end of file diff --git a/public/node_modules/merge-stream b/public/node_modules/merge-stream new file mode 120000 index 000000000..ef7241734 --- /dev/null +++ b/public/node_modules/merge-stream @@ -0,0 +1 @@ +_merge-stream@2.0.0@merge-stream \ No newline at end of file diff --git a/public/node_modules/minimatch b/public/node_modules/minimatch new file mode 120000 index 000000000..b6e3e4635 --- /dev/null +++ b/public/node_modules/minimatch @@ -0,0 +1 @@ +_minimatch@3.0.4@minimatch \ No newline at end of file diff --git a/public/node_modules/minimist b/public/node_modules/minimist new file mode 120000 index 000000000..e82ae6eac --- /dev/null +++ b/public/node_modules/minimist @@ -0,0 +1 @@ +_minimist@0.0.8@minimist \ No newline at end of file diff --git a/public/node_modules/minipass b/public/node_modules/minipass new file mode 120000 index 000000000..20245b402 --- /dev/null +++ b/public/node_modules/minipass @@ -0,0 +1 @@ +_minipass@3.1.1@minipass \ No newline at end of file diff --git a/public/node_modules/minipass-collect b/public/node_modules/minipass-collect new file mode 120000 index 000000000..42aee3020 --- /dev/null +++ b/public/node_modules/minipass-collect @@ -0,0 +1 @@ +_minipass-collect@1.0.2@minipass-collect \ No newline at end of file diff --git a/public/node_modules/minipass-flush b/public/node_modules/minipass-flush new file mode 120000 index 000000000..010e74f32 --- /dev/null +++ b/public/node_modules/minipass-flush @@ -0,0 +1 @@ +_minipass-flush@1.0.5@minipass-flush \ No newline at end of file diff --git a/public/node_modules/minipass-pipeline b/public/node_modules/minipass-pipeline new file mode 120000 index 000000000..65bef2d55 --- /dev/null +++ b/public/node_modules/minipass-pipeline @@ -0,0 +1 @@ +_minipass-pipeline@1.2.2@minipass-pipeline \ No newline at end of file diff --git a/public/node_modules/mkdirp b/public/node_modules/mkdirp new file mode 120000 index 000000000..b2bcce5ed --- /dev/null +++ b/public/node_modules/mkdirp @@ -0,0 +1 @@ +_mkdirp@0.5.1@mkdirp \ No newline at end of file diff --git a/public/node_modules/move-concurrently b/public/node_modules/move-concurrently new file mode 120000 index 000000000..78637ef23 --- /dev/null +++ b/public/node_modules/move-concurrently @@ -0,0 +1 @@ +_move-concurrently@1.0.1@move-concurrently \ No newline at end of file diff --git a/public/node_modules/once b/public/node_modules/once new file mode 120000 index 000000000..674d66dc8 --- /dev/null +++ b/public/node_modules/once @@ -0,0 +1 @@ +_once@1.4.0@once \ No newline at end of file diff --git a/public/node_modules/p-limit b/public/node_modules/p-limit new file mode 120000 index 000000000..9933c8f21 --- /dev/null +++ b/public/node_modules/p-limit @@ -0,0 +1 @@ +_p-limit@2.2.2@p-limit \ No newline at end of file diff --git a/public/node_modules/p-locate b/public/node_modules/p-locate new file mode 120000 index 000000000..b07d975bd --- /dev/null +++ b/public/node_modules/p-locate @@ -0,0 +1 @@ +_p-locate@4.1.0@p-locate \ No newline at end of file diff --git a/public/node_modules/p-map b/public/node_modules/p-map new file mode 120000 index 000000000..9a62f0338 --- /dev/null +++ b/public/node_modules/p-map @@ -0,0 +1 @@ +_p-map@3.0.0@p-map \ No newline at end of file diff --git a/public/node_modules/p-try b/public/node_modules/p-try new file mode 120000 index 000000000..3c6e4e7a8 --- /dev/null +++ b/public/node_modules/p-try @@ -0,0 +1 @@ +_p-try@2.2.0@p-try \ No newline at end of file diff --git a/public/node_modules/path-exists b/public/node_modules/path-exists new file mode 120000 index 000000000..949407f0f --- /dev/null +++ b/public/node_modules/path-exists @@ -0,0 +1 @@ +_path-exists@4.0.0@path-exists \ No newline at end of file diff --git a/public/node_modules/path-is-absolute b/public/node_modules/path-is-absolute new file mode 120000 index 000000000..40983095d --- /dev/null +++ b/public/node_modules/path-is-absolute @@ -0,0 +1 @@ +_path-is-absolute@1.0.1@path-is-absolute \ No newline at end of file diff --git a/public/node_modules/pkg-dir b/public/node_modules/pkg-dir new file mode 120000 index 000000000..cba4c0709 --- /dev/null +++ b/public/node_modules/pkg-dir @@ -0,0 +1 @@ +_pkg-dir@4.2.0@pkg-dir \ No newline at end of file diff --git a/public/node_modules/process-nextick-args b/public/node_modules/process-nextick-args new file mode 120000 index 000000000..e1ede33d6 --- /dev/null +++ b/public/node_modules/process-nextick-args @@ -0,0 +1 @@ +_process-nextick-args@2.0.1@process-nextick-args \ No newline at end of file diff --git a/public/node_modules/promise-inflight b/public/node_modules/promise-inflight new file mode 120000 index 000000000..faf1a5c09 --- /dev/null +++ b/public/node_modules/promise-inflight @@ -0,0 +1 @@ +_promise-inflight@1.0.1@promise-inflight \ No newline at end of file diff --git a/public/node_modules/punycode b/public/node_modules/punycode new file mode 120000 index 000000000..72d854203 --- /dev/null +++ b/public/node_modules/punycode @@ -0,0 +1 @@ +_punycode@2.1.1@punycode \ No newline at end of file diff --git a/public/node_modules/readable-stream b/public/node_modules/readable-stream new file mode 120000 index 000000000..7021c935e --- /dev/null +++ b/public/node_modules/readable-stream @@ -0,0 +1 @@ +_readable-stream@2.3.6@readable-stream \ No newline at end of file diff --git a/public/node_modules/rimraf b/public/node_modules/rimraf new file mode 120000 index 000000000..7ecbf4d87 --- /dev/null +++ b/public/node_modules/rimraf @@ -0,0 +1 @@ +_rimraf@2.7.1@rimraf \ No newline at end of file diff --git a/public/node_modules/run-queue b/public/node_modules/run-queue new file mode 120000 index 000000000..61becb27e --- /dev/null +++ b/public/node_modules/run-queue @@ -0,0 +1 @@ +_run-queue@1.0.3@run-queue \ No newline at end of file diff --git a/public/node_modules/safe-buffer b/public/node_modules/safe-buffer new file mode 120000 index 000000000..597f8822e --- /dev/null +++ b/public/node_modules/safe-buffer @@ -0,0 +1 @@ +_safe-buffer@5.1.2@safe-buffer \ No newline at end of file diff --git a/public/node_modules/schema-utils b/public/node_modules/schema-utils new file mode 120000 index 000000000..2af6f5f44 --- /dev/null +++ b/public/node_modules/schema-utils @@ -0,0 +1 @@ +_schema-utils@2.6.1@schema-utils \ No newline at end of file diff --git a/public/node_modules/semver b/public/node_modules/semver new file mode 120000 index 000000000..7b81d02d1 --- /dev/null +++ b/public/node_modules/semver @@ -0,0 +1 @@ +_semver@6.3.0@semver \ No newline at end of file diff --git a/public/node_modules/serialize-javascript b/public/node_modules/serialize-javascript new file mode 120000 index 000000000..068810aa9 --- /dev/null +++ b/public/node_modules/serialize-javascript @@ -0,0 +1 @@ +_serialize-javascript@2.1.2@serialize-javascript \ No newline at end of file diff --git a/public/node_modules/source-list-map b/public/node_modules/source-list-map new file mode 120000 index 000000000..f1428bff2 --- /dev/null +++ b/public/node_modules/source-list-map @@ -0,0 +1 @@ +_source-list-map@2.0.1@source-list-map \ No newline at end of file diff --git a/public/node_modules/source-map b/public/node_modules/source-map new file mode 120000 index 000000000..c399441b2 --- /dev/null +++ b/public/node_modules/source-map @@ -0,0 +1 @@ +_source-map@0.6.1@source-map \ No newline at end of file diff --git a/public/node_modules/source-map-support b/public/node_modules/source-map-support new file mode 120000 index 000000000..fd8d00e2c --- /dev/null +++ b/public/node_modules/source-map-support @@ -0,0 +1 @@ +_source-map-support@0.5.16@source-map-support \ No newline at end of file diff --git a/public/node_modules/ssri b/public/node_modules/ssri new file mode 120000 index 000000000..3f1e59601 --- /dev/null +++ b/public/node_modules/ssri @@ -0,0 +1 @@ +_ssri@7.1.0@ssri \ No newline at end of file diff --git a/public/node_modules/string_decoder b/public/node_modules/string_decoder new file mode 120000 index 000000000..2312bbeae --- /dev/null +++ b/public/node_modules/string_decoder @@ -0,0 +1 @@ +_string_decoder@1.1.1@string_decoder \ No newline at end of file diff --git a/public/node_modules/supports-color b/public/node_modules/supports-color new file mode 120000 index 000000000..52c02a4d0 --- /dev/null +++ b/public/node_modules/supports-color @@ -0,0 +1 @@ +_supports-color@6.1.0@supports-color \ No newline at end of file diff --git a/public/node_modules/terser b/public/node_modules/terser new file mode 120000 index 000000000..b7d6041fa --- /dev/null +++ b/public/node_modules/terser @@ -0,0 +1 @@ +_terser@4.5.1@terser \ No newline at end of file diff --git a/public/node_modules/terser-webpack-plugin b/public/node_modules/terser-webpack-plugin new file mode 120000 index 000000000..806035344 --- /dev/null +++ b/public/node_modules/terser-webpack-plugin @@ -0,0 +1 @@ +_terser-webpack-plugin@2.3.1@terser-webpack-plugin \ No newline at end of file diff --git a/public/node_modules/unique-filename b/public/node_modules/unique-filename new file mode 120000 index 000000000..36a9b66ce --- /dev/null +++ b/public/node_modules/unique-filename @@ -0,0 +1 @@ +_unique-filename@1.1.1@unique-filename \ No newline at end of file diff --git a/public/node_modules/unique-slug b/public/node_modules/unique-slug new file mode 120000 index 000000000..8113cfc56 --- /dev/null +++ b/public/node_modules/unique-slug @@ -0,0 +1 @@ +_unique-slug@2.0.2@unique-slug \ No newline at end of file diff --git a/public/node_modules/uri-js b/public/node_modules/uri-js new file mode 120000 index 000000000..4677829fb --- /dev/null +++ b/public/node_modules/uri-js @@ -0,0 +1 @@ +_uri-js@4.2.2@uri-js \ No newline at end of file diff --git a/public/node_modules/util-deprecate b/public/node_modules/util-deprecate new file mode 120000 index 000000000..2d084538c --- /dev/null +++ b/public/node_modules/util-deprecate @@ -0,0 +1 @@ +_util-deprecate@1.0.2@util-deprecate \ No newline at end of file diff --git a/public/node_modules/webpack-sources b/public/node_modules/webpack-sources new file mode 120000 index 000000000..0b60201c9 --- /dev/null +++ b/public/node_modules/webpack-sources @@ -0,0 +1 @@ +_webpack-sources@1.4.3@webpack-sources \ No newline at end of file diff --git a/public/node_modules/wrappy b/public/node_modules/wrappy new file mode 120000 index 000000000..1c0938002 --- /dev/null +++ b/public/node_modules/wrappy @@ -0,0 +1 @@ +_wrappy@1.0.2@wrappy \ No newline at end of file diff --git a/public/node_modules/yallist b/public/node_modules/yallist new file mode 120000 index 000000000..7294e560a --- /dev/null +++ b/public/node_modules/yallist @@ -0,0 +1 @@ +_yallist@4.0.0@yallist \ No newline at end of file diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index 1fe7a6c93..838ce28a8 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -319,18 +319,18 @@ module.exports = { // sourceMap: shouldUseSourceMap, // }), //正式版上线后打开去掉debuger和console - new ParallelUglifyPlugin({ - cacheDir: '.cache/', - uglifyJS:{ - output: { - comments: false - }, - compress: { - drop_debugger: true, - drop_console: true - } - } - }), + // new ParallelUglifyPlugin({ + // cacheDir: '.cache/', + // uglifyJS:{ + // output: { + // comments: false + // }, + // compress: { + // drop_debugger: true, + // drop_console: true + // } + // } + // }), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`. new ExtractTextPlugin({ filename: cssFilename, diff --git a/public/react/src/forge/Main/Index.js b/public/react/src/forge/Main/Index.js index af8369f3e..056b24874 100644 --- a/public/react/src/forge/Main/Index.js +++ b/public/react/src/forge/Main/Index.js @@ -181,38 +181,40 @@ class Index extends Component{ :"" ) return( -
      -
      -
        -
      • 项目类型
      • - { typeList } -
      -
        -
      • 项目类别
      • - { categoryList } -
      -
      -
      - -
      - - - - 排序 - - -
      - - { pagination } -
      +
      +
      +
      +
        +
      • 项目类型
      • + { typeList } +
      +
        +
      • 项目类别
      • + { categoryList } +
      +
      +
      + +
      + + + + 排序 + + +
      + + { pagination } +
      +
      ) From bb2691767befc6614041d8fa1eab1763090835d7 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Fri, 3 Jan 2020 19:03:09 +0800 Subject: [PATCH 2/3] build --- public/react/src/forge/Branch/SelectBranch.js | 31 ++++++++++ .../src/forge/Main/CoderRootDirectory.js | 61 +++++++++---------- public/react/src/forge/Main/Detail.js | 11 ++-- public/react/src/forge/New/Index.js | 1 + 4 files changed, 68 insertions(+), 36 deletions(-) create mode 100644 public/react/src/forge/Branch/SelectBranch.js diff --git a/public/react/src/forge/Branch/SelectBranch.js b/public/react/src/forge/Branch/SelectBranch.js new file mode 100644 index 000000000..ca5ee9413 --- /dev/null +++ b/public/react/src/forge/Branch/SelectBranch.js @@ -0,0 +1,31 @@ +import React , { Component } from 'react'; +import { Dropdown , Icon , Menu } from 'antd'; + +class SelectBranch extends Component{ + + render(){ + const { branchs , branch , changeBranch } = this.props; + const menu = ( + + { + branchs && branchs.map((item,key)=>{ + return( + changeBranch(value)}>{item.name} + ) + }) + } + + ); + return( +
      + 分支: + + + {branch} + + +
      + ) + } +} +export default SelectBranch; \ No newline at end of file diff --git a/public/react/src/forge/Main/CoderRootDirectory.js b/public/react/src/forge/Main/CoderRootDirectory.js index 2b83644e9..038f841a8 100644 --- a/public/react/src/forge/Main/CoderRootDirectory.js +++ b/public/react/src/forge/Main/CoderRootDirectory.js @@ -5,6 +5,8 @@ import {Link} from 'react-router-dom'; import { getImageUrl } from 'educoder'; import axios from 'axios'; +import SelectBranch from '../Branch/SelectBranch' + // 点击按钮复制功能 function jsCopy(){ var e = document.getElementById("copy_rep_content"); @@ -16,7 +18,8 @@ class CoderRootDirectory extends Component{ super(props); this.state={ address:"http", - ref:"master", + branch:"master", + http_url:undefined, rootList:undefined, branchList:undefined, @@ -54,21 +57,22 @@ class CoderRootDirectory extends Component{ this.setState({ branchList:result.data, branchs, - branchLastCommit:result.data[0] + branchLastCommit:result.data[0], + http_url:result.data[0].http_url }) } }).catch((error)=>{}) } // 获取分支文件 - getProjectRoot=(ref)=>{ + getProjectRoot=(branch)=>{ const { login } = this.props.current_user; const { projectsId } = this.props.match.params; const url = `/${login}/${projectsId}/entries.json`; axios.get((url),{ params:{ - ref + branch } }).then((result)=>{ if(result && result.data && result.data.length > 0){ @@ -96,8 +100,9 @@ class CoderRootDirectory extends Component{ let branchLastCommit = branchList[parseInt(value.key)]; this.setState({ - ref:branchLastCommit.name, - branchLastCommit + branch:branchLastCommit.name, + branchLastCommit, + http_url:branchLastCommit.http_url }) } @@ -114,18 +119,8 @@ class CoderRootDirectory extends Component{ } ]; - const { address , ref , rootList , branchList , branchs, branchLastCommit } = this.state; - const menu = ( - - { - branchs && branchs.map((item,key)=>{ - return( - {item.name} - ) - }) - } - - ); + const { branch , rootList , branchs, branchLastCommit , http_url } = this.state; + const title = () =>{ if(branchLastCommit && branchLastCommit.last_commit){ @@ -134,7 +129,7 @@ class CoderRootDirectory extends Component{ { branchLastCommit.author ? - + {branchLastCommit.author.login} :"" @@ -148,6 +143,17 @@ class CoderRootDirectory extends Component{ return undefined; } } + + const downloadUrl = ()=>{ + if(branchLastCommit && branchLastCommit.zip_url){ + return( + + ZIP + TAR.GZ + + ) + } + } return(

      @@ -156,21 +162,14 @@ class CoderRootDirectory extends Component{

      -
      - 分支: - - - {ref} - - -
      +
      - this.changeAddress("http")}>HTTP - this.changeAddress("ssh")}>SSH - + this.changeAddress("http")}>HTTP + {/* this.changeAddress("ssh")}>SSH */} + jsCopy()}> - + diff --git a/public/react/src/forge/Main/Detail.js b/public/react/src/forge/Main/Detail.js index c533a48bc..d22f1fe67 100644 --- a/public/react/src/forge/Main/Detail.js +++ b/public/react/src/forge/Main/Detail.js @@ -24,6 +24,7 @@ class Detail extends Component{ } render(){ const { currentKey } = this.state; + const { projectsId } = this.props.match.params; return(
      @@ -38,11 +39,11 @@ class Detail extends Component{
        -
      • 代码
      • -
      • 工单
      • -
      • 合并请求
      • -
      • 版本发布
      • -
      • 动态
      • +
      • 代码
      • +
      • 工单
      • +
      • 合并请求
      • +
      • 版本发布
      • +
      • 动态
      diff --git a/public/react/src/forge/New/Index.js b/public/react/src/forge/New/Index.js index b07805e56..e83e07435 100644 --- a/public/react/src/forge/New/Index.js +++ b/public/react/src/forge/New/Index.js @@ -107,6 +107,7 @@ class Index extends Component{ if(result){ if(result.data.id){ this.props.showNotification(`${projectsType === "deposit" ? "托管" :"镜像"}项目创建成功!`); + this.history.push('/projects'); } } }).catch((error)=>{ From 05cb2181f190dcffeb2092ea035053137a0bf197 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Fri, 3 Jan 2020 19:58:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?issue=E7=9A=84=E9=83=A8=E5=88=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/issue_depends.js | 2 + app/assets/javascripts/issue_times.js | 2 + app/assets/stylesheets/issue_depends.scss | 3 + app/assets/stylesheets/issue_times.scss | 3 + app/controllers/issue_depends_controller.rb | 47 +++++ app/controllers/issue_times_controller.rb | 55 ++++++ app/controllers/issues_controller.rb | 179 ++++++++++++++++-- app/controllers/journals_controller.rb | 35 +++- app/helpers/issue_depends_helper.rb | 2 + app/helpers/issue_times_helper.rb | 2 + app/models/issue.rb | 13 +- app/models/issue_depend.rb | 3 + app/models/issue_time.rb | 4 + app/models/journal.rb | 80 +++++++- app/models/project.rb | 5 +- app/models/user.rb | 1 + app/views/issue_times/create.json.jbuilder | 0 app/views/issues/show.json.jbuilder | 9 +- app/views/journals/edit.json.jbuilder | 2 + app/views/journals/update.json.jbuilder | 0 config/locales/zh-CN.yml | 10 +- config/routes.rb | 12 ++ .../20200103062707_create_issue_times.rb | 13 ++ .../20200103062807_create_issue_depends.rb | 12 ++ .../20200103113839_add_is_lock_to_issue.rb | 5 + .../issue_depends_controller_spec.rb | 5 + .../issue_times_controller_spec.rb | 5 + spec/helpers/issue_depends_helper_spec.rb | 15 ++ spec/helpers/issue_times_helper_spec.rb | 15 ++ spec/models/issue_depend_spec.rb | 5 + spec/models/issue_time_spec.rb | 5 + 31 files changed, 515 insertions(+), 34 deletions(-) create mode 100644 app/assets/javascripts/issue_depends.js create mode 100644 app/assets/javascripts/issue_times.js create mode 100644 app/assets/stylesheets/issue_depends.scss create mode 100644 app/assets/stylesheets/issue_times.scss create mode 100644 app/controllers/issue_depends_controller.rb create mode 100644 app/controllers/issue_times_controller.rb create mode 100644 app/helpers/issue_depends_helper.rb create mode 100644 app/helpers/issue_times_helper.rb create mode 100644 app/models/issue_depend.rb create mode 100644 app/models/issue_time.rb create mode 100644 app/views/issue_times/create.json.jbuilder create mode 100644 app/views/journals/edit.json.jbuilder create mode 100644 app/views/journals/update.json.jbuilder create mode 100644 db/migrate/20200103062707_create_issue_times.rb create mode 100644 db/migrate/20200103062807_create_issue_depends.rb create mode 100644 db/migrate/20200103113839_add_is_lock_to_issue.rb create mode 100644 spec/controllers/issue_depends_controller_spec.rb create mode 100644 spec/controllers/issue_times_controller_spec.rb create mode 100644 spec/helpers/issue_depends_helper_spec.rb create mode 100644 spec/helpers/issue_times_helper_spec.rb create mode 100644 spec/models/issue_depend_spec.rb create mode 100644 spec/models/issue_time_spec.rb diff --git a/app/assets/javascripts/issue_depends.js b/app/assets/javascripts/issue_depends.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/app/assets/javascripts/issue_depends.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/assets/javascripts/issue_times.js b/app/assets/javascripts/issue_times.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/app/assets/javascripts/issue_times.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/assets/stylesheets/issue_depends.scss b/app/assets/stylesheets/issue_depends.scss new file mode 100644 index 000000000..47eac0077 --- /dev/null +++ b/app/assets/stylesheets/issue_depends.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the issue_depends controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/issue_times.scss b/app/assets/stylesheets/issue_times.scss new file mode 100644 index 000000000..e9c1fafb5 --- /dev/null +++ b/app/assets/stylesheets/issue_times.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the issue_times controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/issue_depends_controller.rb b/app/controllers/issue_depends_controller.rb new file mode 100644 index 000000000..1a194fbb9 --- /dev/null +++ b/app/controllers/issue_depends_controller.rb @@ -0,0 +1,47 @@ +class IssueDependsController < ApplicationController + before_action :require_login + before_action :set_issue + before_action :check_issue_permission + + def create + issue_depend = { + user_id: current_user.id, + depend_issue_id: params[:depend_issue_id].to_i, + issue_id: @issue.id + } + save_issue_depend = IssueDepend.new(issue_depend) + if save_issue_depend.save + @issue.custom_journal_detail("issue_depend","", @issue.id) + normal_status(0, "添加依赖成功") + else + normal_status(0, "添加依赖失败") + end + end + + + def destroy + depend_issue_params = params[:id] + depend_issue = IssueDepend.find(depend_issue_params) + if depend_issue&.destroy + @issue.custom_journal_detail("destroy_issue_depend","", @issue.id) + normal_status(0, "删除依赖成功") + else + normal_status(-1, "删除依赖失败") + end + end + + private + def set_issue + @issue = Issue.find_by_id(params[:issue_id]) + unless @issue.present? + normal_status(-1, "标签不存在") + end + end + + def check_issue_permission + @project = @issue.project + unless @project.member?(current_user) || current_user.admin? + normal_status(-1, "您没有权限") + end + end +end diff --git a/app/controllers/issue_times_controller.rb b/app/controllers/issue_times_controller.rb new file mode 100644 index 000000000..9574f4ad3 --- /dev/null +++ b/app/controllers/issue_times_controller.rb @@ -0,0 +1,55 @@ +class IssueTimesController < ApplicationController + before_action :require_login + before_action :set_issue + before_action :check_issue_permission + + def create + issue_time = { + user_id: current_user.id, + start_time: params[:start_time].to_s.to_time || Time.now, + issue_id: @issue.id + } + save_issue_time = IssueTime.new(issue_time) + if save_issue_time.save + @issue.custom_journal_detail("work_time",save_issue_time.id, "开始工作") + normal_status(0, "开始成功") + else + normal_status(0, "开始失败") + end + end + + def end_work + end_type = params[:end_type].to_i + end_work_time = end_type == 0 ? "" : Time.now + last_work_time = @issue.issue_times.where(user_id: current_user.id, end_time: nil) + Rails.logger.info("######________last_work_time&.last.try(:id)_____###########{last_work_time&.first.try(:id)}") + + if last_work_time.update_all(end_time: end_work_time) + if end_type == 0 + message = "取消时间跟踪" + @issue.custom_journal_detail("cancel_time",last_work_time&.first.try(:id), "取消时间跟踪") + else + message = "停止工作" + @issue.custom_journal_detail("end_time",last_work_time&.first.try(:id), "停止工作") + end + normal_status(0, message) + else + normal_status(0, "操作失败") + end + end + + private + def set_issue + @issue = Issue.find_by_id(params[:issue_id]) + unless @issue.present? + normal_status(-1, "标签不存在") + end + end + + def check_issue_permission + @project = @issue.project + unless @project.member?(current_user) || current_user.admin? + normal_status(-1, "您没有权限") + end + end +end diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index b7068dc0c..5d515b36e 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -1,13 +1,14 @@ class IssuesController < ApplicationController - before_action :require_login + before_action :require_login, except: [:index, :show] before_action :set_project - before_action :check_project_public, only: [:index ,:show, :copy, :index_chosen] - before_action :check_issue_permission, except: [:index, :show, :copy, :index_chosen] - before_action :set_issue, only: [:edit, :update, :destroy, :show, :copy, :index_chosen] + before_action :check_project_public, only: [:index ,:show, :copy, :index_chosen, :close_issue] + before_action :check_issue_permission, except: [:index, :show, :index_chosen] + before_action :set_issue, only: [:edit, :update, :destroy, :show, :copy, :index_chosen, :close_issue, :lock_issue] + + include ApplicationHelper def index issues = @project.issues.includes(:user,:tracker, :priority, :version, :issue_status, :journals) - issues = issues.where(is_private: false) unless current_user.present? && (current_user.admin? || @project.member?(current_user)) @all_issues_size = issues.size @open_issues_size = issues.where.not(status_id: 5).size @@ -245,6 +246,10 @@ class IssuesController < ApplicationController end end + if params[:status_id].to_i == 5 + @issue.issue_times.update_all(end_time: Time.now) + end + @issue.create_journal_detail(change_files, issue_files, issue_file_ids) normal_status(0, "更新成功") else @@ -254,9 +259,19 @@ class IssuesController < ApplicationController end def show + @user_permission = current_user.present? && (!@issue.is_lock || @project.member?(current_user) || current_user.admin? || @issue.user == current_user) @issue_attachments = @issue.attachments @issue_user = @issue.user @issue_assign_to = @issue.get_assign_user + @join_users = join_users(@issue) + #总耗时 + cost_time(@issue) + + #被依赖 + @be_depended_issues_array = be_depended_issues(@issue) + + #依赖于 + depended_issues(@issue) end def destroy @@ -276,6 +291,43 @@ class IssuesController < ApplicationController end end + def close_issue + type = params[:status_id].to_i || 5 + if type == 5 + message = "关闭" + else + message = "重新开启" + end + if @issue.update_attribute(:status_id, type) + if type == 5 + @issue.issue_times.update_all(end_time: Time.now) + end + @issue.create_journal_detail(false, [], []) + normal_status(0, message) + else + normal_status(-1, "操作失败") + end + end + + def lock_issue + if @issue.user == current_user || current_user.admin? + type = (params[:lock_type].to_i == 1) + if @issue.update_attribute(:is_lock, type) + if type + @issue.custom_journal_detail("lock_issue","", "因为#{params[:lock_reason].present? ? params[:lock_reason].to_s : "某种原因"}而锁定,并将对话限制为协作者") + else + @issue.custom_journal_detail("unlock_issue","", "解除锁定") + end + normal_status(0, "操作成功") + else + normal_status(-1, "操作失败") + end + else + normal_status(-1, "您没有权限") + end + + end + private def set_project @project = Project.find_by_id(params[:project_id]) @@ -292,8 +344,10 @@ class IssuesController < ApplicationController def set_issue @issue = Issue.find_by_id(params[:id]) - unless @issue.present? + if @issue.blank? normal_status(-1, "标签不存在") + elsif @issue.is_lock &&!(@project.member?(current_user) || current_user.admin?) + normal_status(-1, "您没有权限") end end @@ -303,25 +357,104 @@ class IssuesController < ApplicationController end end + def join_users(issue) + #协作者 + issue_comment_users_array = [] + issue_comment_users = issue.journals.select(:user_id).distinct + if issue.present? && issue_comment_users.size > 0 + issue_comment_users.each do |j| + user_avatar = url_to_avatar(j.user) + issue_comment_users_array.push({login: j.user.try(:login), avatar_url: user_avatar}) + end + end + issue_comment_users_array + end + + def cost_time(issue) + #总耗时 + @cost_time_array = [] + @all_cost_time = 0 + all_issue_times = issue.issue_times.includes(:user).where.not(end_time: nil) + if issue.present? && all_issue_times.size > 0 + all_issue_times.each do |time| + cost_time = time.end_time.to_i - time.start_time.to_i + cost_time = cost_time > 0 ? cost_time : 0 + @all_cost_time = @all_cost_time + cost_time + set_cost_time = Time.at(cost_time).utc.strftime('%H h %M min %S s') + @cost_time_array.push({login: time.user.try(:login), avatar_url: url_to_avatar(time.user), cost_time: set_cost_time}) + end + end + end + + def depended_issues(issue) + #依赖于 + @depended_issues_id = [] + @depended_issues_array = [] + depended_issues = issue.issue_depends.pluck(:id,:depend_issue_id).uniq + if issue.present? && depended_issues.size > 0 + depended_issues.each do |de| + @depended_issues_id.push(de[1]) + issues = Issue.select(:id, :subject).where(id: de[1]).as_json + issues = issues.first.merge(depend_id: de[0]) + @depended_issues_array.push(issues) + end + @depended_issues_id.delete(issue.id) + end + end + + def be_depended_issues(issue) + be_depended_issues_array = [] + be_depended_issues = IssueDepend.where(depend_issue_id: issue.id).pluck(:id,:issue_id).uniq + if issue.present? && be_depended_issues.size > 0 + be_depended_issues.each do |de| + d_issues = Issue.select(:id, :subject).where(id: de[1]).as_json + d_issues = d_issues.first.merge(depend_id: de[0]) + be_depended_issues_array.push(d_issues) + end + end + be_depended_issues_array + end + def issue_left_chosen(project,issue_id) issue_info = Array.new(11) use_tags = [] + issue_comment_users_array = [] + cost_time_array = [] + all_cost_time = 0 + be_depended_issues_array = [] + depended_issues_array = [] + all_issues = [] + depended_issues_id = [] if issue_id.present? - use_tags = Issue.find(issue_id).issue_tags.select(:id).pluck(:id) + issue = Issue.find(issue_id) + use_tags = issue.issue_tags.select(:id).pluck(:id) select_arrays = [:assigned_to_id, :tracker_id, :status_id, :priority_id, :fixed_version_id, :start_date, :due_date, :estimated_hours, :done_ratio, :issue_type, :token] issue_info = Issue.select(select_arrays).where(id: issue_id).pluck(select_arrays) issue_info = issue_info[0] + + issue_comment_users_array = join_users(issue) + #总耗时 + cost_time(issue) + cost_time_array = @cost_time_array + all_cost_time = @all_cost_time + + #被依赖 + be_depended_issues_array = be_depended_issues(issue) + + #依赖于 + depended_issues(issue) + depended_issues_array = @depended_issues_array + depended_issues_id = @depended_issues_id + end project_members = project.members_user_infos project_members_info = [] #指派给 project_members.each do |member| - real_name = member[2] + member[3] - unless real_name.present? - real_name = member[1] - end + user = member.user + real_name = user.try(:show_real_name) user_id = member[0] - is_chosen = ((member[0].to_s == issue_info[0].to_s) ? "1" : "0") - member_info = {id: user_id, name: real_name, is_chosen: is_chosen} + is_chosen = ((user.id.to_s == issue_info[0].to_s) ? "1" : "0") + member_info = {id: user_id, name: real_name,avatar_url: url_to_avatar(user),is_chosen: is_chosen} project_members_info.push(member_info) end @@ -335,7 +468,6 @@ class IssuesController < ApplicationController end end - issue_status = IssueStatus&.pluck(:id,:name,:position) new_status_info = [] #缺陷类型 if issue_status.size > 0 @@ -356,7 +488,6 @@ class IssuesController < ApplicationController end end - issue_versions = project.versions&.pluck(:id,:name, :status) new_version_info = [] #issue里程碑 if issue_versions.size > 0 @@ -396,6 +527,16 @@ class IssuesController < ApplicationController new_types_info.push(new_type_info) end + depend_other_issues = project.issues.where.not(id: issue_id)&.pluck(:id, :subject) + if depend_other_issues.size > 0 + depend_other_issues.each do |t| + is_chosen = depended_issues_id.include?(t[0]) ? "1" : "0" + new_issue = {id: t[0], subject: t[1], is_chosen: is_chosen} + all_issues.push(new_issue) + end + end + + { "assign_user": project_members_info, "tracker": new_tracker_info, @@ -404,10 +545,16 @@ class IssuesController < ApplicationController "issue_version": new_version_info, "start_date": issue_info[5], "due_date": issue_info[6], + "joins_users": issue_comment_users_array, + "cost_time_users": cost_time_array, + "total_cost_time": Time.at(all_cost_time).utc.strftime('%H h %M min %S s'), + "be_depended_issues": be_depended_issues_array, + "depended_issues":depended_issues_array, "estimated_hours": issue_info[7], "done_ratio": new_done_info, "issue_tag": new_tags_info, - "issue_type": new_types_info + "issue_type": new_types_info, + "all_issues": all_issues } end diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index 02096be17..6c3bc49ed 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -2,6 +2,7 @@ class JournalsController < ApplicationController before_action :require_login before_action :set_issue before_action :check_issue_permission + before_action :set_journal, only: [:destroy, :edit, :update] def index @page = params[:page] || 1 @@ -42,16 +43,29 @@ class JournalsController < ApplicationController end def destroy - journal = Journal.find(params[:id]) - if journal.present? - if journal.destroy #如果有子评论,子评论删除吗? - normal_status(0, "评论删除成功") + if @journal.destroy #如果有子评论,子评论删除吗? + normal_status(0, "评论删除成功") + else + normal_status(-1, "评论删除失败") + end + end + + def edit + + end + + def update + content = params[:content] + if content.present? + if @journal.update_attribute(:notes, content) + normal_status(0, "更新成功") else - normal_status(-1, "评论删除失败") + normal_status(-1, "更新失败") end else - normal_status(-1, "评论不存在") + normal_status(-1, "评论的内容不能为空") end + end @@ -66,8 +80,15 @@ class JournalsController < ApplicationController def check_issue_permission @project = @issue.project - unless @project.member?(current_user) || current_user.admin? + unless !@issue.is_lock || @project.member?(current_user) || current_user.admin? normal_status(-1, "您没有权限") end end + + def set_journal + @journal = Journal.find(params[:id]) + unless @journal.present? + normal_status(-1, "评论不存在") + end + end end \ No newline at end of file diff --git a/app/helpers/issue_depends_helper.rb b/app/helpers/issue_depends_helper.rb new file mode 100644 index 000000000..ab196dc71 --- /dev/null +++ b/app/helpers/issue_depends_helper.rb @@ -0,0 +1,2 @@ +module IssueDependsHelper +end diff --git a/app/helpers/issue_times_helper.rb b/app/helpers/issue_times_helper.rb new file mode 100644 index 000000000..0e8dedb0c --- /dev/null +++ b/app/helpers/issue_times_helper.rb @@ -0,0 +1,2 @@ +module IssueTimesHelper +end diff --git a/app/models/issue.rb b/app/models/issue.rb index 431334be9..4c995be55 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -14,7 +14,8 @@ class Issue < ApplicationRecord has_many :journal_details, through: :journals has_many :issue_tags_relates, dependent: :destroy has_many :issue_tags, through: :issue_tags_relates - + has_many :issue_times, dependent: :destroy + has_many :issue_depends, dependent: :destroy scope :issue_includes, ->{includes(:user)} @@ -43,6 +44,16 @@ class Issue < ApplicationRecord end end + def custom_journal_detail(prop_key, old_value, value) + journal_params = { + journalized_id: self.id, journalized_type: "Issue", user_id: self.author_id + } + journal = Journal.new journal_params + if journal.save + journal.journal_details.create(property: "attr", prop_key: prop_key, old_value: old_value, value: value) + end + end + def get_journals_size journals.size end diff --git a/app/models/issue_depend.rb b/app/models/issue_depend.rb new file mode 100644 index 000000000..14686e86d --- /dev/null +++ b/app/models/issue_depend.rb @@ -0,0 +1,3 @@ +class IssueDepend < ApplicationRecord + belongs_to :issue +end diff --git a/app/models/issue_time.rb b/app/models/issue_time.rb new file mode 100644 index 000000000..10d7af7b6 --- /dev/null +++ b/app/models/issue_time.rb @@ -0,0 +1,4 @@ +class IssueTime < ApplicationRecord + belongs_to :issue + belongs_to :user +end diff --git a/app/models/journal.rb b/app/models/journal.rb index 2bf12d9be..4eaddde68 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -37,27 +37,95 @@ class Journal < ApplicationRecord when "assigned_to_id" u = User.select(:id, :login, :lastname, :firstname) old_value = u.find(de[2]).try(:show_real_name) - value = u.find(de[3]).try(:show_real_name) + assign_user = de[3].present? ? u.find(de[3]) : "" + if assign_user.present? + value = u.find(de[3]).try(:show_real_name) + else + value = "取消了指派" + end + when "tracker_id" t = Tracker.select(:id, :name) old_value = t.find(de[2]).try(:name) - value = t.find(de[3]).try(:name) + tracker_name = de[3].present? ? t.find(de[3]) : "" + if tracker_name + value = t.find(de[3]).try(:name) + else + value = "取消了类型" + end + when "status_id" t = IssueStatus.select(:id, :name) old_value = t.find(de[2]).try(:name) - value = t.find(de[3]).try(:name) + type_name = de[3].present? ? t.find(de[3]) : "" + if type_name + value = t.find(de[3]).try(:name) + else + value = "取消了状态" + end when "priority_id" t = IssuePriority.select(:id, :name) old_value = t.find(de[2]).try(:name) - value = t.find(de[3]).try(:name) + type_name = de[3].present? ? t.find(de[3]) : "" + if type_name + value = t.find(de[3]).try(:name) + else + value = "取消了优先级" + end when "issue_tags_value" t = IssueTag.select(:id, :name) old_value = t.where(id: de[2].split(",")).select(:id,:name,:color).as_json - value = t.where(id: de[3].split(",")).select(:id,:name,:color).as_json + if de[3].present? + value = t.where(id: de[3].split(",")).select(:id,:name,:color).as_json + else + value = "清空了标签" + end when "fixed_version_id" t = Version.select(:id, :title) old_value = t.find(de[2]).try(:title) - value = t.find(de[3]).try(:title) + type_name = de[3].present? ? t.find(de[3]) : "" + if type_name + value = t.find(de[3]).try(:title) + else + value = "取消了版本库" + end + when "end_time" + t = IssueTime.select(:id, :start_time, :end_time) + type_name = de[2].present? ? t.find(de[2]) : "" + if type_name.present? + old_value = "停止工作" + d_value = type_name.end_time.to_i - type_name.start_time.to_i + value = "#{Time.at(d_value).utc.strftime('%H h %M min %S s')}" + else + old_value = "停止工作" + value = "停止工作" + end + when "issue_depend" + t = Issue.select(:id,:subject ) + type_name = de[3].present? ? t&.find_by_id(de[3]) : "" + if type_name.present? + old_value = "增加依赖" + value = { + id: de[3], + name: type_name.try(:subject) + } + else + old_value = "增加依赖" + value = nil + end + when "destroy_issue_depend" + t = Issue.select(:id,:subject ) + type_name = de[3].present? ? t&.find_by_id(de[3]) : "" + if type_name.present? + old_value = "删除依赖" + value = { + id: de[3], + name: type_name.try(:subject) + } + else + old_value = "删除依赖" + value = nil + end else old_value = de[2] value = de[3] diff --git a/app/models/project.rb b/app/models/project.rb index 0b02cd4e2..6c3938d6c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -42,8 +42,9 @@ class Project < ApplicationRecord end def members_user_infos - members.joins("left join users on members.user_id = users.id").select("users.id", "users.login","users.firstname","users.lastname") - .pluck("users.id", "users.login","users.lastname", "users.firstname") + members.joins("left join users on members.user_id = users.id").includes(:user) + # members.joins("left join users on members.user_id = users.id").select("users.id", "users.login","users.firstname","users.lastname") + # .pluck("users.id", "users.login","users.lastname", "users.firstname") end def to_param diff --git a/app/models/user.rb b/app/models/user.rb index 0f278a20e..b136db2a8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -52,6 +52,7 @@ class User < ApplicationRecord has_many :course_messages has_many :courses, foreign_key: 'tea_id', dependent: :destroy has_many :versions + has_many :issue_times, :dependent => :destroy #试卷 has_many :exercise_banks, :dependent => :destroy diff --git a/app/views/issue_times/create.json.jbuilder b/app/views/issue_times/create.json.jbuilder new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/issues/show.json.jbuilder b/app/views/issues/show.json.jbuilder index a1b928bcd..13812a835 100644 --- a/app/views/issues/show.json.jbuilder +++ b/app/views/issues/show.json.jbuilder @@ -1,5 +1,7 @@ json.partial! "commons/success" -json.extract! @issue, :id,:subject,:description,:is_private, :start_date,:due_date,:estimated_hours +json.extract! @issue, :id,:subject,:is_lock,:description,:is_private, :start_date,:due_date,:estimated_hours + +json.user_permission @user_permission json.closed_on @issue.closed_on.present? ? format_time(@issue.closed_on) : "" json.created_at format_time(@issue.created_on) json.assign_user_name @issue_assign_to.try(:show_real_name) @@ -15,6 +17,11 @@ json.issue_tags @issue.get_issue_tags json.done_ratio @issue.done_ratio.to_s + "%" json.issue_type @issue.issue_type == "1" ? "普通" : "悬赏" json.token @issue.issue_type == "2" ? @issue.token : "" +json.join_users @join_users +json.cost_time @cost_time_array +json.total_cost_time Time.at(@all_cost_time).utc.strftime('%H h %M min %S s') +json.be_depended_issues @be_depended_issues_array +json.depended_issues @depended_issues_array json.attachments do json.array! @issue_attachments do |attachment| json.partial! "attachments/attachment_simple", locals: {attachment: attachment} diff --git a/app/views/journals/edit.json.jbuilder b/app/views/journals/edit.json.jbuilder new file mode 100644 index 000000000..f5460ded4 --- /dev/null +++ b/app/views/journals/edit.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! @journal, :id,:notes +json.issue_id @journal.journalized_id \ No newline at end of file diff --git a/app/views/journals/update.json.jbuilder b/app/views/journals/update.json.jbuilder new file mode 100644 index 000000000..e69de29bb diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index b72db9435..0b1cdf0fe 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -16,6 +16,14 @@ zh-CN: 'agreed': '已同意' journal_detail: + issue_tags_value: 标签 + lock_issue: 锁定工单 + unlock_issue: 解锁工单 + destroy_issue_depend: 删除依赖 + issue_depend: 增加依赖 + work_time: 开始工作 + cancel_time: 取消时间跟踪 + end_time: 停止工作 subject: 主题 description: 描述 is_private: 私有 @@ -26,7 +34,7 @@ zh-CN: fixed_version_id: 里程碑 start_date: 开始日期 due_date: 结束日期 - estimated_hours: 工时 + estimated_hours: 添加耗时 done_ratio: 完成度 t: 是 f: 否 diff --git a/config/routes.rb b/config/routes.rb index 19d41c18b..675c00683 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -27,6 +27,16 @@ Rails.application.routes.draw do put 'commons/unhidden', to: 'commons#unhidden' delete 'commons/delete', to: 'commons#delete' + resources :issues, except: [:index, :new,:create, :update, :edit, :destroy] do + resources :journals, only: [:index, :create, :destroy, :edit, :update] + resources :issue_times, only: [:create] do + collection do + post :end_work + end + end + resources :issue_depends, only: [:create, :destroy] + end + resources :project_categories, only: [:index, :show] do get :group_list, on: :collection end @@ -42,6 +52,8 @@ Rails.application.routes.draw do member do post :copy get :index_chosen + post :close_issue + post :lock_issue end end resources :issue_tags, only: [:create, :edit, :update, :destroy, :index] diff --git a/db/migrate/20200103062707_create_issue_times.rb b/db/migrate/20200103062707_create_issue_times.rb new file mode 100644 index 000000000..b0f2e0b0e --- /dev/null +++ b/db/migrate/20200103062707_create_issue_times.rb @@ -0,0 +1,13 @@ +class CreateIssueTimes < ActiveRecord::Migration[5.2] + def change + create_table :issue_times do |t| + t.integer :issue_id + t.integer :user_id + t.datetime :start_time + t.datetime :end_time + t.string :cost_time + t.timestamps + end + add_index :issue_times, [:issue_id, :user_id] + end +end diff --git a/db/migrate/20200103062807_create_issue_depends.rb b/db/migrate/20200103062807_create_issue_depends.rb new file mode 100644 index 000000000..44fcf487a --- /dev/null +++ b/db/migrate/20200103062807_create_issue_depends.rb @@ -0,0 +1,12 @@ +class CreateIssueDepends < ActiveRecord::Migration[5.2] + def change + create_table :issue_depends do |t| + t.integer :user_id + t.integer :issue_id + t.integer :depend_issue_id + t.timestamps + end + + add_index :issue_depends, [:user_id, :issue_id, :depend_issue_id] + end +end diff --git a/db/migrate/20200103113839_add_is_lock_to_issue.rb b/db/migrate/20200103113839_add_is_lock_to_issue.rb new file mode 100644 index 000000000..21a2c6592 --- /dev/null +++ b/db/migrate/20200103113839_add_is_lock_to_issue.rb @@ -0,0 +1,5 @@ +class AddIsLockToIssue < ActiveRecord::Migration[5.2] + def change + add_column :issues, :is_lock, :boolean, default: false + end +end diff --git a/spec/controllers/issue_depends_controller_spec.rb b/spec/controllers/issue_depends_controller_spec.rb new file mode 100644 index 000000000..97e81caaa --- /dev/null +++ b/spec/controllers/issue_depends_controller_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe IssueDependsController, type: :controller do + +end diff --git a/spec/controllers/issue_times_controller_spec.rb b/spec/controllers/issue_times_controller_spec.rb new file mode 100644 index 000000000..a40cc469d --- /dev/null +++ b/spec/controllers/issue_times_controller_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe IssueTimesController, type: :controller do + +end diff --git a/spec/helpers/issue_depends_helper_spec.rb b/spec/helpers/issue_depends_helper_spec.rb new file mode 100644 index 000000000..2ff80ff03 --- /dev/null +++ b/spec/helpers/issue_depends_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the IssueDependsHelper. For example: +# +# describe IssueDependsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe IssueDependsHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/issue_times_helper_spec.rb b/spec/helpers/issue_times_helper_spec.rb new file mode 100644 index 000000000..7132044b3 --- /dev/null +++ b/spec/helpers/issue_times_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the IssueTimesHelper. For example: +# +# describe IssueTimesHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe IssueTimesHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/issue_depend_spec.rb b/spec/models/issue_depend_spec.rb new file mode 100644 index 000000000..0f48c1b54 --- /dev/null +++ b/spec/models/issue_depend_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe IssueDepend, type: :model do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/issue_time_spec.rb b/spec/models/issue_time_spec.rb new file mode 100644 index 000000000..5a3418053 --- /dev/null +++ b/spec/models/issue_time_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe IssueTime, type: :model do + pending "add some examples to (or delete) #{__FILE__}" +end